Debugging Tools for Windows

GetCurrentProcessPeb

The GetCurrentProcessPeb method returns the process environment block (PEB) of the current process.

HRESULT
  IDebugSystemObjects::GetCurrentProcessPeb(
    OUT PULONG64  Offset
    );

Parameters

Offset
Receives the location in the target's virtual address space of the PEB of 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

GetCurrentProcessPeb is available in all versions of IDebugSystemObjects.

Comments

In user-mode debugging, this method provides the same information as GetCurrentProcessDataOffset.

In kernel-mode debugging, the location returned is that of the PEB structure for the system process in which the last event occurred.

Note  In kernel mode, the current process of the target is always the single virtual process the debugger engine created for the kernel. However, because events may occur in different system processes, the PEB location returned by this method may change.

For more information about processes, see Threads and Processes.

Requirements

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

Build machine: CAPEBUILD