ReactOS 0.4.15-dev-5664-g3bf4ef6
callback.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _WINDOWPROC_CALLBACK_ARGUMENTS
 
struct  _SENDASYNCPROC_CALLBACK_ARGUMENTS
 
struct  _CALL_BACK_INFO
 
struct  _HOOKPROC_CALLBACK_ARGUMENTS
 
struct  _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
 
struct  tagCWP_Struct
 
struct  tagCWPR_Struct
 
struct  _EVENTPROC_CALLBACK_ARGUMENTS
 
struct  _LOADMENU_CALLBACK_ARGUMENTS
 
struct  _COPYIMAGE_CALLBACK_ARGUMENTS
 
struct  _CLIENT_LOAD_LIBRARY_ARGUMENTS
 
struct  _GET_CHARSET_INFO
 
struct  _SETWNDICONS_CALLBACK_ARGUMENTS
 
struct  _DDEPOSTGET_CALLBACK_ARGUMENTS
 
struct  _SETOBM_CALLBACK_ARGUMENTS
 
struct  _LPK_CALLBACK_ARGUMENTS
 
struct  _IMMPROCESSKEY_CALLBACK_ARGUMENTS
 
struct  _IMMLOADLAYOUT_CALLBACK_ARGUMENTS
 
struct  _IMMLOADLAYOUT_CALLBACK_OUTPUT
 

Macros

#define USER32_CALLBACK_WINDOWPROC   (0)
 
#define USER32_CALLBACK_SENDASYNCPROC   (1)
 
#define USER32_CALLBACK_LOADSYSMENUTEMPLATE   (2)
 
#define USER32_CALLBACK_LOADDEFAULTCURSORS   (3)
 
#define USER32_CALLBACK_HOOKPROC   (4)
 
#define USER32_CALLBACK_EVENTPROC   (5)
 
#define USER32_CALLBACK_LOADMENU   (6)
 
#define USER32_CALLBACK_CLIENTTHREADSTARTUP   (7)
 
#define USER32_CALLBACK_CLIENTLOADLIBRARY   (8)
 
#define USER32_CALLBACK_GETCHARSETINFO   (9)
 
#define USER32_CALLBACK_COPYIMAGE   (10)
 
#define USER32_CALLBACK_SETWNDICONS   (11)
 
#define USER32_CALLBACK_DELIVERUSERAPC   (12)
 
#define USER32_CALLBACK_DDEPOST   (13)
 
#define USER32_CALLBACK_DDEGET   (14)
 
#define USER32_CALLBACK_SETOBM   (15)
 
#define USER32_CALLBACK_LPK   (16)
 
#define USER32_CALLBACK_UMPD   (17)
 
#define USER32_CALLBACK_IMMPROCESSKEY   (18)
 
#define USER32_CALLBACK_IMMLOADLAYOUT   (19)
 
#define USER32_CALLBACK_MAXIMUM   USER32_CALLBACK_IMMLOADLAYOUT
 

Typedefs

typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS WINDOWPROC_CALLBACK_ARGUMENTS
 
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTSPWINDOWPROC_CALLBACK_ARGUMENTS
 
typedef struct _SENDASYNCPROC_CALLBACK_ARGUMENTS SENDASYNCPROC_CALLBACK_ARGUMENTS
 
typedef struct _SENDASYNCPROC_CALLBACK_ARGUMENTSPSENDASYNCPROC_CALLBACK_ARGUMENTS
 
typedef struct _CALL_BACK_INFO CALL_BACK_INFO
 
typedef struct _CALL_BACK_INFOPCALL_BACK_INFO
 
typedef struct _HOOKPROC_CALLBACK_ARGUMENTS HOOKPROC_CALLBACK_ARGUMENTS
 
typedef struct _HOOKPROC_CALLBACK_ARGUMENTSPHOOKPROC_CALLBACK_ARGUMENTS
 
typedef struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
 
typedef struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTSPHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
 
typedef struct tagCWP_Struct CWP_Struct
 
typedef struct tagCWP_StructPCWP_Struct
 
typedef struct tagCWPR_Struct CWPR_Struct
 
typedef struct tagCWPR_StructPCWPR_Struct
 
typedef struct _EVENTPROC_CALLBACK_ARGUMENTS EVENTPROC_CALLBACK_ARGUMENTS
 
typedef struct _EVENTPROC_CALLBACK_ARGUMENTSPEVENTPROC_CALLBACK_ARGUMENTS
 
typedef struct _LOADMENU_CALLBACK_ARGUMENTS LOADMENU_CALLBACK_ARGUMENTS
 
typedef struct _LOADMENU_CALLBACK_ARGUMENTSPLOADMENU_CALLBACK_ARGUMENTS
 
typedef struct _COPYIMAGE_CALLBACK_ARGUMENTS COPYIMAGE_CALLBACK_ARGUMENTS
 
typedef struct _COPYIMAGE_CALLBACK_ARGUMENTSPCOPYIMAGE_CALLBACK_ARGUMENTS
 
typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTS CLIENT_LOAD_LIBRARY_ARGUMENTS
 
typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTSPCLIENT_LOAD_LIBRARY_ARGUMENTS
 
typedef struct _GET_CHARSET_INFO GET_CHARSET_INFO
 
typedef struct _GET_CHARSET_INFOPGET_CHARSET_INFO
 
typedef struct _SETWNDICONS_CALLBACK_ARGUMENTS SETWNDICONS_CALLBACK_ARGUMENTS
 
typedef struct _SETWNDICONS_CALLBACK_ARGUMENTSPSETWNDICONS_CALLBACK_ARGUMENTS
 
typedef struct _DDEPOSTGET_CALLBACK_ARGUMENTS DDEPOSTGET_CALLBACK_ARGUMENTS
 
typedef struct _DDEPOSTGET_CALLBACK_ARGUMENTSPDDEPOSTGET_CALLBACK_ARGUMENTS
 
typedef struct _SETOBM_CALLBACK_ARGUMENTS SETOBM_CALLBACK_ARGUMENTS
 
typedef struct _SETOBM_CALLBACK_ARGUMENTSPSETOBM_CALLBACK_ARGUMENTS
 
typedef struct _LPK_CALLBACK_ARGUMENTS LPK_CALLBACK_ARGUMENTS
 
typedef struct _LPK_CALLBACK_ARGUMENTSPLPK_CALLBACK_ARGUMENTS
 
typedef struct _IMMPROCESSKEY_CALLBACK_ARGUMENTS IMMPROCESSKEY_CALLBACK_ARGUMENTS
 
