Debugging Tools for Windows |
The GetPebAddress function returns the address of the process environment block (PEB) for a system process.
VOID
GetPebAddress(
ULONG64 CurrentThread,
PULONGLONG Address
);
In kernel-mode debugging, this is the location of the KTHREAD structure, which is returned by GetCurrentThreadAddr. If CurrentThread is NULL, the PEB for the current process is returned.
In user-mode debugging, CurrentThread is ignored.
None
In user-mode debugging, the PEB for the current thread is returned.
In kernel-mode debugging, if CurrentThread is NULL, the PEB for the operating system process in which the last event occurred is returned.
Headers: Defined in wdbgexts.h. If you are writing a WdbgExts extension, include wdbgexts.h. If you are writing a DbgEng extension that calls this function, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).