| 1 | #include "PPLHelp.h" |
| 2 | |
| 3 | DWORD PPLProcessCreator::GetPPLProtectionLevel(DWORD processId) |
| 4 | { |
| 5 | DWORD protectionLevel = 0; |
| 6 | HANDLE hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, processId); |
| 7 | |
| 8 | if (hProcess) |
| 9 | { |
| 10 | PROCESS_PROTECTION_LEVEL_INFORMATION protectionInfo; |
| 11 | DWORD returnLength = 0; |
| 12 | |
| 13 | if (GetProcessInformation(hProcess, ProcessProtectionLevelInfo, |
| 14 | &protectionInfo, sizeof(protectionInfo))) |
| 15 | { |
| 16 | protectionLevel = protectionInfo.ProtectionLevel; |
| 17 | } |
| 18 | |
| 19 | CloseHandle(hProcess); |
| 20 | } |
| 21 | |
| 22 | return protectionLevel; |
| 23 | } |
| 24 | std::wstring PPLProcessCreator::GetPPLProtectionLevelName(DWORD protectionLevel) |
| 25 | { |
| 26 | switch (protectionLevel) |
nothing calls this directly
no outgoing calls
no test coverage detected