Debugging Tools for Windows

GetImplicitThreadDataOffset

The GetImplicitThreadDataOffset method returns the implicit thread for the current process.

HRESULT
  IDebugSystemObjects2::GetImplicitThreadDataOffset(
    OUT PULONG64  Offset
    );

Parameters

Offset
Receives the location in the target's memory address space of the data structure of the system thread that is the implicit thread for the current process.

Return Value

S_OK
The method was successful.

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

Interface Version

GetImplicitThreadDataOffset is available in IDebugSystemObjects2 and later versions.

Comments

In kernel-mode debugging, the data structure is the KTHREAD structure for the process.

In user-mode debugging, the data structure is the thread environment block (TEB) for the process.

For more information about the implicit thread, see Threads and Processes. For details on the KTHREAD structure and TEB, see Microsoft Windows Internals by David Solomon and Mark Russinovich.

Requirements

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

Build machine: CAPEBUILD