dll from win32 console.

Dear Friends

I have a mfc application which I already converted to a dll. now I want to launch that application from another win32 client application. So how I can achieve this. Any h elp would be highly appreciated.

check my code snippet.

//in App.h header

extern "C" __declspec(dllexport) void runAppli();

//in App.cpp

__declspec(dllexport) void runAppli(HWND hWnd)




//In the client console

int main(int argc, char **argv)


typedef void (*EntryPointfuncPtr)(int argc, const char * argv );


LoadMe = LoadLibrary(L"C:\Users\DasmahapatraS\Projects\Bhagavan_Cadem\RevolutionProj\debug\RevolutionProj.dll");

if (LoadMe != 0)

printf("LoadMe library loaded!


printf("LoadMe library failed to load!

EntryPointfuncPtr LibMainEntryPoint;

LibMainEntryPoint = (EntryPointfuncPtr)GetProcAddress(LoadMe,"runAppli");

return 0;


I am not able to launch with this code. Please tell me whats going wrong... My application is appearing and disappearing from the screen.

Thanks a lot for any help. Sujan

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!