typedef struct _IMMPROCESSKEY_CALLBACK_ARGUMENTSPIMMPROCESSKEY_CALLBACK_ARGUMENTS
 
typedef struct _IMMLOADLAYOUT_CALLBACK_ARGUMENTS IMMLOADLAYOUT_CALLBACK_ARGUMENTS
 
typedef struct _IMMLOADLAYOUT_CALLBACK_ARGUMENTSPIMMLOADLAYOUT_CALLBACK_ARGUMENTS
 
typedef struct _IMMLOADLAYOUT_CALLBACK_OUTPUT IMMLOADLAYOUT_CALLBACK_OUTPUT
 
typedef struct _IMMLOADLAYOUT_CALLBACK_OUTPUTPIMMLOADLAYOUT_CALLBACK_OUTPUT
 

Functions

NTSTATUS WINAPI User32CallCopyImageFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallSetWndIconsFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallWindowProcFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallSendAsyncProcForKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32LoadSysMenuTemplateForKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32SetupDefaultCursors (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallHookProcFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallEventProcFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallLoadMenuFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallClientThreadSetupFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallClientLoadLibraryFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallGetCharsetInfo (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32DeliverUserAPC (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallDDEPostFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallDDEGetFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallOBMFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallLPKFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallUMPDFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallImmProcessKeyFromKernel (PVOID Arguments, ULONG ArgumentLength)
 
NTSTATUS WINAPI User32CallImmLoadLayoutFromKernel (PVOID Arguments, ULONG ArgumentLength)
 

Macro Definition Documentation

◆ USER32_CALLBACK_CLIENTLOADLIBRARY

#define USER32_CALLBACK_CLIENTLOADLIBRARY   (8)

Definition at line 12 of file callback.h.

◆ USER32_CALLBACK_CLIENTTHREADSTARTUP

#define USER32_CALLBACK_CLIENTTHREADSTARTUP   (7)

Definition at line 11 of file callback.h.

◆ USER32_CALLBACK_COPYIMAGE

#define USER32_CALLBACK_COPYIMAGE   (10)

Definition at line 14 of file callback.h.

◆ USER32_CALLBACK_DDEGET

#define USER32_CALLBACK_DDEGET   (14)

Definition at line 18 of file callback.h.

◆ USER32_CALLBACK_DDEPOST

#define USER32_CALLBACK_DDEPOST   (13)

Definition at line 17 of file callback.h.

◆ USER32_CALLBACK_DELIVERUSERAPC

#define USER32_CALLBACK_DELIVERUSERAPC   (12)

Definition at line 16 of file callback.h.

◆ USER32_CALLBACK_EVENTPROC

#define USER32_CALLBACK_EVENTPROC   (5)

Definition at line 9 of file callback.h.

◆ USER32_CALLBACK_GETCHARSETINFO

#define USER32_CALLBACK_GETCHARSETINFO   (9)

Definition at line 13 of file callback.h.

◆ USER32_CALLBACK_HOOKPROC

#define USER32_CALLBACK_HOOKPROC   (4)

Definition at line 8 of file callback.h.

◆ USER32_CALLBACK_IMMLOADLAYOUT

#define USER32_CALLBACK_IMMLOADLAYOUT   (19)

Definition at line 23 of file callback.h.

◆ USER32_CALLBACK_IMMPROCESSKEY

#define USER32_CALLBACK_IMMPROCESSKEY   (18)

Definition at line 22 of file callback.h.

◆ USER32_CALLBACK_LOADDEFAULTCURSORS

#define USER32_CALLBACK_LOADDEFAULTCURSORS   (3)

Definition at line 7 of file callback.h.

◆ USER32_CALLBACK_LOADMENU

#define USER32_CALLBACK_LOADMENU   (6)

Definition at line 10 of file callback.h.

◆ USER32_CALLBACK_LOADSYSMENUTEMPLATE

#define USER32_CALLBACK_LOADSYSMENUTEMPLATE   (2)

Definition at line 6 of file callback.h.

◆ USER32_CALLBACK_LPK

#define USER32_CALLBACK_LPK   (16)

Definition at line 20 of file callback.h.

◆ USER32_CALLBACK_MAXIMUM

#define USER32_CALLBACK_MAXIMUM   USER32_CALLBACK_IMMLOADLAYOUT

Definition at line 24 of file callback.h.

◆ USER32_CALLBACK_SENDASYNCPROC

#define USER32_CALLBACK_SENDASYNCPROC   (1)

Definition at line 5 of file callback.h.

◆ USER32_CALLBACK_SETOBM

#define USER32_CALLBACK_SETOBM   (15)

Definition at line 19 of file callback.h.

◆ USER32_CALLBACK_SETWNDICONS

#define USER32_CALLBACK_SETWNDICONS   (11)

Definition at line 15 of file callback.h.

◆ USER32_CALLBACK_UMPD

#define USER32_CALLBACK_UMPD   (17)

Definition at line 21 of file callback.h.

◆ USER32_CALLBACK_WINDOWPROC

#define USER32_CALLBACK_WINDOWPROC   (0)

Definition at line 4 of file callback.h.

Typedef Documentation

◆ CALL_BACK_INFO

◆ CLIENT_LOAD_LIBRARY_ARGUMENTS

◆ COPYIMAGE_CALLBACK_ARGUMENTS

◆ CWP_Struct

◆ CWPR_Struct

◆ DDEPOSTGET_CALLBACK_ARGUMENTS

◆ EVENTPROC_CALLBACK_ARGUMENTS

◆ GET_CHARSET_INFO

◆ HOOKPROC_CALLBACK_ARGUMENTS

◆ HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS

◆ IMMLOADLAYOUT_CALLBACK_ARGUMENTS

◆ IMMLOADLAYOUT_CALLBACK_OUTPUT

◆ IMMPROCESSKEY_CALLBACK_ARGUMENTS

◆ LOADMENU_CALLBACK_ARGUMENTS

◆ LPK_CALLBACK_ARGUMENTS

◆ PCALL_BACK_INFO

◆ PCLIENT_LOAD_LIBRARY_ARGUMENTS

◆ PCOPYIMAGE_CALLBACK_ARGUMENTS

◆ PCWP_Struct

◆ PCWPR_Struct

◆ PDDEPOSTGET_CALLBACK_ARGUMENTS

◆ PEVENTPROC_CALLBACK_ARGUMENTS

◆ PGET_CHARSET_INFO

◆ PHOOKPROC_CALLBACK_ARGUMENTS

◆ PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS

◆ PIMMLOADLAYOUT_CALLBACK_ARGUMENTS

◆ PIMMLOADLAYOUT_CALLBACK_OUTPUT

◆ PIMMPROCESSKEY_CALLBACK_ARGUMENTS

◆ PLOADMENU_CALLBACK_ARGUMENTS

◆ PLPK_CALLBACK_ARGUMENTS

◆ PSENDASYNCPROC_CALLBACK_ARGUMENTS

◆ PSETOBM_CALLBACK_ARGUMENTS

◆ PSETWNDICONS_CALLBACK_ARGUMENTS

◆ PWINDOWPROC_CALLBACK_ARGUMENTS

◆ SENDASYNCPROC_CALLBACK_ARGUMENTS

◆ SETOBM_CALLBACK_ARGUMENTS

◆ SETWNDICONS_CALLBACK_ARGUMENTS

◆ WINDOWPROC_CALLBACK_ARGUMENTS

Function Documentation

◆ User32CallClientLoadLibraryFromKernel()

NTSTATUS WINAPI User32CallClientLoadLibraryFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 528 of file hook.c.

529{
530 BOOL bResult;
532
533 /* Retireve the callback parameters */
534 Argument = (PCLIENT_LOAD_LIBRARY_ARGUMENTS)Arguments;
535 if(Argument->strLibraryName.Buffer != NULL)
536 {
537 Argument->strLibraryName.Buffer = (PWCHAR)((ULONG_PTR)Argument->strLibraryName.Buffer + (ULONG_PTR)Argument);
538 }
539 if(Argument->strInitFuncName.Buffer != NULL)
540 {
541 Argument->strInitFuncName.Buffer = (PWCHAR)((ULONG_PTR)Argument->strInitFuncName.Buffer + (ULONG_PTR)Argument);
542 }
543
544 /* Call the implementation of the callback */
545 bResult = ClientLoadLibrary(&Argument->strLibraryName,
546 &Argument->strInitFuncName,
547 Argument->Unload,
548 Argument->ApiHook);
549
550 return ZwCallbackReturn(&bResult, sizeof(HINSTANCE), STATUS_SUCCESS);
551}
#define NULL
Definition: types.h:112
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
NTSYSAPI NTSTATUS NTAPI ZwCallbackReturn(_In_ PVOID Result, _In_ ULONG ResultLength, _In_ NTSTATUS Status)
#define STATUS_SUCCESS
Definition: shellext.h:65
UNICODE_STRING strLibraryName
Definition: callback.h:124
UNICODE_STRING strInitFuncName
Definition: callback.h:125
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint16_t * PWCHAR
Definition: typedefs.h:56
static BOOL ClientLoadLibrary(PUNICODE_STRING pstrLibName, PUNICODE_STRING pstrInitFunc, BOOL bUnload, BOOL bApiHook)
Definition: hook.c:430
struct _CLIENT_LOAD_LIBRARY_ARGUMENTS * PCLIENT_LOAD_LIBRARY_ARGUMENTS

◆ User32CallClientThreadSetupFromKernel()

NTSTATUS WINAPI User32CallClientThreadSetupFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 582 of file dllmain.c.

583{
584 TRACE("User32CallClientThreadSetupFromKernel -->\n");
585 // FIXME: Disabling this call is a HACK!! See also ClientThreadSetup...
586 // ClientThreadSetupHelper(TRUE);
587 TRACE("<-- User32CallClientThreadSetupFromKernel\n");
589}
#define TRACE(s)
Definition: solgame.cpp:4

◆ User32CallCopyImageFromKernel()

NTSTATUS WINAPI User32CallCopyImageFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 1938 of file cursoricon.c.

1939{
1941 HANDLE Result;
1942 Common = (PCOPYIMAGE_CALLBACK_ARGUMENTS) Arguments;
1943
1944 Result = CopyImage(Common->hImage,
1945 Common->uType,
1946 Common->cxDesired,
1947 Common->cyDesired,
1948 Common->fuFlags);
1949
1950 return ZwCallbackReturn(&Result, sizeof(HANDLE), STATUS_SUCCESS);
1951}
struct _COPYIMAGE_CALLBACK_ARGUMENTS * PCOPYIMAGE_CALLBACK_ARGUMENTS
HANDLE WINAPI CopyImage(_In_ HANDLE hImage, _In_ UINT uType, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuFlags)
Definition: cursoricon.c:1956
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426

◆ User32CallDDEGetFromKernel()

NTSTATUS WINAPI User32CallDDEGetFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 288 of file dde.c.

289{
290 BOOL Ret;
292 PDDEPOSTGET_CALLBACK_ARGUMENTS Common = Arguments;
293
294 TRACE("DDE Get CB size %d\n",Common->size);
295
296 Ret = unpack_dde_message( Common->hwnd, Common->message, &Common->lParam, Common->buffer, Common->size );
297
298 if (!Ret)
299 {
300 ERR("DDE Get CB Return bad msg 0x%x\n",Common->message);
302 }
303 return ZwCallbackReturn(Arguments, ArgumentLength, Status);
304}
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: debug.h:110
Status
Definition: gdiplustypes.h:25
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
BOOL unpack_dde_message(HWND hwnd, UINT message, LPARAM *lparam, PVOID buffer, int size)
Definition: dde.c:159

◆ User32CallDDEPostFromKernel()

NTSTATUS WINAPI User32CallDDEPostFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 256 of file dde.c.

257{
258 struct packed_message data;
259 BOOL Ret;
261 PDDEPOSTGET_CALLBACK_ARGUMENTS Common = Arguments;
262
263 data.data = 0;
264 data.size = 0;
265 TRACE("DDE Post CB\n");
266 Ret = post_dde_message( &data, Common->message, Common->lParam, &Common->lParam);
267
268 if (Ret)
269 {
270 Common->pvData = (PVOID)data.data;
271 Common->size = data.size;
272 TRACE("DDE Post CB size %d\n",data.size);
273 }
274 else
275 {
276 ERR("DDE Post CB Return bad msg 0x%x Size %d\n",Common->message,Common->size);
278 }
279
280 return ZwCallbackReturn(Arguments, ArgumentLength, Status);
281}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * PVOID
Definition: retypes.h:9
BOOL post_dde_message(struct packed_message *data, UINT message, LPARAM lParam, LPARAM *lp)
Definition: dde.c:53

◆ User32CallEventProcFromKernel()

NTSTATUS WINAPI User32CallEventProcFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 796 of file hook.c.

797{
799 WINEVENTPROC Proc;
801 DWORD len;
802 HMODULE mod = NULL;
803 BOOL Loaded = FALSE;
804
805 Common = (PEVENTPROC_CALLBACK_ARGUMENTS) Arguments;
806
807 Proc = Common->Proc;
808
809 if (Common->offPfn && Common->Mod)
810 { // Validate the module again.
811 if (!(len = GetModuleFileNameW((HINSTANCE)Common->Mod, module, MAX_PATH)) || len >= MAX_PATH)
812 {
813 ERR("Error check for module!\n");
814 Common->Mod = 0;
815 }
816
817 if (Common->Mod && !(mod = GetModuleHandleW(module)))
818 {
819 TRACE("Reloading Event Module.\n");
821 {
822 ERR("Failed to load Event Module.\n");
823 }
824 else
825 {
826 Loaded = TRUE; // Free it only when loaded.
827 }
828 }
829
830 if (mod)
831 {
832 TRACE("Loading Event Module. %S\n",module);
833 Proc = (WINEVENTPROC)((char *)mod + Common->offPfn);
834 }
835 }
836
837 Proc(Common->hook,
838 Common->event,
839 Common->hwnd,
840 Common->idObject,
841 Common->idChild,
842 Common->dwEventThread,
843 Common->dwmsEventTime);
844
845 if (Loaded) FreeLibrary(mod);
846
848}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
unsigned long DWORD
Definition: ntddk_ex.h:95
@ Loaded
Definition: fs_rec.h:187
GLenum GLsizei len
Definition: glext.h:6722
static int mod
Definition: i386-dis.c:1289
struct _EVENTPROC_CALLBACK_ARGUMENTS * PEVENTPROC_CALLBACK_ARGUMENTS
VOID(CALLBACK * WINEVENTPROC)(HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD)
Definition: winable.h:68
#define LOAD_WITH_ALTERED_SEARCH_PATH
Definition: winbase.h:344
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ User32CallGetCharsetInfo()

NTSTATUS WINAPI User32CallGetCharsetInfo ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 593 of file dllmain.c.

594{
595 BOOL Ret;
596 PGET_CHARSET_INFO pgci = (PGET_CHARSET_INFO)Arguments;
597
598 TRACE("GetCharsetInfo\n");
599
600 Ret = TranslateCharsetInfo((DWORD *)(ULONG_PTR)pgci->Locale, &pgci->Cs, TCI_SRCLOCALE);
601
602 return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
603}
CHARSETINFO Cs
Definition: callback.h:133
struct _GET_CHARSET_INFO * PGET_CHARSET_INFO
#define TCI_SRCLOCALE
Definition: wingdi.h:964
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)

◆ User32CallHookProcFromKernel()

NTSTATUS WINAPI User32CallHookProcFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 554 of file hook.c.

555{
557 CREATESTRUCTW *pCsw = NULL;
558 CBT_CREATEWNDW *pCbtCreatewndw = NULL;
560 KBDLLHOOKSTRUCT KeyboardLlData, *pKeyboardLlData;
561 MSLLHOOKSTRUCT MouseLlData, *pMouseLlData;
562 MSG *pcMsg, *pMsg;
563 PMOUSEHOOKSTRUCT pMHook;
564 CWPSTRUCT *pCWP;
565 CWPRETSTRUCT *pCWPR;
566 PRECTL prl;
567 LPCBTACTIVATESTRUCT pcbtas;
568 HOOKPROC Proc;
569 WPARAM wParam = 0;
570 LPARAM lParam = 0;
571 LRESULT Result = 0;
572 BOOL Hit = FALSE, Loaded = FALSE;
573 HMODULE mod = NULL;
575
576 Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Arguments;
577
578 Proc = Common->Proc;
579 // HookProc Justin Case module is from another process.
580 if (Common->offPfn && Common->Mod)
581 {
582 if (!(mod = GetModuleHandleW((LPCWSTR)Common->ModuleName)))
583 {
584 TRACE("Reloading Hook Module.\n");
586 {
587 ERR("Failed to load Hook Module.\n");
588 }
589 else
590 {
591 Loaded = TRUE; // Free it only when loaded.
592 }
593 }
594 if (mod)
595 {
596 TRACE("Loading Hook Module. %S\n",Common->ModuleName);
597 Proc = (HOOKPROC)((char *)mod + Common->offPfn);
598 }
599 }
600
601 switch(Common->HookId)
602 {
603 case WH_CBT:
604 {
605 //ERR("WH_CBT: Code %d\n", Common->Code);
606 switch(Common->Code)
607 {
608 case HCBT_CREATEWND:
609 CbtCreatewndExtra = (PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS)
610 ((PCHAR) Common + Common->lParam);
611
612 pCbtCreatewndw = (CBT_CREATEWNDW*)HeapAlloc(GetProcessHeap(), 0, sizeof(CBT_CREATEWNDW));
613 RtlCopyMemory(pCbtCreatewndw, CbtCreatewndExtra, sizeof(CBT_CREATEWNDW));
614
615 pCsw = (CREATESTRUCTW*)HeapAlloc(GetProcessHeap(), 0, sizeof(CREATESTRUCTW));
616 RtlCopyMemory(pCsw, &CbtCreatewndExtra->Cs, sizeof(CREATESTRUCTW));
617
618 pCbtCreatewndw->lpcs = pCsw;
619 pCbtCreatewndw->hwndInsertAfter = CbtCreatewndExtra->WndInsertAfter;
620 wParam = Common->wParam;
621 lParam = (LPARAM) pCbtCreatewndw;
622 //ERR("HCBT_CREATEWND: hWnd %p Csw %p Name %p Class %p\n", Common->wParam, pCsw, pCsw->lpszName, pCsw->lpszClass);
623 break;
625 pMHook = (PMOUSEHOOKSTRUCT)((PCHAR) Common + Common->lParam);
626 lParam = (LPARAM) pMHook;
627 wParam = Common->wParam;
628 break;
629 case HCBT_MOVESIZE:
630 prl = (PRECTL)((PCHAR) Common + Common->lParam);
631 lParam = (LPARAM) prl;
632 wParam = Common->wParam;
633 break;
634 case HCBT_ACTIVATE:
635 //ERR("HCBT_ACTIVATE: hwnd %p\n",Common->wParam);
636 pcbtas = (LPCBTACTIVATESTRUCT)((PCHAR) Common + Common->lParam);
637 lParam = (LPARAM) pcbtas;
638 wParam = Common->wParam;
639 break;
640 case HCBT_KEYSKIPPED: /* The rest SEH support */
641 case HCBT_MINMAX:
642 case HCBT_SETFOCUS:
643 case HCBT_SYSCOMMAND:
644 case HCBT_DESTROYWND:
645 case HCBT_QS:
646 wParam = Common->wParam;
647 lParam = Common->lParam;
648 break;
649 default:
650 if (Loaded) FreeLibrary(mod);
651 ERR("HCBT_ not supported = %d\n", Common->Code);
653 }
654
655 if (Proc)
656 {
658 {
659 Result = Proc(Common->Code, wParam, lParam);
660 }
662 {
663 Hit = TRUE;
664 }
665 _SEH2_END;
666 }
667 else
668 {
669 ERR("Null Proc! Common = 0x%x, Proc = 0x%x\n",Common,Proc);
670 }
671 switch(Common->Code)
672 {
673 case HCBT_CREATEWND:
674 CbtCreatewndExtra->WndInsertAfter = pCbtCreatewndw->hwndInsertAfter;
675 CbtCreatewndExtra->Cs.x = pCbtCreatewndw->lpcs->x;
676 CbtCreatewndExtra->Cs.y = pCbtCreatewndw->lpcs->y;
677 CbtCreatewndExtra->Cs.cx = pCbtCreatewndw->lpcs->cx;
678 CbtCreatewndExtra->Cs.cy = pCbtCreatewndw->lpcs->cy;
679 HeapFree(GetProcessHeap(), 0, pCsw);
680 HeapFree(GetProcessHeap(), 0, pCbtCreatewndw);
681 break;
682 }
683 break;
684 }
685 case WH_KEYBOARD_LL:
686 //ERR("WH_KEYBOARD_LL: Code %d, wParam %d\n",Common->Code,Common->wParam);
687 pKeyboardLlData = (PKBDLLHOOKSTRUCT)((PCHAR) Common + Common->lParam);
688 RtlCopyMemory(&KeyboardLlData, pKeyboardLlData, sizeof(KBDLLHOOKSTRUCT));
689 Result = Proc(Common->Code, Common->wParam, (LPARAM) &KeyboardLlData);
690 break;
691 case WH_MOUSE_LL:
692 //ERR("WH_MOUSE_LL: Code %d, wParam %d\n",Common->Code,Common->wParam);
693 pMouseLlData = (PMSLLHOOKSTRUCT)((PCHAR) Common + Common->lParam);
694 RtlCopyMemory(&MouseLlData, pMouseLlData, sizeof(MSLLHOOKSTRUCT));
695 Result = Proc(Common->Code, Common->wParam, (LPARAM) &MouseLlData);
696 break;
697 case WH_MOUSE: /* SEH support */
698 pMHook = (PMOUSEHOOKSTRUCT)((PCHAR) Common + Common->lParam);
700 {
701 Result = Proc(Common->Code, Common->wParam, (LPARAM) pMHook);
702 }
704 {
705 Hit = TRUE;
706 }
707 _SEH2_END;
708 break;
709 case WH_CALLWNDPROC:
710 {
711 PCWP_Struct pcwps = (PCWP_Struct)Common;
712 CWPSTRUCT *pCWPT = &pcwps->cwps;
713 pCWP = HeapAlloc(GetProcessHeap(), 0, Common->lParamSize + sizeof(CWPSTRUCT));
714 RtlCopyMemory(pCWP, pCWPT, sizeof(CWPSTRUCT));
715 //ERR("WH_CALLWNDPROC: Code %d, wParam %d hwnd %p msg %d\n",Common->Code,Common->wParam,pCWP->hwnd,pCWP->message);
716 /* If more memory is reserved, then lParam is a pointer.
717 * Size of the buffer is stocked in the lParam member, and its content
718 * is at the end of the argument buffer */
719 if ( Common->lParamSize )
720 {
721 pCWP->lParam = (LPARAM)((PCHAR)pCWP + sizeof(CWPSTRUCT));
722 RtlCopyMemory( (PCHAR)pCWP + sizeof(CWPSTRUCT), &pcwps->Extra, Common->lParamSize );
723 }
724 Result = Proc(Common->Code, Common->wParam, (LPARAM) pCWP);
725 HeapFree(GetProcessHeap(), 0, pCWP);
726 }
727 break;
729 /* Almost the same as WH_CALLWNDPROC */
730 {
731 PCWPR_Struct pcwprs = (PCWPR_Struct)Common;
732 CWPRETSTRUCT *pCWPRT = &pcwprs->cwprs;
733 pCWPR = HeapAlloc(GetProcessHeap(), 0, Common->lParamSize + sizeof(CWPRETSTRUCT));
734 RtlCopyMemory(pCWPR, pCWPRT, sizeof(CWPRETSTRUCT));
735 //ERR("WH_CALLWNDPROCRET: Code %d, wParam %d hwnd %p msg %d\n",Common->Code,Common->wParam,pCWPRT->hwnd,pCWPRT->message);
736 if ( Common->lParamSize )
737 {
738 pCWPR->lParam = (LPARAM)((PCHAR)pCWPR + sizeof(CWPRETSTRUCT));
739 RtlCopyMemory( (PCHAR)pCWPR + sizeof(CWPRETSTRUCT), &pcwprs->Extra, Common->lParamSize );
740 }
741 Result = Proc(Common->Code, Common->wParam, (LPARAM) pCWPR);
742 HeapFree(GetProcessHeap(), 0, pCWPR);
743 }
744 break;
745 case WH_MSGFILTER: /* All SEH support */
746 case WH_SYSMSGFILTER:
747 case WH_GETMESSAGE:
748 pMsg = (PMSG)((PCHAR) Common + Common->lParam);
749 pcMsg = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MSG));
750 RtlCopyMemory(pcMsg, pMsg, sizeof(MSG));
751// ERR("pMsg %d pcMsg %d\n",pMsg->message, pcMsg->message);
753 {
754 Result = Proc(Common->Code, Common->wParam, (LPARAM) pcMsg);
755 }
757 {
758 Hit = TRUE;
759 }
760 _SEH2_END;
761 if (!Hit && Common->HookId == WH_GETMESSAGE)
762 RtlCopyMemory(pMsg, pcMsg, sizeof(MSG));
763 HeapFree( GetProcessHeap(), 0, pcMsg );
764 break;
765 case WH_KEYBOARD:
766 case WH_SHELL:
767 Result = Proc(Common->Code, Common->wParam, Common->lParam);
768 break;
769 case WH_FOREGROUNDIDLE: /* <-- SEH support */
771 {
772 Result = Proc(Common->Code, Common->wParam, Common->lParam);
773 }
775 {
776 Hit = TRUE;
777 }
778 _SEH2_END;
779 break;
780 default:
781 if (Loaded) FreeLibrary(mod);
782 ERR("WH_ not supported = %d\n", Common->HookId);
784 }
785 if (Hit)
786 {
787 ERR("Hook Exception! Id: %d, Code %d, Proc 0x%x\n",Common->HookId,Common->Code,Proc);
789 }
790 if (Loaded) FreeLibrary(mod);
791 Common->Result = Result;
792 return ZwCallbackReturn(Arguments, ArgumentLength, Status);
793}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
signed char * PCHAR
Definition: retypes.h:7
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
struct RECTL * PRECTL
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
LPCREATESTRUCTW lpcs
Definition: winuser.h:2965
HWND hwndInsertAfter
Definition: winuser.h:2966
LPARAM lParam
Definition: winuser.h:3008
CWPRETSTRUCT cwprs
Definition: callback.h:88
PBYTE Extra[4]
Definition: callback.h:89
LPARAM lParam
Definition: winuser.h:3015
PBYTE Extra[4]
Definition: callback.h:82
CWPSTRUCT cwps
Definition: callback.h:81
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
struct tagCWPR_Struct * PCWPR_Struct
struct _HOOKPROC_CALLBACK_ARGUMENTS * PHOOKPROC_CALLBACK_ARGUMENTS
struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS * PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
struct tagCWP_Struct * PCWP_Struct
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define HCBT_MINMAX
Definition: winuser.h:56
#define WH_KEYBOARD
Definition: winuser.h:32
LRESULT(CALLBACK * HOOKPROC)(int, WPARAM, LPARAM)
Definition: winuser.h:2889
#define WH_CALLWNDPROCRET
Definition: winuser.h:42
#define HCBT_ACTIVATE
Definition: winuser.h:60
#define WH_MSGFILTER
Definition: winuser.h:29
struct tagMSG * PMSG
#define HCBT_DESTROYWND
Definition: winuser.h:59
struct tagCREATESTRUCTW CREATESTRUCTW
#define WH_SHELL
Definition: winuser.h:40
#define WH_CBT
Definition: winuser.h:35
struct tagCBTACTIVATESTRUCT * LPCBTACTIVATESTRUCT
#define HCBT_CREATEWND
Definition: winuser.h:58
struct tagKBDLLHOOKSTRUCT * PKBDLLHOOKSTRUCT
#define WH_MOUSE_LL
Definition: winuser.h:44
#define WH_MOUSE
Definition: winuser.h:37
#define HCBT_SETFOCUS
Definition: winuser.h:64
struct tagCWPRETSTRUCT CWPRETSTRUCT
#define HCBT_CLICKSKIPPED
Definition: winuser.h:61
#define HCBT_QS
Definition: winuser.h:57
#define HCBT_MOVESIZE
Definition: winuser.h:55
#define WH_KEYBOARD_LL
Definition: winuser.h:43
#define WH_GETMESSAGE
Definition: winuser.h:33
#define WH_SYSMSGFILTER
Definition: winuser.h:36
struct tagMOUSEHOOKSTRUCT * PMOUSEHOOKSTRUCT
struct tagCBT_CREATEWNDW CBT_CREATEWNDW
#define WH_FOREGROUNDIDLE
Definition: winuser.h:41
struct tagMSLLHOOKSTRUCT * PMSLLHOOKSTRUCT
struct tagCWPSTRUCT CWPSTRUCT
#define HCBT_SYSCOMMAND
Definition: winuser.h:63
#define HCBT_KEYSKIPPED
Definition: winuser.h:62
#define WH_CALLWNDPROC
Definition: winuser.h:34
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ User32CallImmLoadLayoutFromKernel()

