Fix inject side check

This commit is contained in:
DismissedLight
2025-01-20 11:08:04 +08:00
parent 6f1168e61e
commit c4856c821f

View File

@@ -193,8 +193,11 @@ DWORD __stdcall ThreadProc(LPVOID hInstance)
// DLL entry point
BOOL __stdcall DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID lpReserved)
{
// check injectee
if (!GetModuleHandleW(L"mhypbase.dll"))
// Check injectee
WCHAR szFileName[MAX_PATH]{};
DWORD length = 0;
GetModuleFileNameW(NULL, szFileName, MAX_PATH);
if (!(wcsstr(szFileName, L"YuanShen.exe") || wcsstr(szFileName, L"GenshinImpact.exe")))
{
return TRUE;
}