IDebugSystemObjects4::GetThreadIdByHandle method (dbgeng.h)

The GetThreadIdByHandle method returns the engine thread ID for the specified thread. The thread is specified by its system handle.

Syntax

HRESULT GetThreadIdByHandle(
  [in]  ULONG64 Handle,
  [out] PULONG  Id
);

Parameters

[in] Handle

Specifies the system handle of the thread whose thread ID is requested.

[out] Id

Receives the engine thread ID.

Return value

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

Return code Description
S_OK
The method was successful.

Remarks

In kernel-mode debugging, because the handle is an artificial handle for a processor, this method returns the engine thread ID for the virtual thread representing that processor.

For more information about threads, see Threads and Processes. For details on system handles, see Handles.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)