Cs2 oyunun Mutex kodu ama c++ bilmediğim için işleyişini bilmiyorum bunu proje haline getirip paylaşabilecek baba yiğit lazım 🙂
Code:
1 typedef __int64(Plat_CreateGameInstanceMutex_t)();
2 Plat_CreateGameInstanceMutex_t original_Plat_CreateGameInstanceMutex = nullptr;
3 __int64 WINAPI Hooked_Plat_CreateGameInstanceMutex() {
4 return 1;
5 }
6 HMODULE tier0 = GetModuleHandleA("tier0.dll");
7 void pCreateGameInstanceMutex = reinterpret_cast<void*>(GetProcAddress(tier0, "Plat_CreateGameInstanceMutex"));
8
9 MH_CreateHook(pCreateGameInstanceMutex, &Hooked_Plat_CreateGameInstanceMutex, reinterpret_cast<void**>(&original_Plat_CreateGameInstanceMutex))
10 MH_EnableHook(pCreateGameInstanceMutex)