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