Debugging Tools for Windows

GetCurrentThreadHandle

The GetCurrentThreadHandle method returns the system handle for the current thread.

HRESULT
  IDebugSystemObjects::GetCurrentThreadHandle(
    OUT PULONG64  Handle
    );

Parameters

Handle
Receives the current thread's system handle.

Return Value

S_OK
The method was successful.

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

Interface Version

GetCurrentThreadHandle is available in all versions of IDebugSystemObjects.

Comments

In kernel-mode debugging, an artificial handle is created because the threads are virtual threads.

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

Requirements

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

Build machine: CAPEBUILD