GetCurrentProcessAddr function (wdbgexts.h)
The GetCurrentProcessAddr function returns the location of the system data that describes the current process.
void GetCurrentProcessAddr(
DWORD Processor,
ULONG64 CurrentThread,
PULONG64 Address
);
Processor
Specifies the index of the processor or virtual thread that was running the current thread when the last event occurred. Processor is only used in kernel-mode debugging; and, only if CurrentThread is NULL.
CurrentThread
Specifies the location of the system data for the current thread. This is the location returned by GetCurrentThreadAddr.
In kernel-mode debugging, CurrentThread can be NULL, in which case Processor is used instead.
Address
Receives the location of the system data that describes the current process.
None
In user-mode debugging, GetCurrentProcessAddr returns the location of the process's Process Environment Block (PEB). This is the same location that GetPebAddress returns.
In kernel-mode debugging, GetCurrentProcessAddr returns the location of the KPROCESS structure of the current process.
For details on the KPROCESS and PEB structures, see Microsoft Windows Internals by David Solomon and Mark Russinovich.
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | wdbgexts.h (include Wdbgexts.h, Dbgeng.h) |