mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-04 13:25:36 +01:00
All: Fix crash when attempting to hook function on older OS builds
`RtlQueryFeatureConfiguration` is not available on old Windows 10 builds, like 17763 (LTSC 2019). Related issue: https://github.com/valinet/ExplorerPatcher/discussions/1142
This commit is contained in:
parent
8e9403cfb5
commit
6bc2ea5d2b
@ -10161,15 +10161,17 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RtlQueryFeatureConfigurationFunc = GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlQueryFeatureConfiguration");
|
RtlQueryFeatureConfigurationFunc = GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlQueryFeatureConfiguration");
|
||||||
rv = funchook_prepare(
|
if (RtlQueryFeatureConfigurationFunc) {
|
||||||
funchook,
|
rv = funchook_prepare(
|
||||||
(void**)&RtlQueryFeatureConfigurationFunc,
|
funchook,
|
||||||
RtlQueryFeatureConfigurationHook
|
(void**)&RtlQueryFeatureConfigurationFunc,
|
||||||
);
|
RtlQueryFeatureConfigurationHook
|
||||||
if (rv != 0)
|
);
|
||||||
{
|
if (rv != 0)
|
||||||
FreeLibraryAndExitThread(hModule, rv);
|
{
|
||||||
return FALSE;
|
FreeLibraryAndExitThread(hModule, rv);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
printf("Setup ntdll functions done\n");
|
printf("Setup ntdll functions done\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user