NTSTATUS WINAPI User32CallImmLoadLayoutFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 733 of file dllmain.c.

734{
735 PIMMLOADLAYOUT_CALLBACK_ARGUMENTS Common = Arguments;
737 Result.ret = IMM_FN(ImmLoadLayout)(Common->hKL, &Result.iiex);
738 return ZwCallbackReturn(&Result, sizeof(Result), STATUS_SUCCESS);
739}
BOOL WINAPI ImmLoadLayout(HKL hKL, PIMEINFOEX pImeInfoEx)
Definition: imm.c:68
#define IMM_FN(name)
Definition: user32p.h:56

◆ User32CallImmProcessKeyFromKernel()

NTSTATUS WINAPI User32CallImmProcessKeyFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 720 of file dllmain.c.

721{
722 PIMMPROCESSKEY_CALLBACK_ARGUMENTS Common = Arguments;
724 Common->hKL,
725 Common->vKey,
726 Common->lParam,
727 Common->dwHotKeyID);
728
729 return ZwCallbackReturn(&Result, sizeof(DWORD), STATUS_SUCCESS);
730}
DWORD WINAPI ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID)
Definition: keymsg.c:773

◆ User32CallLoadMenuFromKernel()

NTSTATUS WINAPI User32CallLoadMenuFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 665 of file menu.c.

