ProcessHandle2PPID()

Example Code

function ProcessHandle2PPID(const hProcess: THandle): DWORD; stdcall; // Retrieves the parent process identifier (ID) of the target process handle var dwProcessId: DWORD; begin dwProcessId := ProcessHandle2PPID(GetCurrentProcess()); ShowMessage(Format('My parent''s Process Id is %u', [dwProcessId])); end;