Problem with CException
From: Alain M. Dube (adube_at_cadencesoftware.com)
Date: 12/03/04
- Next message: RuffAroundTheEdges: "I really want this to run."
- Previous message: Michael Peters: "VC6 Problem"
- Next in thread: Ashok K Kumar: "Re: Problem with CException"
- Reply: Ashok K Kumar: "Re: Problem with CException"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 22:12:47 -0500
Hello;
I'm running Windows XP Professional, SP2. I'm using Microsoft Visual C++ v6
(SP5). I built a sample project using the App Wizard. The sample app is
uses dynamic bound MFC, and is a Single Doc Interface Windows app.
I placed the following code in the main cpp file (say after the app
initialization takes place):
try
{
char* psz = NULL; // Setup a NULL pointer
*psz = 0; // Attempt to set the location at address
0 to 0 - to force an Access Violation
}
catch (CException* pEx)
{
int x = 1;
}
Looks simple enough.
When I run execute the app, a message is displayed referring to an
"unhandled exception" after the "*psz = 0;" instruction is executed. My
"catch" exception handler never gets control. The Access Violation is
"unhandled".
What could cause my exception handler to be ignored?
Thanks in advance for your assistance.
Regards;
Al
- Next message: RuffAroundTheEdges: "I really want this to run."
- Previous message: Michael Peters: "VC6 Problem"
- Next in thread: Ashok K Kumar: "Re: Problem with CException"
- Reply: Ashok K Kumar: "Re: Problem with CException"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|