666{
669
670 Common = (PLOADMENU_CALLBACK_ARGUMENTS) Arguments;
671
672 Result = (LRESULT)LoadMenuW(Common->hModule, Common->InterSource ? MAKEINTRESOURCEW(Common->InterSource) : (LPCWSTR)&Common->MenuName);
673
675}
#define LRESULT
Definition: ole.h:14
struct _LOADMENU_CALLBACK_ARGUMENTS * PLOADMENU_CALLBACK_ARGUMENTS
HMENU WINAPI LoadMenuW(HINSTANCE hInstance, LPCWSTR lpMenuName)
Definition: menu.c:1407
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

◆ User32CallLPKFromKernel()

NTSTATUS WINAPI User32CallLPKFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 668 of file dllmain.c.

669{
670 BOOL bResult;
672
673 Argument = (PLPK_CALLBACK_ARGUMENTS)Arguments;
674
675 Argument->lpString = (LPWSTR)((ULONG_PTR)Argument->lpString + (ULONG_PTR)Argument);
676
677 bResult = ExtTextOutW(Argument->hdc,
678 Argument->x,
679 Argument->y,
680 Argument->flags,
681 (Argument->bRect) ? &Argument->rect : NULL,
682 Argument->lpString,
683 Argument->count,
684 NULL);
685
686 return ZwCallbackReturn(&bResult, sizeof(BOOL), STATUS_SUCCESS);
687}
struct _LPK_CALLBACK_ARGUMENTS * PLPK_CALLBACK_ARGUMENTS
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ User32CallOBMFromKernel()

