Browse Source

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.
pull/2331/head 22621.2361.58.4_acc0131
Amrsatrio 2 years ago
parent
commit
acc0131e77
  1. 11
      ExplorerPatcher/dllmain.c

11
ExplorerPatcher/dllmain.c

@ -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;

Loading…
Cancel
Save