mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-09-20 21:06:22 +02:00
Windows Driver: correctly get KeRestoreExtendedProcessorState function pointer.
This commit is contained in:
parent
b0827e9b74
commit
384c5cc259
@ -129,10 +129,11 @@ NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||
// KeSaveExtendedProcessorState/KeRestoreExtendedProcessorState are available starting from Windows 7
|
||||
if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 1))
|
||||
{
|
||||
UNICODE_STRING funcName;
|
||||
RtlInitUnicodeString(&funcName, L"KeSaveExtendedProcessorState");
|
||||
KeSaveExtendedProcessorStatePtr = (KeSaveExtendedProcessorStateFn) MmGetSystemRoutineAddress(&funcName);
|
||||
KeRestoreExtendedProcessorStatePtr = (KeRestoreExtendedProcessorStateFn) MmGetSystemRoutineAddress(&funcName);
|
||||
UNICODE_STRING saveFuncName, restoreFuncName;
|
||||
RtlInitUnicodeString(&saveFuncName, L"KeSaveExtendedProcessorState");
|
||||
RtlInitUnicodeString(&restoreFuncName, L"KeRestoreExtendedProcessorState");
|
||||
KeSaveExtendedProcessorStatePtr = (KeSaveExtendedProcessorStateFn) MmGetSystemRoutineAddress(&saveFuncName);
|
||||
KeRestoreExtendedProcessorStatePtr = (KeRestoreExtendedProcessorStateFn) MmGetSystemRoutineAddress(&restoreFuncName);
|
||||
}
|
||||
|
||||
// Load dump filter if the main driver is already loaded
|
||||
|
Loading…
Reference in New Issue
Block a user