Changeset 105786 in vbox for trunk/src/VBox/Runtime/r3/win/system-get-nt-xxx-win.cpp
- Timestamp:
- Aug 21, 2024 5:27:35 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/system-get-nt-xxx-win.cpp
r98103 r105786 43 43 44 44 #include "internal-r3-win.h" 45 #include "internal-r3-registry-win.h" 45 46 #include <iprt/system.h> 46 47 #include <iprt/assert.h> 48 #include <iprt/err.h> 47 49 48 50 … … 67 69 } 68 70 71 72 RTDECL(int) RTSystemQueryNtFeatureEnabled(RTSYSNTFEATURE enmFeature, bool *pfEnabled) 73 { 74 AssertPtrReturn(pfEnabled, VERR_INVALID_POINTER); 75 76 int rc; 77 78 switch (enmFeature) 79 { 80 case RTSYSNTFEATURE_CORE_ISOLATION_MEMORY_INTEGRITY: /* aka Code Integrity */ 81 { 82 DWORD dwEnabled; 83 rc = RTSystemWinRegistryQueryDWORD(HKEY_LOCAL_MACHINE, 84 "SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity", 85 "Enabled", &dwEnabled); 86 if (RT_SUCCESS(rc)) 87 *pfEnabled = RT_BOOL(dwEnabled); 88 else if (rc == VERR_FILE_NOT_FOUND) 89 rc = VERR_NOT_SUPPORTED; 90 break; 91 } 92 93 default: 94 rc = VERR_NOT_IMPLEMENTED; 95 break; 96 } 97 98 return rc; 99 } 100
Note:
See TracChangeset
for help on using the changeset viewer.