tags:

views:

645

answers:

1

I have an SDI application Vc++6.0. I am running this application from an MDI application using ShellExecute function. When the SDI application runs it opens one ODBC dialog and if the user clicks on HELP butto, the application terminates. I checked using SPY++ and got the following reason for application termination

(SHLWAPI.DLL): 0xC00000FD: Stack Overflow.

Why is this occurring?

A: 

You could try to trap stack overflow in your Visual C++ application to:

  • get past that first stack overflow
  • analyze when it occurs (does it happens several times after that first occurrence or not ?)

This exception can be trapped with the __try and __except keywords in Microsoft Visual C++

    __try
    {
        StackOverflow(0);
    }
    __except (EXCEPTION_EXECUTE_HANDLER)
    {
        printf("Exception handler %lX\n", _exception_code()); 
        Sleep(2000);
    }

The rest of the article explains how to handle subsequent stack overflows without, for them, to raise access violation exceptions.

VonC
hey i tried that code...but still getting the same error yes it occurs several times after the first occurrence