Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help With Exception Pin
Jochen Arndt26-Jul-16 21:47
professionalJochen Arndt26-Jul-16 21:47 
GeneralRe: Help With Exception Pin
ForNow27-Jul-16 2:14
ForNow27-Jul-16 2:14 
GeneralRe: Help With Exception Pin
Jochen Arndt27-Jul-16 2:18
professionalJochen Arndt27-Jul-16 2:18 
GeneralRe: Help With Exception you where right !!!!!!!! Pin
ForNow27-Jul-16 15:15
ForNow27-Jul-16 15:15 
QuestionChoosing between strings Pin
Anthony Appleyard26-Jul-16 9:47
Anthony Appleyard26-Jul-16 9:47 
AnswerRe: Choosing between strings Pin
Richard MacCutchan26-Jul-16 21:11
mveRichard MacCutchan26-Jul-16 21:11 
QuestionNewbee Exception handling Guidance Pin
ForNow25-Jul-16 4:35
ForNow25-Jul-16 4:35 
AnswerRe: Newbee Exception handling Guidance Pin
Jochen Arndt25-Jul-16 4:57
professionalJochen Arndt25-Jul-16 4:57 
This might not be the expected answer:
With most types of exceptions the best handling is avoiding that they occur.

This applies especially to the access violation exception. Even when catching it by code, the only reasonable "handling" is terminating the application immediately.

In your actual case you should use the debugger stepping back in the code to find out what let the exception occur. It is probably one of your objects that hasn't been initialised or set to an error state (e.g. a pointer containing the value -1) and the exception is thrown when it is used the first time (inside the kernel / ntddl in your case).

A general hint to reduce debugging time searching for the source of such exceptions is checking the success state of every function that provides one (usually the return value). The simplest way to do this is using assertions in debug build. With MFC you can use the ASSERT (MFC)[^] and VERIFY[^] macros.
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 5:31
ForNow25-Jul-16 5:31 
AnswerRe: Newbee Exception handling Guidance Pin
Richard MacCutchan25-Jul-16 5:12
mveRichard MacCutchan25-Jul-16 5:12 
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 5:30
ForNow25-Jul-16 5:30 
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 6:32
ForNow25-Jul-16 6:32 
GeneralRe: Newbee Exception handling Guidance Pin
Richard MacCutchan25-Jul-16 6:46
mveRichard MacCutchan25-Jul-16 6:46 
QuestionRe: Newbee Exception handling Guidance Pin
David Crow25-Jul-16 16:59
David Crow25-Jul-16 16:59 
AnswerRe: Newbee Exception handling Guidance Pin
ForNow26-Jul-16 1:56
ForNow26-Jul-16 1:56 
GeneralRe: Newbee Exception handling Guidance Pin
David Crow26-Jul-16 2:04
David Crow26-Jul-16 2:04 
GeneralRe: Newbee Exception handling Guidance Pin
jeron126-Jul-16 4:22
jeron126-Jul-16 4:22 
GeneralRe: Newbee Exception handling Guidance Pin
Daniel Pfeffer26-Jul-16 4:33
professionalDaniel Pfeffer26-Jul-16 4:33 
GeneralRe: Newbee Exception handling Guidance Pin
jeron126-Jul-16 5:30
jeron126-Jul-16 5:30 
QuestionGet Window Handle to Modless Dialog Box After Create Pin
ForNow24-Jul-16 12:57
ForNow24-Jul-16 12:57 
AnswerRe: Get Window Handle to Modless Dialog Box After Create Pin
CPallini24-Jul-16 20:36
mveCPallini24-Jul-16 20:36 
GeneralRe: Get Window Handle to Modless Dialog Box After Create Pin
ForNow25-Jul-16 4:13
ForNow25-Jul-16 4:13 
AnswerRe: Get Window Handle to Modless Dialog Box After Create Pin
Victor Nijegorodov24-Jul-16 21:47
Victor Nijegorodov24-Jul-16 21:47 
QuestionGenerate Unique Ids Pin
Member 1053345022-Jul-16 8:33
Member 1053345022-Jul-16 8:33 
AnswerRe: Generate Unique Ids Pin
Richard MacCutchan22-Jul-16 21:11
mveRichard MacCutchan22-Jul-16 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.