1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-27 17:00:59 +01:00

All: Disabled hooks on processes other than Explorer

Because anticheats really hate DLLs that inject to games, let alone DLLs that hook existing functions. This was made as an attempt to fix #2267.
This commit is contained in:
Amrsatrio 2023-10-11 15:16:42 +07:00
parent 8412bd64d9
commit acc0131e77

View File

@ -10705,7 +10705,7 @@ DWORD Inject(BOOL bIsExplorer)
Explorer_RefreshUI(99); Explorer_RefreshUI(99);
#ifdef _WIN64 #ifdef _WIN64
// if (bIsExplorer) if (bIsExplorerProcess)
{ {
funchook = funchook_create(); funchook = funchook_create();
// printf("funchook create %d\n", funchook != 0); // printf("funchook create %d\n", funchook != 0);
@ -10890,10 +10890,13 @@ DWORD Inject(BOOL bIsExplorer)
if (!bIsExplorer) if (!bIsExplorer)
{ {
#ifdef _WIN64 #ifdef _WIN64
rv = funchook_install(funchook, 0); if (bIsExplorerProcess)
if (rv != 0)
{ {
printf("Failed to install hooks. rv = %d\n", rv); rv = funchook_install(funchook, 0);
if (rv != 0)
{
printf("Failed to install hooks. rv = %d\n", rv);
}
} }
#endif #endif
return 0; return 0;