Core code you can write that:
HANDLE (WINAPI* _CreateMutexA)(__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes, __in BOOL bInitialOwner, __in_z_opt LPCSTR lpName) = CreateMutexA;
HANDLE WINAPI CreateMutexAHook(__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes, __in BOOL bInitialOwner,__in_opt LPCSTR lpName)
{
if (lpName != NULL)
{
if (!strcmpi(lpName, "WvsClientMtx"))
{
DWORD dwProcessID = GetCurrentProcessId();
char CharProcessID[100];
sprintf(CharProcessID,"_%d", dwProcessID);
return _CreateMutexA(lpMutexAttributes, bInitialOwner, strcat((LPSTR)lpName,CharProcessID));
}
return _CreateMutexA(lpMutexAttributes, bInitialOwner, lpName);
}
}
But this way didn't pass The HackShield detect
You will get 0x206 error
#define HS_ERR_ALREADY_GAME_STARTED 0x00000206 // 게임이 이미 실행 중입니다. 게임을 중복해서 실행할 수 없습니다.
回覆刪除