NTSTATUS WINAPI User32CallOBMFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 636 of file dllmain.c.

637{
638 BITMAP bmp;
639 PSETOBM_CALLBACK_ARGUMENTS Common = Arguments;
640
642 Common->oembmi[OBI_CLOSE].cx = bmp.bmWidth;
643 Common->oembmi[OBI_CLOSE].cy = bmp.bmHeight;
644
646 Common->oembmi[OBI_MNARROW].cx = bmp.bmWidth;
647 Common->oembmi[OBI_MNARROW].cy = bmp.bmHeight;
648
650 Common->oembmi[OBI_DNARROW].cx = bmp.bmWidth;
651 Common->oembmi[OBI_DNARROW].cy = bmp.bmHeight;
652
654 Common->oembmi[OBI_DNARROWI].cx = bmp.bmWidth;
655 Common->oembmi[OBI_DNARROWI].cy = bmp.bmHeight;
656
658 Common->oembmi[OBI_UPARROW].cx = bmp.bmWidth;
659 Common->oembmi[OBI_UPARROW].cy = bmp.bmHeight;
660
662 Common->oembmi[OBI_UPARROWI].cx = bmp.bmWidth;
663 Common->oembmi[OBI_UPARROWI].cy = bmp.bmHeight;
664
665 return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
666}
@ OBI_UPARROWI
Definition: ntuser.h:963
@ OBI_UPARROW
Definition: ntuser.h:962
@ OBI_DNARROW
Definition: ntuser.h:964
@ OBI_CLOSE
Definition: ntuser.h:961
@ OBI_DNARROWI
Definition: ntuser.h:965
@ OBI_MNARROW
Definition: ntuser.h:966
BITMAP bmp
Definition: alphablend.c:62
Definition: bl.h:1331
struct tagOEMBITMAPINFO oembmi[93]
Definition: callback.h:158
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define OBM_CLOSE
Definition: winuser.h:1122
#define OBM_MNARROW
Definition: winuser.h:1107
#define OBM_DNARROWI
Definition: winuser.h:1104
#define OBM_UPARROWI
Definition: winuser.h:1105
#define OBM_UPARROW
Definition: winuser.h:1121
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2132
#define OBM_DNARROW
Definition: winuser.h:1120

