Add PhGetProcessProtection
@@ -376,6 +376,22 @@ PhGetProcessConsoleHostProcessId(
return status;
}
+FORCEINLINE
+NTSTATUS
+PhGetProcessProtection(
+ _In_ HANDLE ProcessHandle,
+ _Out_ PPS_PROTECTION Protection
+ )
+{
+ return NtQueryInformationProcess(
+ ProcessHandle,
+ ProcessProtectionInformation,
+ Protection,
+ sizeof(PS_PROTECTION),
+ NULL
+ );
+}
+
FORCEINLINE
NTSTATUS
PhGetProcessIsCFGuardEnabled(
