Debugging Tools for Windows

IDebugEventCallbacks::Exception

The Exception callback method is called by the engine when an exception debugging event occurs in the target.

HRESULT
  IDebugEventCallbacks::Exception(
    IN PEXCEPTION_RECORD64  Exception,
    IN ULONG  FirstChance
    );

HRESULT
  IDebugEventCallbacksWide::Exception(
    IN PEXCEPTION_RECORD64  Exception,
    IN ULONG  FirstChance
    );

#ifdef UNICODE
#define IDebugEventCallbacksT IDebugEventCallbacksWide
#else
#define IDebugEventCallbacksT IDebugEventCallbacks
#endif

Parameters

Exception
Specifies the nature of the exception. EXCEPTION_RECORD64 is defined in winnt.h.
FirstChance
Specifies whether this exception has been previously encountered. A nonzero value means that this is the first time the exception has been encountered ("first chance"). A zero value means that the exception has already been offered to all possible handlers, and each one declined to handle it ("second chance").

Return Value

This method returns a DEBUG_STATUS_XXX value, which indicates how the execution of the target should proceed after the engine processes this event. For details on how the engine treats this value, see Monitoring Events.

Comments

This method is only called by the engine if the DEBUG_EVENT_EXCEPTION flag is set in the mask returned by IDebugEventCallbacks::GetInterestMask.

Because the structure that Exception points to might be deleted after this method returns, implementations of IDebugEventCallbacks should not access this structure after returning.

For more information about handling events, see Monitoring Events.

Requirements

Headers: Defined in dbgeng.h. Include dbgeng.h.

Build machine: CAPEBUILD