Debugging Tools for Windows

GetExceptionFilterSecondCommand

The GetExceptionFilterSecondCommand and GetExceptionFilterSecondCommandWide methods return the command that will be executed by the debugger engine upon the second chance of a specified exception.

HRESULT
  IDebugControl::GetExceptionFilterSecondCommand(
    IN ULONG  Index,
    OUT PSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  CommandSize
    );

HRESULT
  IDebugControl3::GetExceptionFilterSecondCommandWide(
    IN ULONG  Index,
    OUT PWSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  CommandSize
    );

#ifdef UNICODE
#define GetExceptionFilterSecondCommandT GetExceptionFilterSecondCommandWide
#else
#define GetExceptionFilterSecondCommandT GetExceptionFilterSecondCommand
#endif

Parameters

Index
Specifies the index of the exception filter whose second-chance command will be returned. Index can also refer to the default exception filter to return the second-chance command for those exceptions that do not have a specific or arbitrary exception filter.
Buffer
Receives the second-chance command for the exception filter.
BufferSize
Specifies the size, in characters, of the buffer that Buffer specifies.
CommandSize
Receives the size, in characters, of the second-chance command for the exception filter. If CommandSize is NULL, this information is not returned.

Return Value

S_OK
The method was successful.

This method may also return error values. See Return Values for more details.

Interface Version

GetExceptionFilterSecondCommand is available in all versions of IDebugControl. GetExceptionFilterSecondCommandWide is available in IDebugControl3 and later versions.

Comments

Only exception filters support a second-chance command. If Index refers to a specific event filter, the command returned to Buffer will be empty. The returned command will also be empty if no second-chance command has been set for the specified exception.

For more information about event filters, see Event Filters.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

sx, sxd, sxe, sxi, sxn (Set Exceptions), SetExceptionFilterSecondCommand, GetEventFilterCommand

Build machine: CAPEBUILD