hook SetWindowsHookExA
This commit is contained in:
parent
2214751089
commit
242c40a197
4 changed files with 16 additions and 0 deletions
|
@ -38,6 +38,7 @@ ENABLEWINDOWPROC real_EnableWindow = EnableWindow;
|
|||
CREATEWINDOWEXAPROC real_CreateWindowExA = CreateWindowExA;
|
||||
DESTROYWINDOWPROC real_DestroyWindow = DestroyWindow;
|
||||
MAPWINDOWPOINTSPROC real_MapWindowPoints = MapWindowPoints;
|
||||
SETWINDOWSHOOKEXAPROC real_SetWindowsHookExA = SetWindowsHookExA;
|
||||
GETDEVICECAPSPROC real_GetDeviceCaps = GetDeviceCaps;
|
||||
LOADLIBRARYAPROC real_LoadLibraryA = LoadLibraryA;
|
||||
LOADLIBRARYWPROC real_LoadLibraryW = LoadLibraryW;
|
||||
|
@ -439,6 +440,7 @@ void hook_early_init()
|
|||
hook_patch_iat(GetModuleHandle(NULL), FALSE, "dinput.dll", "DirectInputCreateW", (PROC)fake_DirectInputCreateW);
|
||||
hook_patch_iat(GetModuleHandle(NULL), FALSE, "dinput.dll", "DirectInputCreateEx", (PROC)fake_DirectInputCreateEx);
|
||||
hook_patch_iat(GetModuleHandle(NULL), FALSE, "dinput8.dll", "DirectInput8Create", (PROC)fake_DirectInput8Create);
|
||||
hook_patch_iat(GetModuleHandle("AcGenral"), FALSE, "user32.dll", "SetWindowsHookExA", (PROC)fake_SetWindowsHookExA);
|
||||
}
|
||||
|
||||
void hook_exit()
|
||||
|
@ -491,4 +493,5 @@ void hook_exit()
|
|||
hook_patch_iat(GetModuleHandle(NULL), TRUE, "dinput.dll", "DirectInputCreateW", (PROC)fake_DirectInputCreateW);
|
||||
hook_patch_iat(GetModuleHandle(NULL), TRUE, "dinput.dll", "DirectInputCreateEx", (PROC)fake_DirectInputCreateEx);
|
||||
hook_patch_iat(GetModuleHandle(NULL), TRUE, "dinput8.dll", "DirectInput8Create", (PROC)fake_DirectInput8Create);
|
||||
hook_patch_iat(GetModuleHandle("AcGenral"), TRUE, "user32.dll", "SetWindowsHookExA", (PROC)fake_SetWindowsHookExA);
|
||||
}
|
||||
|
|
|
@ -364,6 +364,16 @@ int WINAPI fake_MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UI
|
|||
return real_MapWindowPoints(hWndFrom, hWndTo, lpPoints, cPoints);
|
||||
}
|
||||
|
||||
HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId)
|
||||
{
|
||||
if (idHook == WH_KEYBOARD_LL && hmod && GetModuleHandle("AcGenral") == hmod)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return real_SetWindowsHookExA(idHook, lpfn, hmod, dwThreadId);
|
||||
}
|
||||
|
||||
int WINAPI fake_GetDeviceCaps(HDC hdc, int index)
|
||||
{
|
||||
if (g_ddraw &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue