Hi,
I am trying to call functions from a dll without any success.
This is the dll setup:
.def file containsCode:#define DllExport __declspec( dllexport ) DllExport int _stdcall setupConnection(void) { ... }
LIBRARY communication
EXPORTS
setupConnection @1
in my main program, I set up a pointer to that function as follows:
Load library works fine. I checked that the code actually goes into the DLLMain function. For some reason the GetProcAddress returns NULL. I also compiled the calling application and the dll using debug mode in ms vs 2005. I am at a lost here. If anybody has an explanation, I'd really appreciate it. ThanksCode:typedef int (CALLBACK* communication_setup)(void); communication_setup comSetup; cDLL = LoadLibrary("communication"); /*Try to open the dll*/ comSetup = (communication_setup)GetProcAddress(cDLL,"setupConnection");
Amish



LinkBack URL
About LinkBacks


