This is a function inside my dll...
extern "C" _declspec( dllexport) void WINAPI PromptMsg()
when i try to call it from another application with this...
typedef bool (CALLBACK* LPFNDLLFUNC1)();
HINSTANCE hDLL; // Handle to DLL
hDLL = LoadLibrary("SecBond.dll");
if (hDLL != NULL)
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"PromptMsg");
// handle the error
// call the function
the dll is loaded successfully but the PromptMsg function is not called, the handle of the function lpfnDllFunc1 is null.
Anyone please help.. thanks in advance.
I suspect there is something wrong with my coding.
Is it possible to send me 2 simple projects which will guide me in writing dll?
1 project which creates a dll (MFC AppWizard(dll))
and another project which calls the function in the dll.