Isn't there anyone who can help me?
Any help would be greatly appreciated! This is starting to piss me off.
Lets list my problem a little better:
I got a DLL with this function:
__declspec(dllexport) int gameStartGame(void){
// blabla
return 1;
}
I want to load that dll at runtime, using LoadLibrary, i do it like this and it works (at least, it doesn't return NULL):
module=LoadLibrary(file);
Then i want to get a pointer to the function i mentioned earlier (gameStartGame) like this:
typedef int (*GAMESTARTGAMEPROC) (void);
GAMESTARTGAMEPROC gameStartGame;
//...
gameStartGame=(GAMESTARTGAMEPROC)GetProcAddress(module,"gameStartGame");
And it is NULL, with the error (127) can't find the specified procedure.
As i said any help will be appreciated very much!
EDIT: After LoadLibrary this error is set (and before a different unsignificant error):
ERROR 6: The handle is invalid.
Does that help?
EDIT2: I now use LoadLibraryEx and i get no errors (0: Succeeded)
[Edited by - Tree Penguin on August 21, 2004 3:06:49 PM]
Popular Topics
Advertisement