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)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
}
//In the client console

int main(int argc, char **argv)
{
typedefvoid (*EntryPointfuncPtr)(int argc, constchar * argv );
HINSTANCE LoadMe;
LoadMe = LoadLibrary(L
"C:\\Users\\DasmahapatraS\\Projects\\Bhagavan_Cade m\\RevolutionProj\\debug\\RevolutionProj.dll");
if (LoadMe != 0)
printf(
"LoadMe library loaded!\n");
else
printf("LoadMe library failed to load!\n");
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