Jan 21, 2004 Thread starter #2 skoko Programmer Feb 11, 2002 188 US To add that .def doesn't exist. Upvote 0 Downvote
Jan 22, 2004 1 #3 apatterno Programmer Nov 26, 2002 368 US If you know the ordinal, you can do something like this: [tt]#define MYORDINAL 168 typedef void (*FUNCTIONPTR)(int,int); // find the funtcion HMODULE hmod = LoadLibrary("MyLibrary.DLL" FUNCTIONPTR myFunc = GetProcAddress(MAKELONG(MYORDINAL,0)); // execute the function now myFunc(0,0);[/tt] Ordinal @168 is an example. Also I assumed that your function had two parameters of type int. I REALLY hope that helps. Will Upvote 0 Downvote
If you know the ordinal, you can do something like this: [tt]#define MYORDINAL 168 typedef void (*FUNCTIONPTR)(int,int); // find the funtcion HMODULE hmod = LoadLibrary("MyLibrary.DLL" FUNCTIONPTR myFunc = GetProcAddress(MAKELONG(MYORDINAL,0)); // execute the function now myFunc(0,0);[/tt] Ordinal @168 is an example. Also I assumed that your function had two parameters of type int. I REALLY hope that helps. Will
Jan 26, 2004 Thread starter #4 skoko Programmer Feb 11, 2002 188 US I get this error for GetProcAdress: Cannot convert parameter 2 from 'long' to 'const char *' Upvote 0 Downvote
Jan 26, 2004 Thread starter #5 skoko Programmer Feb 11, 2002 188 US (const char *)MAKELONG(MYORDINAL,0) and it work great Thank You! Upvote 0 Downvote