OpenProcessMax()

Example Code

function OpenProcessMax(const dwProcessId: DWORD): THandle; stdcall; // Arg1 process identifier (ID) to open a maxixum rights handle to var hProcess: THandle; begin hProcess := OpenProcessMax(GetCurrentProcessId()); if (hProcess <> 0) then begin ShowMessage('Process opened with maximum handle rights'); CloseHandle(hProcess); end; end;