dll

Freeing memory allocated in a different dll

I have an exe using a dll which is using another dll. This situation has arisen: In dll1: class abc { static bool FindSubFolders(const std::string & sFolderToCheck, std::vector< std::string > & vecSubFoldersFound); } In dll2: void aFunction() { std::vector<std::string> folders; std::string...

debug vs. release dll size

Why in cpp a dll in debug mode is X10 bigger than release while in .Net they are almost the same size? ...

Converting .DLL to .SO

Hello, Can any one of you help me in converting an windows dll file in a .so file. ...

Linux: How to get full name of shared object just loaded from the constructor?

On Windows, several arguments are passed to the DllMain constructor: BOOL WINAPI DllMain( __in HINSTANCE hinstDLL, __in DWORD fdwReason, __in LPVOID lpvReserved ); From hinstDLL I can get the fully qualified file name of the DLL itself using GetModuleFileName(): LPTSTR str = new TCHAR[256]; int libNameLength = GetM...

Create Pex test to test a DLL and hardware controlled by that DLL?

Create Pex test to test a DLL and hardware controlled by that DLL? I have some hardware that has an api in that is controlled by a DLL. I have written some unit tests in nunit that will call the appropriate pieces of the API and do a test. For instance I might have a "get data test", that has an 1. open, 2. read on one side and 3. send...

Replacing FAR by nothing and PASCAL by __stdcall

I'm accessing a DLL through : int (__stdcall *Send) (char *); Send = (int (__stdcall *)(char *)) GetProcAddress(hmModule,"Send"); The original call uses: int (FAR PASCAL *Send) (char FAR *); Send = (int (FAR PASCAL *)(char FAR *))GetProcAddress(hmModule,"Send"); Is there any downside to replace FAR by nothing and PASCAL by __stdcal...

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered in the local machine

I'm getting this error when trying to run a vb application on a another pc. Is there some place I can download this DLL? ...

Question about using windbg for a dll called from Labview

I am attempting to debug a dll that is called by a Labview application. I have the right symbol files (downloaded from microsoft) for things like ntdll.dll and others. I of course also have the pdb file for my DLL. What I don't have, obviously, is any symbol files for labview; since as far as I know National Instruments does not release....

LoadLibrary() - "Invalid Access Memory Location (998)"

Let me start off by saying I had one DLL loading in just fine. But when I go to load a second DLL it always errors out with a "Invalid Access Memory Location (998)" error. In my project the DLLs basically contain the code needed to run an AI. Another application I built allows you to write simple code and then behind the scenes it compi...

PInvoke on the Windows Mobile platform

So I'm trying to invoke a function I have in my unmanaged C++ dll. void foo(char* in_file, char * out_file) In my C# application I declare the same function as [DllImport("dll.dll")] public static extern void foo(byte[] in_file, byte[] out_file); The actual parameters I pass through an ASCII encoder like so byte[] param1 = Encodi...

How to work around memory-leaking 3rd party DLL (no source code) accessed by Tomcat application?

We have a project where a 3rd party DLL is accessed through JacoZoom in a Tomcat application. Apparently the DLL leaks memory (confirmed by the vendor), but the vendor has no intention to fix this. The memory leak forces Tomcat to be restarted at regular intervals, which is naturally a great inconvenience for the users. What would be th...

How can I force symbol a symbol reference in c++ (programmatically)

Hi, I'm trying to plug tcmalloc into a suite of software that we currently use at work. The software comprises of a lot of dll's. They all refer to a shared header file, so I can pragma link the library. However as none of the code refers to the symbol __tcmalloc the optimizer strips the dll. Now I don't want to have to edit 200 projec...

DLL Shared Data Section Does Not Exist Error

Hi, I try to declare a shared data segment in a DLL. I declare the area with: #pragma data_seg(".shared") int varx=0; #pragma data_seg() __declspec(allocate(".shared")) // I found this declspec suggestion in another forum #pragma comment (linker,"/section:.shared,RWS") Also I add SECTIONS .shared READ WRITE SHARED into the...

Making a 2D engine: compiling necessary libraries with the engine instead of the game

I'm making a 2D engine in C++, and I want to be able to supply a .dll and a .lib so that games can just include those and everything is fine and dandy. I've looked at how Ogre does it, and it results in ugliness like this: #ifdef __cplusplus extern "C" { #endif #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 INT WINAPI WinMain( HINSTANCE hIn...

Is it possible to generate a DLL using Turbo C/C++ compiler ??

I need this for calling a C function from Java class (JNI) and I know that there are options to do this using "Microsoft Visual C++ compiler". (explained here) But I am interested to know if something similar can be done using TC or TCC. I don't have a copy of "Microsoft Visual C++" and not sure if cl.exe is available without having to...

How do I (or if I can't) use Variants on simple DLLs?

I want to expose some functionality of a internal object as a DLL - but that functionality uses variants. But I need to know: I can export a function with Variant parameters and/or return - or is better to go to an string-only representation? What is better, from language-agnostic POV (the consumer is not made with Delphi - but all wil...

Accessing dynamically loaded DLL (with LoadLibrary) in Visual Basic 6

I have a need to create a wrapper for a DLL, loading and unloading it as needed (for those interested in the background of this question, see http://stackoverflow.com/questions/1662075/how-to-work-around-memory-leaking-3rd-party-dll-no-source-code-accessed-by-tomc) . I'm doing it in Visual Basic 6, and the loading and unloading with the ...

Visual Studio Debugging Referenced DLL

I have an ASP.NET web site uses a compiled DLL from another VS.NET solution (have the DLL's original solution--.cs files, .csproj, .sln, etc) as a reference. There's an exception coming up to the web site from this DLL and I'd like to debug it (the DLL). Can I do this? Can I drill down into the DLL, set break points, etc. somehow? I've h...

use matlab generated dll for generating c++ dll

hi, I have generated cppshared lib dll using matlab command mcc. Now I want this dll to make another dll inside microsoft visual c++. Is it possible to make a dll using another? Please help!! ...

Execute .NET 3.0 code from Office 2003

I've created a DLL in C# using the .NET 3.0 framework. Below is the code of my DLL namespace CompanyName.Net { [Guid("F7075E8D-A6BD-4590-A3B5-7728C94E372F")] [ClassInterface(ClassInterfaceType.AutoDual)] [ProgId("CompanyName.Net.Webrequest")] public class WebRequest { public string Result { get; private set;...