Dear Friends
I am loading a dll from another exe mfc application. for that i have exposed one api 'runAppli' in the dll as extern "C". Then I am loading the dll using LoadLibrary. By loading the dll itself the dll application is launched. I am surprised. I should call the api 'runAppli' and then the application should launch but its not happening. How come it is happening please give some suggestions.
By simply loading the dll the dll application is launching.. why ??? Thanks SujanCode:// in the all extern "C" BOOL __declspec(dllexport) runAppli(CString filename) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); if(filename.IsEmpty()) return false; view->ShowWindow(SW_SHOW); view->loadProfile(filename); view->domainSetUpForProfile(); view->drawLines(); view->drawArcs(); view->drawProfile(); return true; } //in the client exe application void CClientRevolutionProjDlg::OnBnClickedButton1() { HINSTANCE hinstLib; hinstLib = LoadLibrary(L"C:\\Users\\sujan.dasmahapatra\\Documents\\Projects\\Bhagavan_SurfaceRevolution\\RevolutionProj\\debug\\RevolutionProj.dll"); }


Reply With Quote

Bookmarks