GetProcessIntegrityLevel()

Example Code

type PROCESS_INTEGRITY_LEVEL = (IL_UNTRUSTED, IL_LOW, IL_MEDIUM, IL_HIGH, IL_SYSTEM, IL_PROTECTED, IL_UNKNOWN); function GetProcessIntegrityLevel(const dwProcessId: DWORD): PROCESS_INTEGRITY_LEVEL; stdcall; // Returns the Integrity Level of the target process const IntegrityLevel: Array [0..6] of String = ('Untrusted', 'Low', 'Medium', 'High', 'System', 'Protected', 'Unknown'); var pIL: PROCESS_INTEGRITY_LEVEL; dwProcessId: DWORD; begin dwProcessId := GetCurrentProcessId(); pIL := GetProcessIntegrityLevel(dwProcessId); ShowMessageFmt('Integrity Level of Process %u: [%s]', [dwProcessId, IntegrityLevel[Ord(pIL)]]); end;