Debugging Tools for Windows |
The SessionStatus callback method is called by the engine when a change occurs in the debugger session.
HRESULT
IDebugEventCallbacks::SessionStatus(
IN ULONG Status
);
HRESULT
IDebugEventCallbacksWide::SessionStatus(
IN ULONG Status
);
#ifdef UNICODE
#define IDebugEventCallbacksT IDebugEventCallbacksWide
#else
#define IDebugEventCallbacksT IDebugEventCallbacks
#endif
Value | Description |
---|---|
DEBUG_SESSION_ACTIVE | A debugger session has started. |
DEBUG_SESSION_END_SESSION_ACTIVE_TERMINATE | The session was ended by sending DEBUG_END_ACTIVE_TERMINATE to EndSession. |
DEBUG_SESSION_END_SESSION_ACTIVE_DETACH | The session was ended by sending DEBUG_END_ACTIVE_DETACH to EndSession. |
DEBUG_SESSION_END_SESSION_PASSIVE | The session was ended by sending DEBUG_END_PASSIVE to EndSession. |
DEBUG_SESSION_END | The target ran to completion, ending the session. |
DEBUG_SESSION_REBOOT | The target computer rebooted, ending the session. |
DEBUG_SESSION_HIBERNATE | The target computer went into hibernation, ending the session. |
DEBUG_SESSION_FAILURE | The engine was unable to continue the session. |
This method's return value is ignored by the engine.
This method is only called by the engine if the DEBUG_EVENT_SESSION_STATUS flag is set in the mask returned by IDebugEventCallbacks::GetInterestMask.
After the engine has notified all the event callbacks of the change in the session status, it will also notify any loaded extensions that export the DebugExtensionNotify callback method. The value that it passes to the extensions depends on the value of Status. If Status is DEBUG_SESSION_ACTIVE, it passes DEBUG_SESSION_ACTIVE; otherwise, it passes DEBUG_SESSION_INACTIVE.
In the DEBUG_SESSION_ACTIVE case, the engine follows the debugger session change notification with a target state change notification by calling IDebugEventCallbacks::ChangeDebuggeeState on the event callbacks and passing DEBUG_CDS_ALL in the Flags parameter. In all other cases, the engine precedes this notification with an engine state change notification by calling IDebugEventCallbacks::ChangeEngineState on the event callbacks and passing DEBUG_CES_EXECUTION_STATUS in the Flags parameter.
For more information about handling events, see Monitoring Events. For information about debugger sessions, see Debugging Session and Execution Model.
Headers: Defined in dbgeng.h. Include dbgeng.h.