◆ User32CallSendAsyncProcForKernel()

NTSTATUS WINAPI User32CallSendAsyncProcForKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 24 of file window.c.

25{
27
28 TRACE("User32CallSendAsyncProcKernel()\n");
29
30 CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments;
31
32 if (ArgumentLength != sizeof(SENDASYNCPROC_CALLBACK_ARGUMENTS))
33 {
35 }
36
37 CallbackArgs->Callback(CallbackArgs->Wnd,
38 CallbackArgs->Msg,
39 CallbackArgs->Context,
40 CallbackArgs->Result);
41 return(STATUS_SUCCESS);
42}
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
struct _SENDASYNCPROC_CALLBACK_ARGUMENTS * PSENDASYNCPROC_CALLBACK_ARGUMENTS

◆ User32CallSetWndIconsFromKernel()

NTSTATUS WINAPI User32CallSetWndIconsFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 607 of file dllmain.c.

608{
609 PSETWNDICONS_CALLBACK_ARGUMENTS Common = Arguments;
610
611 if (!gpsi->hIconSmWindows)
612 {
620 hIconWindows = Common->hIconWindows;
622 }
623 ERR("hIconSmWindows %p hIconWindows %p \n",hIconSmWindows,hIconWindows);
624 return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
625}
HICON hIconWindows
Definition: dllmain.c:37
HICON hIconSmWindows
Definition: dllmain.c:37
PSERVERINFO gpsi
Definition: dllmain.c:31
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
#define IDI_QUESTION
Definition: winuser.h:701
#define IMAGE_ICON
Definition: winuser.h:212
#define IDI_HAND
Definition: winuser.h:700
#define SM_CYSMICON
Definition: winuser.h:1007
#define IDI_WINLOGO
Definition: winuser.h:704
#define IDI_APPLICATION
Definition: winuser.h:699
#define IDI_ASTERISK
Definition: winuser.h:703
#define SM_CXSMICON
Definition: winuser.h:1006
#define LR_DEFAULTSIZE
Definition: winuser.h:1088
#define IDI_EXCLAMATION
Definition: winuser.h:702
int WINAPI GetSystemMetrics(_In_ int)

