Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fopen_s problem Pin
Joe Woodbury15-May-06 8:17
professionalJoe Woodbury15-May-06 8:17 
GeneralRe: fopen_s problem Pin
David Crow15-May-06 8:23
David Crow15-May-06 8:23 
AnswerRe: fopen_s problem Pin
Michael Dunn15-May-06 8:44
sitebuilderMichael Dunn15-May-06 8:44 
Questionnetwork programming! Pin
farshad.f15-May-06 5:22
farshad.f15-May-06 5:22 
AnswerRe: network programming! Pin
David Crow15-May-06 5:53
David Crow15-May-06 5:53 
AnswerRe: network programming! Pin
Roger Stoltz15-May-06 6:09
Roger Stoltz15-May-06 6:09 
QuestionException handling Pin
LiYS15-May-06 5:15
LiYS15-May-06 5:15 
AnswerRe: Exception handling Pin
Stephen Hewitt15-May-06 15:54
Stephen Hewitt15-May-06 15:54 
LiYS wrote:
if it is return EXCEPTION_EXECUTE_HANDLER,why the statement a = 3; never gets excuted?

 
 A quote from MSDN: "A __finally statement does not block searching for an appropriate exception handler". You raise the exception with the following statement:
*p = a; // Raise an exception

The system will then looks for an exception handler calling any __finally blocks on the way (actually this isn't quite true but it's good enough for now). When it gets to the __except block the filter expression returns EXCEPTION_EXECUTE_HANDLER so it enters the block and the exception is handled.

LiYS wrote:
if it is return EXCEPTION_CONTINUE_EXECUTION,why the filter keeps getting called.

 
 The idea of EXCEPTION_CONTINUE_EXECUTION is that the code first takes some action to correct the problem then execution is resumed and the operation is retried: you are performing no such correction thus the problem keeps recurring. In short everything is working as it should. Note that the __finally handler will not be called in this case (this is where real life differs slightly from my explaination as alluded to in my, "this isn't quite true" comment above).

LiYS wrote:
If it is return EXCEPTION_CONTINUE_SEARCH, the system keeps searching for exception handlers on and on and on for access violation?

 
  If you return this you're telling the system that the particular __except block should not be entered and to continue searching for a handler. If no handler is encountered that handles the exception execution is aborted.


Steve
QuestionActiveX control as parent Pin
Alton Williams15-May-06 4:59
Alton Williams15-May-06 4:59 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz15-May-06 5:44
Roger Stoltz15-May-06 5:44 
GeneralRe: ActiveX control as parent Pin
Alton Williams16-May-06 1:53
Alton Williams16-May-06 1:53 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz16-May-06 3:07
Roger Stoltz16-May-06 3:07 
GeneralRe: ActiveX control as parent Pin
Alton Williams5-Jun-06 2:16
Alton Williams5-Jun-06 2:16 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz7-Jun-06 10:49
Roger Stoltz7-Jun-06 10:49 
QuestionGDI and Regions Pin
HakunaMatada15-May-06 4:47
HakunaMatada15-May-06 4:47 
Questionto locate the registry keys for Local Security Policies Pin
narayanagvs15-May-06 4:46
narayanagvs15-May-06 4:46 
Questionerror in debugging directshow filter in loading dll function Pin
yongwpi15-May-06 4:46
yongwpi15-May-06 4:46 
AnswerRe: error in debugging directshow filter in loading dll function Pin
Cedric Moonen15-May-06 4:55
Cedric Moonen15-May-06 4:55 
GeneralRe: error in debugging directshow filter in loading dll function Pin
yongwpi15-May-06 6:13
yongwpi15-May-06 6:13 
AnswerRe: error in debugging directshow filter in loading dll function Pin
Stephen Hewitt15-May-06 18:29
Stephen Hewitt15-May-06 18:29 
GeneralRe: error in debugging directshow filter in loading dll function Pin
yongwpi16-May-06 6:30
yongwpi16-May-06 6:30 
QuestionHide folder Pin
nat2kus15-May-06 4:22
nat2kus15-May-06 4:22 
AnswerRe: Hide folder Pin
David Crow15-May-06 5:55
David Crow15-May-06 5:55 
Questioncheck status CD Pin
photomatic15-May-06 4:06
photomatic15-May-06 4:06 
QuestionRe: check status CD Pin
David Crow15-May-06 6:00
David Crow15-May-06 6:00 

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.