Debugging Tools for Windows

SetMatchThreadId

The SetMatchThreadId method sets the engine thread ID of the thread that can trigger a breakpoint.

HRESULT
  IDebugBreakpoint::SetMatchThreadId(
    IN ULONG  Thread
    );

Parameters

Thread
The engine thread ID of the thread that can trigger this breakpoint.

Return Value

SetMatchThreadId might return one of the following values:

S_OK
The method was successful.
E_NOINTERFACE
The thread that Thread specifies could not be found.
E_INVALIDARG
The target is in a kernel and the breakpoint is a processor breakpoint. Processor breakpoints cannot be limited to threads in kernel mode.

This method might also return other error values. For more information about possible return values, see Return Values.

Comments

If you have set a thread for the breakpoint, the breakpoint can be triggered only if that thread hits the breakpoint. If you have not set a thread, any thread can trigger the breakpoint.

If you have set a thread, you can remove the setting by setting Id to DEBUG_ANY_ID.

For more information about breakpoint properties, see Controlling Breakpoint Flags and Parameters.

Requirements

Versions: Available in all versions of IDebugBreakpoint.

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

Build machine: CAPEBUILD