hook GetForegroundWindow

This commit is contained in:
FunkyFr3sh 2022-10-19 05:08:22 +02:00
parent 876160cbb6
commit 24d66d8a30
6 changed files with 19 additions and 4 deletions

View file

@ -9,7 +9,7 @@
#define SKIP_HOOK3 0x00000002l
typedef struct HOOKLISTDATA { char function_name[32]; PROC new_function; PROC* function; DWORD flags; } HOOKLISTDATA;
typedef struct HOOKLIST { char module_name[32]; HOOKLISTDATA data[25]; } HOOKLIST;
typedef struct HOOKLIST { char module_name[32]; HOOKLISTDATA data[26]; } HOOKLIST;
typedef BOOL(WINAPI* GETCURSORPOSPROC)(LPPOINT);
typedef BOOL(WINAPI* CLIPCURSORPROC)(const RECT*);
@ -35,6 +35,7 @@ typedef BOOL(WINAPI* DESTROYWINDOWPROC)(HWND);
typedef int (WINAPI* MAPWINDOWPOINTSPROC)(HWND, HWND, LPPOINT, UINT);
typedef BOOL (WINAPI* SHOWWINDOWPROC)(HWND, int);
typedef HWND(WINAPI* GETTOPWINDOWPROC)(HWND);
typedef HWND(WINAPI* GETFOREGROUNDWINDOWPROC)();
typedef BOOL(WINAPI* STRETCHBLTPROC)(HDC, int, int, int, int, HDC, int, int, int, int, DWORD);
typedef int (WINAPI* SETDIBITSTODEVICEPROC)(
@ -76,6 +77,7 @@ extern DESTROYWINDOWPROC real_DestroyWindow;
extern MAPWINDOWPOINTSPROC real_MapWindowPoints;
extern SHOWWINDOWPROC real_ShowWindow;
extern GETTOPWINDOWPROC real_GetTopWindow;
extern GETFOREGROUNDWINDOWPROC real_GetForegroundWindow;
extern STRETCHBLTPROC real_StretchBlt;
extern SETDIBITSTODEVICEPROC real_SetDIBitsToDevice;
extern STRETCHDIBITSPROC real_StretchDIBits;

View file

@ -28,6 +28,7 @@ BOOL WINAPI fake_DestroyWindow(HWND hWnd);
int WINAPI fake_MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints);
BOOL WINAPI fake_ShowWindow(HWND hWnd, int nCmdShow);
HWND WINAPI fake_GetTopWindow(HWND hWnd);
HWND WINAPI fake_GetForegroundWindow(void);
HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId);
int WINAPI fake_GetDeviceCaps(HDC hdc, int index);