GetProcAddress problem
Im currently experimenting with run time linking with dlls.
I just want to export the following function
extern "C"
{
void Init();
typedef void (*INIT)();
}
in the client code, I do the following (after loading the library)
INIT fn;
fn = (INIT)GetProcAddress(hDLL, "Init");
if(fn == NULL) { FreeLibrary(hDLL); return FALSE; }
no matter what I do, fn is always equal to NULL.
(NOTE : I used the tutorials of Gaz IqBal)
November 15, 2000 02:16 PM
Although you have entered extern "C" correctly, you still havent exported the functions from the library.
extern "C"
{
__declspec( dllexport ) void Init();
}
hope that helps ya,
n!
extern "C"
{
__declspec( dllexport ) void Init();
}
hope that helps ya,
n!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement