| 229 | } |
| 230 | |
| 231 | DWORD_PTR CProcessFunctions::GetParentProcessIdNative(HANDLE hProcess) |
| 232 | { |
| 233 | PROCESS_BASIC_INFORMATION pPBI = { 0 }; |
| 234 | auto ntStat = g_winapiApiTable->NtQueryInformationProcess(hProcess, ProcessBasicInformation, &pPBI, sizeof(pPBI), 0); |
| 235 | if (!NT_SUCCESS(ntStat)) |
| 236 | { |
| 237 | DEBUG_LOG(LL_ERR, "NtQueryInformationProcess fail! Target process: %p Status: %p", hProcess, ntStat); |
| 238 | return 0UL; |
| 239 | } |
| 240 | |
| 241 | return reinterpret_cast<DWORD_PTR>(pPBI.InheritedFromUniqueProcessId); |
| 242 | } |
| 243 | |
| 244 | std::string CProcessFunctions::GetParentProcessName(DWORD dwCurrPID) |
| 245 | { |
nothing calls this directly
no outgoing calls
no test coverage detected