Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Crash On Windows 2003 Server Collapse All
Subject Author Date
salam salam Oct 2, 2008 - 1:50 PM

Hi


I finished integration of the freeware version (I use it to test the solution), its working on my dev machine (windows 2003 Server) And I tested it on a Windows XP and Windows Vista and its working. but When I test on Windows 2003 Server (without dev tools) my application crashes!...


I have two application, a MFC exe and a DLL called by an Adobe Director projector, the MFC exe is working, and the DLL is crashing in the first CExtResiazableDialog derived class::DoModal, and its hapenning before calling my OnInitDialog?


I think its something with the AfxGetInstanceHandle, because I affected afxCurrentInstanceHandle = m_hResource where m_hResource = LoadLibrary("myprojectres.dll")?


Any help, this is blocking me...

Technical Support Oct 3, 2008 - 1:49 PM

If your DLL is MFC regular DLL, you should check whether it manages MFC state switching everywhere where it is needed. Such DLLs should use the AFX_MANAGE_STATE() macro in each exported function or method. If you have MFC regular DLL which also uses Prof-UIS, this regular DLL should use RDE configuration of Prof-UIS library. You can find more details about this here:

http://www.prof-uis.com/prof-uis/tech-support/faq/miscellaneous.aspx#how-to-use-prof-uis-in-my-dll-project

Technical Support Oct 3, 2008 - 1:48 PM

You should use the AfxSetResourceHandle() function.

salam salam Oct 2, 2008 - 4:23 PM

The crash is happened in the ExtResizableDialog.cpp file on line 130


CWinApp * pApp = AfxGetApp();


pApp is NULL??


I have a CMyWinApp derived from the CWinApp, on the CMyWinApp::InitInstance() the AfxGetApp return the correct pointer, but after the first function call in my DLL (xtra) AfxGetApp() return NULL and AfxGetInstanceHandle return NULL?