Advertisement

GetProcAddress problem

Started by November 15, 2000 01:54 PM
1 comment, last by Noodles 24 years, 1 month ago
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)
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!
Advertisement
It works, thanks

This topic is closed to new replies.

Advertisement