another quesion about regular dll
-
i create a regular dll named MyDll using MFC, i want the dll popup a dialg in the beginning of the function CMyDllApp::InitInstance() ,just as i did in my exe. but here caused serious error in wincore.cpp (line:884) BOOL CMyDllApp::InitInstance() { // TODO: Add your specialized code here and/or call the base class CDlg dlg; dlg.DoModal(); return CWinApp::InitInstance(); } who can tell me what's wrong to my program? gucy
-
i create a regular dll named MyDll using MFC, i want the dll popup a dialg in the beginning of the function CMyDllApp::InitInstance() ,just as i did in my exe. but here caused serious error in wincore.cpp (line:884) BOOL CMyDllApp::InitInstance() { // TODO: Add your specialized code here and/or call the base class CDlg dlg; dlg.DoModal(); return CWinApp::InitInstance(); } who can tell me what's wrong to my program? gucy
gucy wrote: i create a regular dll named MyDll using MFC... If by "regular dll" you mean a non-MFC DLL, this is rather contradictory, don't you think? gucy wrote: who can tell me what's wrong to my program? I would guess that it's too early to be calling such functions. The DLL is not fully initialized at this point, and something within CDialog requires the DLL to be up and ready to go.