◆ User32CallUMPDFromKernel()

NTSTATUS WINAPI User32CallUMPDFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 689 of file dllmain.c.

690{
692 INT cbSize = 0;
694 PUMPDPKTHEAD pkt, pktOut = NULL;
695
696 pkt = (PUMPDPKTHEAD)Arguments;
697
698 if ( pkt->RetSize <= sizeof(Buffer) )
699 {
700 pktOut = (PUMPDPKTHEAD)Buffer;
701
702 if ( (GdiPrinterThunk( pkt, pktOut, pkt->RetSize ) == GDI_ERROR) )
703 {
704 pktOut = NULL;
706 }
707 else
708 {
709 cbSize = pkt->RetSize;
710 }
711 }
712 else
713 {
715 }
716 return ZwCallbackReturn( pktOut, cbSize, Status );
717}
Definition: bufpool.h:45
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
INT RetSize
Definition: dllmain.c:14
int32_t INT
Definition: typedefs.h:58
struct _UMPDPKTHEAD * PUMPDPKTHEAD
#define MAX_USER_MODE_DRV_BUFFER
Definition: dllmain.c:5
INT WINAPI GdiPrinterThunk(PUMPDPKTHEAD, PVOID, INT)
#define GDI_ERROR
Definition: wingdi.h:1309

◆ User32CallWindowProcFromKernel()

NTSTATUS WINAPI User32CallWindowProcFromKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 2937 of file message.c.

