Hi all!
I've just started dealing with dll-s for two days, but I got stucked and dont see how to move on..so to make my first steps, with some searching I created a Test.dll with a function fnTest() in it. Exactly it's prototype in the header file looks like the following:
__declspec(dllexport) int fnTest(void);
If I'm using implicit linking it's ok. The trouble is on when I try to link it explicitly.
HINSTANCE Testdll;
Testdll = LoadLibrary("Test.dll");
They are still good, it finds the Test.dll, but the GetProcAddress returns with NULL, although it should work..(The dll is correct, it worked while linking implicitly):
fnTestptr importaltfnTest;
importaltfnTest = (fnTestptr)GetProcAddress(Testdll,"fnTest");
where fnTestpr is: typedef int (*fnTestptr)();
I looked at the GetLastError function, it returns 127, but I dunno what that means..
Thank you ever so much for help! I cant move on on my own..:(

GetProcAddress doesnt find the function in my dll
Jay_Vora_b4843e
leonlai
You can only see the names. There is no way to get the kind of arguments that have to be used with a function.
You need someting like a header!
thea.umali
Donaghy
DragonDave
Yogev
This is due to name mangling. One way to avoid this problem is to declare the export like below:
#ifdef
__cplusplusextern
"C" {#endif
__declspec(dllexport) int fnTest(void);#ifdef
__cplusplus}
#endif
or you can write a .DEF file to declare your exports.
Regards