Archived

This topic is now archived and is closed to further replies.

VC++ DLL problem

This topic is 5003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m still having a problem with explicitly linking DLLs. //DLL source: #include <iostream.h> void __declspec(dllexport) abc() { cout << "abc"; } //EXE source #include <windows.h> int main() { HMODULE hDLL = LoadLibrary("dll.dll"); void (*abc)() = GetProcAddress(hDLL,"abc"); abc(); FreeLibrary(hDLL); return 0; } Whenever I try this the program freezes. I debugged it and it turns out that the value of abc is 0x0000. Does anyone know what i''m doing wrong? Here comes the Thnikkaman!

Share this post


Link to post
Share on other sites