2024-03-20 00:45:04 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
|
|
* PURPOSE: Defining kernel-to-user32 callbacks
|
|
|
|
* COPYRIGHT: Copyright 2018 James Tabor <james.tabor@reactos.org>
|
|
|
|
* Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define DEFINE_USER32_CALLBACK(id, value, fn) id,
|
|
|
|
|
|
|
|
typedef enum _USER32_CALLBACK
|
|
|
|
{
|
|
|
|
#include "u32cb.h"
|
|
|
|
USER32_CALLBACK_COUNT
|
|
|
|
} USER32_CALLBACK;
|
|
|
|
|
|
|
|
#undef DEFINE_USER32_CALLBACK
|
2002-01-27 01:11:24 +00:00
|
|
|
|
|
|
|
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
WNDPROC Proc;
|
2003-12-26 22:52:12 +00:00
|
|
|
BOOL IsAnsiProc;
|
2002-01-27 01:11:24 +00:00
|
|
|
HWND Wnd;
|
|
|
|
UINT Msg;
|
|
|
|
WPARAM wParam;
|
|
|
|
LPARAM lParam;
|
2003-12-26 22:52:12 +00:00
|
|
|
INT lParamBufferSize;
|
|
|
|
LRESULT Result;
|
|
|
|
/* char Buffer[]; */
|
2002-01-27 01:11:24 +00:00
|
|
|
} WINDOWPROC_CALLBACK_ARGUMENTS, *PWINDOWPROC_CALLBACK_ARGUMENTS;
|
|
|
|
|
2002-05-06 22:20:32 +00:00
|
|
|
typedef struct _SENDASYNCPROC_CALLBACK_ARGUMENTS
|
|
|
|
{
|
2002-07-04 19:56:38 +00:00
|
|
|
SENDASYNCPROC Callback;
|
2002-05-06 22:20:32 +00:00
|
|
|
HWND Wnd;
|
|
|
|
UINT Msg;
|
2002-07-04 19:56:38 +00:00
|
|
|
ULONG_PTR Context;
|
2002-05-06 22:20:32 +00:00
|
|
|
LRESULT Result;
|
|
|
|
} SENDASYNCPROC_CALLBACK_ARGUMENTS, *PSENDASYNCPROC_CALLBACK_ARGUMENTS;
|
|
|
|
|
2010-05-30 06:23:41 +00:00
|
|
|
typedef struct _CALL_BACK_INFO
|
|
|
|
{
|
|
|
|
SENDASYNCPROC CallBack;
|
|
|
|
ULONG_PTR Context;
|
|
|
|
} CALL_BACK_INFO, * PCALL_BACK_INFO;
|
|
|
|
|
|
|
|
|
2003-12-12 14:22:37 +00:00
|
|
|
typedef struct _HOOKPROC_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
INT HookId;
|
|
|
|
INT Code;
|
|
|
|
WPARAM wParam;
|
|
|
|
LPARAM lParam;
|
|
|
|
HOOKPROC Proc;
|
2013-10-05 19:57:22 +00:00
|
|
|
INT Mod;
|
|
|
|
ULONG_PTR offPfn;
|
2003-12-12 14:22:37 +00:00
|
|
|
BOOLEAN Ansi;
|
2013-12-09 01:55:48 +00:00
|
|
|
LRESULT Result;
|
2020-03-28 19:18:14 +00:00
|
|
|
UINT lParamSize;
|
2013-10-05 19:57:22 +00:00
|
|
|
WCHAR ModuleName[512];
|
2003-12-12 14:22:37 +00:00
|
|
|
} HOOKPROC_CALLBACK_ARGUMENTS, *PHOOKPROC_CALLBACK_ARGUMENTS;
|
|
|
|
|
|
|
|
typedef struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
|
|
|
|
{
|
|
|
|
CREATESTRUCTW Cs; /* lpszName and lpszClass replaced by offsets */
|
|
|
|
HWND WndInsertAfter;
|
|
|
|
/* WCHAR szName[] */
|
|
|
|
/* WCHAR szClass[] */
|
|
|
|
} HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS, *PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS;
|
|
|
|
|
2020-03-28 19:18:14 +00:00
|
|
|
typedef struct tagCWP_Struct
|
|
|
|
{
|
|
|
|
HOOKPROC_CALLBACK_ARGUMENTS hpca;
|
|
|
|
CWPSTRUCT cwps;
|
|
|
|
PBYTE Extra[4];
|
|
|
|
} CWP_Struct, *PCWP_Struct;
|
|
|
|
|
|
|
|
typedef struct tagCWPR_Struct
|
|
|
|
{
|
|
|
|
HOOKPROC_CALLBACK_ARGUMENTS hpca;
|
|
|
|
CWPRETSTRUCT cwprs;
|
|
|
|
PBYTE Extra[4];
|
|
|
|
} CWPR_Struct, *PCWPR_Struct;
|
|
|
|
|
2008-04-17 01:48:34 +00:00
|
|
|
typedef struct _EVENTPROC_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
HWINEVENTHOOK hook;
|
|
|
|
DWORD event;
|
|
|
|
HWND hwnd;
|
|
|
|
LONG idObject;
|
|
|
|
LONG idChild;
|
|
|
|
DWORD dwEventThread;
|
|
|
|
DWORD dwmsEventTime;
|
|
|
|
WINEVENTPROC Proc;
|
2018-03-18 14:53:52 +00:00
|
|
|
INT_PTR Mod;
|
2015-02-16 03:32:46 +00:00
|
|
|
ULONG_PTR offPfn;
|
2008-04-17 01:48:34 +00:00
|
|
|
} EVENTPROC_CALLBACK_ARGUMENTS, *PEVENTPROC_CALLBACK_ARGUMENTS;
|
|
|
|
|
2009-07-22 04:11:06 +00:00
|
|
|
typedef struct _LOADMENU_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
HINSTANCE hModule;
|
2014-05-20 03:40:42 +00:00
|
|
|
LPCWSTR InterSource;
|
2009-07-22 04:11:06 +00:00
|
|
|
WCHAR MenuName[1];
|
|
|
|
} LOADMENU_CALLBACK_ARGUMENTS, *PLOADMENU_CALLBACK_ARGUMENTS;
|
|
|
|
|
2013-10-09 01:11:44 +00:00
|
|
|
typedef struct _COPYIMAGE_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
HANDLE hImage;
|
|
|
|
UINT uType;
|
|
|
|
int cxDesired;
|
|
|
|
int cyDesired;
|
|
|
|
UINT fuFlags;
|
|
|
|
} COPYIMAGE_CALLBACK_ARGUMENTS, *PCOPYIMAGE_CALLBACK_ARGUMENTS;
|
|
|
|
|
2011-09-18 13:12:44 +00:00
|
|
|
typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTS
|
|
|
|
{
|
|
|
|
UNICODE_STRING strLibraryName;
|
|
|
|
UNICODE_STRING strInitFuncName;
|
|
|
|
BOOL Unload;
|
|
|
|
BOOL ApiHook;
|
|
|
|
} CLIENT_LOAD_LIBRARY_ARGUMENTS, *PCLIENT_LOAD_LIBRARY_ARGUMENTS;
|
|
|
|
|
2012-07-04 23:16:17 +00:00
|
|
|
typedef struct _GET_CHARSET_INFO
|
|
|
|
{
|
|
|
|
LCID Locale;
|
|
|
|
CHARSETINFO Cs;
|
|
|
|
} GET_CHARSET_INFO, *PGET_CHARSET_INFO;
|
|
|
|
|
2013-10-11 21:46:30 +00:00
|
|
|
typedef struct _SETWNDICONS_CALLBACK_ARGUMENTS
|
|
|
|
{
|
2015-02-05 00:11:35 +00:00
|
|
|
HICON hIconSample;
|
|
|
|
HICON hIconHand;
|
|
|
|
HICON hIconQuestion;
|
|
|
|
HICON hIconBang;
|
|
|
|
HICON hIconNote;
|
2013-10-11 21:46:30 +00:00
|
|
|
HICON hIconWindows;
|
2015-02-05 00:11:35 +00:00
|
|
|
HICON hIconSmWindows;
|
2013-10-11 21:46:30 +00:00
|
|
|
} SETWNDICONS_CALLBACK_ARGUMENTS, *PSETWNDICONS_CALLBACK_ARGUMENTS;
|
|
|
|
|
2015-01-08 00:56:51 +00:00
|
|
|
typedef struct _DDEPOSTGET_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
INT Type;
|
|
|
|
MSG;
|
|
|
|
int size;
|
2015-01-08 22:57:09 +00:00
|
|
|
PVOID pvData;
|
2015-01-08 00:56:51 +00:00
|
|
|
BYTE buffer[1];
|
|
|
|
} DDEPOSTGET_CALLBACK_ARGUMENTS, *PDDEPOSTGET_CALLBACK_ARGUMENTS;
|
|
|
|
|
2015-08-06 00:56:01 +00:00
|
|
|
typedef struct _SETOBM_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
struct tagOEMBITMAPINFO oembmi[93];
|
|
|
|
} SETOBM_CALLBACK_ARGUMENTS, *PSETOBM_CALLBACK_ARGUMENTS;
|
|
|
|
|
2018-08-23 17:43:12 +00:00
|
|
|
typedef struct _LPK_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
LPWSTR lpString;
|
|
|
|
HDC hdc;
|
|
|
|
INT x;
|
|
|
|
INT y;
|
|
|
|
UINT flags;
|
|
|
|
RECT rect;
|
|
|
|
UINT count;
|
|
|
|
BOOL bRect;
|
|
|
|
} LPK_CALLBACK_ARGUMENTS, *PLPK_CALLBACK_ARGUMENTS;
|
|
|
|
|
2022-02-11 23:32:13 +00:00
|
|
|
typedef struct _IMMPROCESSKEY_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
HWND hWnd;
|
|
|
|
HKL hKL;
|
|
|
|
UINT vKey;
|
|
|
|
LPARAM lParam;
|
|
|
|
DWORD dwHotKeyID;
|
|
|
|
} IMMPROCESSKEY_CALLBACK_ARGUMENTS, *PIMMPROCESSKEY_CALLBACK_ARGUMENTS;
|
|
|
|
|
2022-09-04 23:34:00 +00:00
|
|
|
typedef struct _IMMLOADLAYOUT_CALLBACK_ARGUMENTS
|
|
|
|
{
|
|
|
|
HKL hKL;
|
|
|
|
} IMMLOADLAYOUT_CALLBACK_ARGUMENTS, *PIMMLOADLAYOUT_CALLBACK_ARGUMENTS;
|
|
|
|
|
|
|
|
typedef struct _IMMLOADLAYOUT_CALLBACK_OUTPUT
|
|
|
|
{
|
|
|
|
BOOL ret;
|
|
|
|
IMEINFOEX iiex;
|
|
|
|
} IMMLOADLAYOUT_CALLBACK_OUTPUT, *PIMMLOADLAYOUT_CALLBACK_OUTPUT;
|
|
|
|
|
2013-10-09 01:11:44 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallCopyImageFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2013-10-11 21:46:30 +00:00
|
|
|
User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
|
|
|
NTSTATUS WINAPI
|
2002-01-27 01:11:24 +00:00
|
|
|
User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2002-05-06 22:20:32 +00:00
|
|
|
User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2003-08-21 20:29:44 +00:00
|
|
|
User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2003-08-29 08:46:20 +00:00
|
|
|
User32SetupDefaultCursors(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2003-12-12 14:22:37 +00:00
|
|
|
User32CallHookProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2008-11-30 11:42:05 +00:00
|
|
|
NTSTATUS WINAPI
|
2008-04-17 01:48:34 +00:00
|
|
|
User32CallEventProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2009-07-22 04:11:06 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2009-08-17 00:30:25 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2011-09-18 13:12:44 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallClientLoadLibraryFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2012-07-04 23:16:17 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallGetCharsetInfo(PVOID Arguments, ULONG ArgumentLength);
|
2014-12-18 23:45:11 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32DeliverUserAPC(PVOID Arguments, ULONG ArgumentLength);
|
2015-01-08 00:56:51 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallDDEPostFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallDDEGetFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2015-08-06 00:56:01 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallOBMFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2018-08-23 17:43:12 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallLPKFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2019-06-21 18:10:03 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallUMPDFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2022-02-11 23:32:13 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallImmProcessKeyFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
2022-09-04 23:34:00 +00:00
|
|
|
NTSTATUS WINAPI
|
|
|
|
User32CallImmLoadLayoutFromKernel(PVOID Arguments, ULONG ArgumentLength);
|