MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / QueryWow64PebAddress

Function QueryWow64PebAddress

src/OSTPlatform/Windows/Process.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100std::optional<ULONG_PTR> QueryWow64PebAddress(HANDLE process) {
101 const auto ntQueryInformationProcess = NtQueryInformationProcessProc();
102 if (!ntQueryInformationProcess) return std::nullopt;
103
104 ULONG_PTR peb32 = 0;
105 const NTSTATUS status = ntQueryInformationProcess(
106 process,
107 NtAbi::ProcessInfoClass::Wow64Information,
108 &peb32,
109 sizeof(peb32),
110 nullptr);
111 if (!NtAbi::NtSuccess(status) || peb32 == 0) return std::nullopt;
112 return peb32;
113}
114
115std::optional<PVOID> QueryNativeEnvironmentAddress(HANDLE process) {
116 const auto pebAddress = QueryNativePebAddress(process);

Callers 1

Calls 2

NtSuccessFunction · 0.85

Tested by

no test coverage detected