2938{
2939 PWINDOWPROC_CALLBACK_ARGUMENTS CallbackArgs;
2940 MSG KMMsg, UMMsg;
2941 PWND pWnd = NULL;
2943
2944 /* Make sure we don't try to access mem beyond what we were given */
2945 if (ArgumentLength < sizeof(WINDOWPROC_CALLBACK_ARGUMENTS))
2946 {
2948 }
2949
2950 CallbackArgs = (PWINDOWPROC_CALLBACK_ARGUMENTS) Arguments;
2951 KMMsg.hwnd = CallbackArgs->Wnd;
2952 KMMsg.message = CallbackArgs->Msg;
2953 KMMsg.wParam = CallbackArgs->wParam;
2954 KMMsg.time = 0;
2955 KMMsg.pt.x = 0;
2956 KMMsg.pt.y = 0;
2957 /* Check if lParam is really a pointer and adjust it if it is */
2958 if (0 <= CallbackArgs->lParamBufferSize)
2959 {
2960 if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)
2961 + CallbackArgs->lParamBufferSize)
2962 {
2964 }
2965 KMMsg.lParam = (LPARAM) ((char *) CallbackArgs + sizeof(WINDOWPROC_CALLBACK_ARGUMENTS));
2966 switch(KMMsg.message)
2967 {
2968 case WM_CREATE:
2969 {
2970 TRACE("WM_CREATE CB %p lParam %p\n",CallbackArgs, KMMsg.lParam);
2971 break;
2972 }
2973 case WM_NCCREATE:
2974 {
2975 TRACE("WM_NCCREATE CB %p lParam %p\n",CallbackArgs, KMMsg.lParam);
2976 break;
2977 }
2978 case WM_SYSTIMER:
2979 {
2980 TRACE("WM_SYSTIMER %p\n",KMMsg.hwnd);
2981 break;
2982 }
2983 case WM_SIZING:
2984 {
2985 PRECT prect = (PRECT) KMMsg.lParam;
2986 TRACE("WM_SIZING 1 t %d l %d r %d b %d\n",prect->top,prect->left,prect->right,prect->bottom);
2987 break;
2988 }
2989 default:
2990 break;
2991 }
2992 }
2993 else
2994 {
2995 if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS))
2996 {
2998 }
2999 KMMsg.lParam = CallbackArgs->lParam;
3000 }
3001
3002 if (WM_NCCALCSIZE == CallbackArgs->Msg && CallbackArgs->wParam)
3003 {
3004 NCCALCSIZE_PARAMS *Params = (NCCALCSIZE_PARAMS *) KMMsg.lParam;
3005 Params->lppos = (PWINDOWPOS) (Params + 1);
3006 }
3007
3008 if (! MsgiKMToUMMessage(&KMMsg, &UMMsg))
3009 {
3010 }
3011
3012 if (pci->CallbackWnd.hWnd == UMMsg.hwnd)
3013 pWnd = pci->CallbackWnd.pWnd;
3014
3015 CallbackArgs->Result = IntCallWindowProcW( CallbackArgs->IsAnsiProc,
3016 CallbackArgs->Proc,
3017 pWnd,
3018 UMMsg.hwnd,
3019 UMMsg.message,
3020 UMMsg.wParam,
3021 UMMsg.lParam);
3022
3023 if (! MsgiKMToUMReply(&KMMsg, &UMMsg, &CallbackArgs->Result))
3024 {
3025 }
3026
3027 if (0 <= CallbackArgs->lParamBufferSize)
3028 {
3029 switch(KMMsg.message)
3030 {
3031 case WM_SIZING:
3032 {
3033 PRECT prect = (PRECT) KMMsg.lParam;
3034 TRACE("WM_SIZING 2 t %d l %d r %d b %d\n",prect->top,prect->left,prect->right,prect->bottom);
3035 break;
3036 }
3037 default:
3038 break;
3039 }
3040 }
3041 return ZwCallbackReturn(CallbackArgs, ArgumentLength, STATUS_SUCCESS);
3042}
#define WM_SYSTIMER
Definition: comctl32.h:119
#define GetWin32ClientInfo()
Definition: ntuser.h:347
HWND hWnd
Definition: ntuser.h:294
struct _WND * pWnd
Definition: ntuser.h:295
CALLBACKWND CallbackWnd
Definition: ntuser.h:324
Definition: ntuser.h:689
PWINDOWPOS lppos
Definition: winuser.h:3589
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:308
#define PRECT
Definition: precomp.h:27
struct _WINDOWPROC_CALLBACK_ARGUMENTS WINDOWPROC_CALLBACK_ARGUMENTS
struct _WINDOWPROC_CALLBACK_ARGUMENTS * PWINDOWPROC_CALLBACK_ARGUMENTS
LRESULT FASTCALL IntCallWindowProcW(BOOL IsAnsiProc, WNDPROC WndProc, PWND pWnd, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1425
static BOOL FASTCALL MsgiKMToUMMessage(PMSG KMMsg, PMSG UMMsg)
Definition: message.c:432
static BOOL FASTCALL MsgiKMToUMReply(PMSG KMMsg, PMSG UMMsg, LRESULT *Result)
Definition: message.c:506
#define WM_CREATE
Definition: winuser.h:1598
#define WM_NCCREATE
Definition: winuser.h:1673
#define WM_SIZING
Definition: winuser.h:1797
#define WM_NCCALCSIZE
Definition: winuser.h:1675

◆ User32DeliverUserAPC()

NTSTATUS WINAPI User32DeliverUserAPC ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 629 of file dllmain.c.

630{
631 return ZwCallbackReturn(0, 0, STATUS_SUCCESS);
632}

◆ User32LoadSysMenuTemplateForKernel()

NTSTATUS WINAPI User32LoadSysMenuTemplateForKernel ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 655 of file menu.c.

656{
657 LRESULT Result = 0;
658
659 // Use this for Menu Ole!!
660
661 return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
662}

◆ User32SetupDefaultCursors()

NTSTATUS WINAPI User32SetupDefaultCursors ( PVOID  Arguments,
ULONG  ArgumentLength 
)

Definition at line 48 of file cursoricon.c.

50{
51 BOOL *DefaultCursor = (BOOL*)Arguments;
52 HCURSOR hCursor;
53
54 /* Load system cursors first */
56
57 if(*DefaultCursor)
58 {
59 /* set default cursor */
60 hCursor = LoadCursorW(0, IDC_ARROW);
61 SetCursor(hCursor);
62 }
63 else
64 {
65 /* FIXME load system cursor scheme */
66 SetCursor(0);
67 hCursor = LoadCursorW(0, IDC_ARROW);
68 SetCursor(hCursor);
69 }
70
71 return(ZwCallbackReturn(&hCursor, sizeof(HCURSOR), STATUS_SUCCESS));
72}
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpCursorName)
Definition: cursoricon.c:2074
VOID LoadSystemCursors(VOID)
Definition: cursoricon.c:21
HICON HCURSOR
Definition: windef.h:299
#define IDC_ARROW
Definition: winuser.h:682
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)