Debugging Tools for Windows

SetInterrupt

The SetInterrupt method registers a user interrupt or breaks into the debugger.

HRESULT
  IDebugControl::SetInterrupt(
    IN ULONG  Flags
    );

Parameters

Flags
Specifies the type of interrupt to register. Flags can take one of the values listed in the following table.
Value Description
DEBUG_INTERRUPT_ACTIVE If the target is running, the engine will request a break into the debugger. This request might time out. For more information, see the "Comments" section.

Otherwise, when the target is suspended, the engine will register a user interrupt.

DEBUG_INTERRUPT_PASSIVE The engine will register a user interrupt.
DEBUG_INTERRUPT_EXIT If there is currently a WaitForEvent call running, the engine will force it to return. If there are any debugger commands causing execution in the target — for example, g (Go) and p (Step) — the engine will force them to complete. This does not force a break into the debugger, so the target might not be suspended. In which case, the WaitForEvent call will return E_PENDING.

Otherwise, when the target is suspended, register a user interrupt.

Return Value

S_OK
The method was successful.

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

Interface Version

SetInterrupt is available in all versions of IDebugControl.

Comments

This method can be called at any time and from any thread. Once the interrupt has been registered, this method returns immediately.

If Flags is DEBUG_INTERRUPT_ACTIVE, and the interrupt times out, the engine will generate a synthetic exception event. This event will be sent to event callback's IDebugEventCallbacks::Exception method. The amount of time before the interrupt times out can be set using SetInterruptTimeout.

Requirements

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

See Also

GetInterrupt, GetInterruptTimeout, SetInterruptTimeout

Build machine: CAPEBUILD