mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-14 10:28:15 +08:00
Fix inject side check
This commit is contained in:
@@ -193,8 +193,11 @@ DWORD __stdcall ThreadProc(LPVOID hInstance)
|
|||||||
// DLL entry point
|
// DLL entry point
|
||||||
BOOL __stdcall DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID lpReserved)
|
BOOL __stdcall DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
// check injectee
|
// Check injectee
|
||||||
if (!GetModuleHandleW(L"mhypbase.dll"))
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user