|
-
April 7th, 1999, 12:49 PM
#1
NULL CWinApp pointer in release mode but not debug mode
When I compile my app in debug mode, it works fine. When I compile in Release mode, it crashes. In AfxWinMain, AfxGetApp() returns 0x00000000. The values of the arguments passed to AfxWinMain are
hInstance = 0x00400000
hPrevInstance = 0x00000000
lpCmdLine = ""
nCmdShow = 1
Any suggestions? I have gone through rules 1-3 in the article Why doesn't my project work in release mode? on this site but the suggested changes did not change the results.
Ed
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
ASSERT(hPrevInstance == NULL);
int nReturnCode = -1;
CWinApp* pApp = AfxGetApp(); // AfxGetApp() returns 0x00000000
//.
//. snipped
//.
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|