MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / GetProcessPeb

Function GetProcessPeb

WinSysCore/Processes.cpp:26–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26static bool GetProcessPeb(HANDLE hProcess, PPEB peb) {
27 PROCESS_BASIC_INFORMATION info;
28 if(!NT_SUCCESS(::NtQueryInformationProcess(hProcess,ProcessBasicInformation,&info,sizeof(info),nullptr)))
29 return false;
30
31 return ::ReadProcessMemory(hProcess, info.PebBaseAddress, peb, sizeof(*peb), nullptr);
32}
33
34static bool GetExtendedInfo(HANDLE hProcess, PROCESS_EXTENDED_BASIC_INFORMATION* info) {
35 ULONG len;

Callers 3

GetCurrentDirectoryMethod · 0.70
GetCmdLineMethod · 0.70
GetEnvironmentMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected