14#define PM_BADMSGFLAGS ~((QS_RAWINPUT << 16)|PM_QS_SENDMESSAGE|PM_QS_PAINT|PM_QS_POSTMESSAGE|PM_QS_INPUT|PM_NOYIELD|PM_REMOVE)
56#define SET(msg) (1 << ((msg) & 31))
69 SET(WM_STYLECHANGING) |
SET(WM_STYLECHANGED),
128#define MMS_SIZE_WPARAM -1
129#define MMS_SIZE_WPARAMWCHAR -2
130#define MMS_SIZE_LPARAMSZ -3
131#define MMS_SIZE_SPECIAL -4
132#define MMS_FLAG_READ 0x01
133#define MMS_FLAG_WRITE 0x02
134#define MMS_FLAG_READWRITE (MMS_FLAG_READ | MMS_FLAG_WRITE)
179 return MsgMemoryEntry;
209 TRACE(
"lParam is NULL!\n");
217 switch(MsgMemoryEntry->
Message)
279 if(MsgMemoryEntry ==
NULL)
return 0;
298 if (NonPagedPoolNeeded)
311 if (
NULL == PackedNcCalcsize)
313 ERR(
"Not enough memory to pack lParam\n");
319 *lParamPacked = (
LPARAM) PackedNcCalcsize;
336 if (
NULL == PackedCs)
338 ERR(
"Not enough memory to pack lParam\n");
342 CsData = (
PCHAR) (PackedCs + 1);
345 CsData += WindowName->
Length;
346 *((
WCHAR *) CsData) =
L'\0';
347 CsData +=
sizeof(
WCHAR);
351 *((
WCHAR *) CsData) =
L'A';
352 CsData +=
sizeof(
WCHAR);
354 CsData +=
sizeof(
ATOM);
359 *((
WCHAR *) CsData) =
L'S';
360 CsData +=
sizeof(
WCHAR);
362 CsData += ClassName->
Length;
363 *((
WCHAR *) CsData) =
L'\0';
364 CsData +=
sizeof(
WCHAR);
367 *lParamPacked = (
LPARAM) PackedCs;
385 ERR(
"No size for lParamPacked\n");
389 if (PackedData ==
NULL)
391 ERR(
"Not enough memory to pack lParam\n");
395 *lParamPacked = (
LPARAM)PackedData;
408 if (lParamPacked ==
lParam)
417 UnpackedWindowPos = UnpackedParams->
lppos;
419 UnpackedParams->
lppos = UnpackedWindowPos;
431 else if (NonPagedPoolUsed)
458 *KernelModeMsg = *UserModeMsg;
461 if (
NULL == MsgMemoryEntry)
474 if (
NULL == KernelMem)
476 ERR(
"Not enough memory to copy message to kernel mem\n");
479 KernelModeMsg->lParam = (
LPARAM) KernelMem;
484 TRACE(
"Copy Message %u from usermode buffer\n", KernelModeMsg->message);
488 if (
Size > 1 && UserModeMsg->lParam &&
505 if (!UserModeMsg->wParam &&
PosInArray(lParamMsg) >= 0)
507 TRACE(
"Copy String '%S' from usermode buffer\n", lParamMsg);
508 wcscpy(KernelMem, lParamMsg);
516 ERR(
"Failed to copy message to kernel: invalid usermode lParam buffer\n");
529 KernelModeMsg->lParam = 0;
544 if (
NULL == MsgMemoryEntry)
561 ERR(
"Failed to copy message from kernel: invalid usermode lParam buffer\n");
597 TRACE(
"IdlePing ppi %p\n", ppi);
598 if ( ppi && ppi->InputIdleEvent )
600 TRACE(
"InputIdleEvent\n");
610 TRACE(
"IdlePong ppi %p\n", ppi);
611 if ( ppi && ppi->InputIdleEvent )
619 return msg < WM_USER || msg >= 0xc000;
676 ERR(
"UserHeapAlloc() failed!\n");
690 ERR(
"UserHeapAlloc() failed!\n");
697 *ppszClass = pszClass;
723 ERR(
"UserHeapAlloc() failed!\n");
737 ERR(
"UserHeapAlloc() failed!\n");
814 CWPR.
lResult = uResult ? (*uResult) : 0;
839 if (!winpos)
return 0;
852 TRACE(
"WM_ASYNC_DESTROYWINDOW\n");
934 if (pTimer && pTimer->
pfn)
949 TRACE(
"Dispatch: Server Side Window Procedure\n");
993 Window->state2 &= ~WNDS2_WMPAINTSENT;
1023 BOOL RemoveMessages;
1030 ProcessMask =
HIWORD(RemoveMsg);
1055 if (Hit)
return FALSE;
1061 if (MsgFilterMin == 0 && MsgFilterMax == 0)
1063 pti->
pcti->fsChangeBits &= ~QS_ALLPOSTMESSAGE;
1069 pti->
pcti->fsChangeBits &= ~QS_INPUT;
1101 pti->
pcti->fsWakeBits &= ~QS_ALLPOSTMESSAGE;
1102 pti->
pcti->fsChangeBits &= ~QS_ALLPOSTMESSAGE;
1145 if (Hit)
return FALSE;
1212 ERR(
"Exit co_IntWaitMessage on error!\n");
1258 if (MsgFilterMax < MsgFilterMin)
1266 RemoveMsg |= ((
GetWakeMask( MsgFilterMin, MsgFilterMax ))<< 16);
1293 TRACE(
"DDE Get return ERROR\n");
1313 if ( bGMSG || pMsg->message ==
WM_PAINT)
break;
1345 while( bGMSG && !Present );
1386 Window->head.pti == ptiCur )
1434 if (!pwnd)
continue;
1460 ERR(
"UserPostMessage: Invalid handle 0x%p Msg 0x%x!\n", Wnd,
Msg);
1468 ERR(
"Attempted to post message to window %p when the thread is in cleanup!\n", Wnd);
1474 ERR(
"Attempted to post message to window %p that is being destroyed!\n", Wnd);
1483 TRACE(
"Posting Exit DDE 0x%x\n",
Msg);
1521 INT lParamBufferSize;
1531 TRACE(
"SendMessageTimeoutSingle: Invalid handle 0x%p!\n",
hWnd);
1545 ERR(
"Sending Exit DDE 0x%x\n",
Msg);
1558 if (
Msg & 0x80000000)
1560 TRACE(
"SMTS: Internal Message!\n");
1562 if (uResult) *uResult =
Result;
1572 TRACE(
"SMT: Server Side Window Procedure\n");
1574 if (IoGetRemainingStackSize() <
PAGE_SIZE)
1576 ERR(
"Server Callback Exceeded Stack!\n");
1594 if (uResult) *uResult =
Result;
1601 if (
NULL == MsgMemoryEntry)
1603 lParamBufferSize = -1;
1609 if (!lParamBufferSize) lParamBufferSize = -1;
1614 ERR(
"Failed to pack message parameters\n");
1632 ERR(
"Failed to unpack message parameters\n");
1647 ERR(
"Attempted to send message to window %p that is being destroyed!\n",
hWnd);
1655 ERR(
"Window %p (%p) (pti %p) is hung!\n",
hWnd,
Window, ptiSendTo);
1672 (
uFlags & SMTO_NOTIMEOUTIFNOTHUNG) &&
1679 TRACE(
"Let's go Ghost!\n");
1740 if (
NULL == Children)
1748 if (!pwnd)
continue;
1796 INT lParamBufferSize;
1806 TRACE(
"SendMessageWithCallBack: Invalid handle 0x%p\n",
hWnd);
1815 ERR(
"Attempted to send message to window %p that is being destroyed\n",
hWnd);
1826 if (
Msg & 0x80000000 &&
1832 TRACE(
"SMWCB: Internal Message\n");
1834 if (uResult) *uResult =
Result;
1841 if (
NULL == MsgMemoryEntry)
1843 lParamBufferSize = -1;
1848 if (!lParamBufferSize) lParamBufferSize = -1;
1853 ERR(
"Failed to pack message parameters\n");
1871 TRACE(
"SMWCB: Server Side Window Procedure\n");
1906 CompletionCallbackContext,
1915 ERR(
"Failed to unpack message parameters\n");
1923 ERR(
"Failed to allocate message\n");
1930 Message->Msg.lParam = lParamPacked;
1934 Message->ptiReceiver = ptiSendTo;
1936 Message->ptiCallBackSender = Win32Thread;
1938 Message->CompletionCallbackContext = CompletionCallbackContext;
1940 Message->HasPackedLParam = (lParamBufferSize > 0);
1944 if (
Msg & 0x80000000)
1980 TRACE(
"PostOrSendMessage: Invalid handle 0x%p!\n",
hWnd);
2013 MSG UserModeMsg, KernelModeMsg;
2029 ERR(
"co_IntDoSendMessage Window Exiting!\n");
2036 if (!
Window || ptiSendTo )
2038 UserModeMsg.hwnd =
hWnd;
2039 UserModeMsg.message =
Msg;
2040 UserModeMsg.wParam =
wParam;
2041 UserModeMsg.lParam =
lParam;
2047 return (dsm ? 0 : -1);
2052 KernelModeMsg.hwnd =
hWnd;
2053 KernelModeMsg.message =
Msg;
2054 KernelModeMsg.wParam =
wParam;
2055 KernelModeMsg.lParam =
lParam;
2061 KernelModeMsg.message,
2062 KernelModeMsg.wParam,
2063 KernelModeMsg.lParam );
2068 KernelModeMsg.message,
2069 KernelModeMsg.wParam,
2070 KernelModeMsg.lParam,
2076 if (!
Window || ptiSendTo )
2082 return(dsm ? 0 : -1);
2119 if (!pwnd)
continue;
2154 pti->
pcti->fsChangeBits &= ~Changes;
2166 pti->
pcti->dwcPumpHook++;
2179 if (pti->
pcti->dwcPumpHook <= 0)
2183 pti->
pcti->dwcPumpHook--;
2215 ULONG wDragWidth, wDragHeight;
2218 TRACE(
"Enter NtUserDragDetect(%p)\n",
hWnd);
2224 rect.left =
pt.x - wDragWidth;
2225 rect.right =
pt.x + wDragWidth;
2227 rect.top =
pt.y - wDragHeight;
2228 rect.bottom =
pt.y + wDragHeight;
2273 TRACE(
"Leave NtUserDragDetect, ret=%i\n", Ret);
2338 TRACE(
"NtUserWaitMessage Enter\n");
2340 TRACE(
"NtUserWaitMessage Leave\n");
2355 if ( (MsgFilterMin|MsgFilterMax) & ~
WM_MAXIMUM )
2529 TRACE(
"No Window for Translate. hwnd 0x%p Msg %u\n", SafeMsg.hwnd, SafeMsg.message);
2639 PWND pwnd, pwndDesk;
2645 DesktopEntry = DesktopEntry->
Flink)
2661 fuFlags = SMTO_NOTIMEOUTIFNOTHUNG;
2678 if (!pwnd)
continue;
2704 hwndDenied =
List[
i];
2713 retparam->
hDesk = hDesk;
2714 retparam->
hWnd = hwndDenied;
2733 if (!pwnd)
continue;
2759 if (!pwnd)
continue;
2778 0, (
LPARAM)
L"Environment", 0);
2788 PWND pwnd, pwndDesk;
2805 fuFlags = SMTO_NOTIMEOUTIFNOTHUNG;
2822 if (!pwnd)
continue;
2848 hwndDenied =
List[
i];
2857 retparam->
hDesk = hDesk;
2858 retparam->
hWnd = hwndDenied;
2876 if (!pwnd)
continue;
2902 if (!pwnd)
continue;
2947 ERR(
"Callback failure!\n");
3014 PHOOK NextObj, Hook;
3045 TRACE(
"WH_CALLWNDPROC: Hook %p NextHook %p\n", Hook, NextObj);
3111#define INFINITE 0xFFFFFFFF
3112#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
3150 pti->
ppi == W32Process)
3159 Handles[1] = W32Process->InputIdleEvent;
3181 TRACE(
"WFII: ppi %p\n", W32Process);
3182 TRACE(
"WFII: waiting for %p\n", Handles[1] );
3219 ERR(
"WFII: WAIT 2\n");
3224 ERR(
"WFII: timeout\n");
3229 ERR(
"WFII: finished\n");
3240 pti->
TIF_flags &= ~TIF_WAITFORINPUTIDLE;
3243 W32Process->W32PF_flags &= ~W32PF_WAITFORINPUTIDLE;
const TCHAR * CompletionCallback(unsigned __int64 &rnIndex, const BOOL *pblnForward, const TCHAR *pszContext, const TCHAR *pszBegin)
#define UlongToHandle(ul)
#define DBG_DEFAULT_CHANNEL(ch)
#define BSF_NOTIMEOUTIFNOTHUNG
#define BSF_IGNORECURRENTTASK
#define BSM_ALLCOMPONENTS
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
static const WCHAR Message[]
static const WCHAR Cleanup[]
#define EngGetTickCount32()
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeSetEvent(pEvt, foo, foo2)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
BOOL FASTCALL IntDeactivateWindow(PTHREADINFO pti, HANDLE tid)
VOID FASTCALL IntActivateWindow(PWND Wnd, PTHREADINFO pti, HANDLE tid, DWORD Type)
HWND FASTCALL co_UserSetCapture(HWND hWnd)
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define ISITHOOKED(HookId)
#define HOOKID_TO_FLAG(HookId)
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define PROCESS_QUERY_INFORMATION
#define FNID_SENDMESSAGEFF
#define FNID_DEFWINDOWPROC
#define TIF_WAITFORINPUTIDLE
#define WNDS_SERVERSIDEWINDOWPROC
#define UserHMGetHandle(obj)
#define WNDS_INTERNALPAINT
#define FNID_SENDMESSAGECALLBACK
struct _THREADINFO * GetW32ThreadInfo(VOID)
#define FNID_SENDMESSAGEWTOOPTION
#define FNID_CALLWNDPROCRET
struct tagDOSENDMESSAGE * PDOSENDMESSAGE
struct _LARGE_STRING * PLARGE_STRING
struct _BROADCASTPARM * PBROADCASTPARM
#define FNID_BROADCASTSYSTEMMESSAGE
#define TIF_MSGPOSCHANGED
#define WNDS_PAINTNOTPROCESSED
#define FNID_SENDNOTIFYMESSAGE
#define RtlEqualMemory(dst, src, len)
_In_ BOOL _In_ HANDLE hProcess
#define MmCopyToCaller(x, y, z)
#define ExFreePoolWithTag(_P, _T)
static PLARGE_INTEGER Time
VOID FASTCALL ClearMsgBitsMask(PTHREADINFO pti, UINT MessageBits)
BOOLEAN FASTCALL co_MsqDispatchOneSentMessage(_In_ PTHREADINFO pti)
BOOL APIENTRY co_MsqPeekHardwareMessage(IN PTHREADINFO pti, IN BOOL Remove, IN PWND Window, IN UINT MsgFilterLow, IN UINT MsgFilterHigh, IN UINT QSflags, OUT MSG *pMsg)
VOID FASTCALL IntCoalesceMouseMove(PTHREADINFO pti)
NTSTATUS FASTCALL co_MsqSendMessage(PTHREADINFO ptirec, HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uTimeout, BOOL Block, INT HookMessage, ULONG_PTR *uResult)
VOID FASTCALL MsqPostMessage(PTHREADINFO pti, MSG *Msg, BOOLEAN HardwareMessage, DWORD MessageBits, DWORD dwQEvent, LONG_PTR ExtraInfo)
BOOL FASTCALL MsqIsHung(PTHREADINFO pti, DWORD TimeOut)
NTSTATUS FASTCALL co_MsqWaitForNewMessages(PTHREADINFO pti, PWND WndFilter, UINT MsgFilterMin, UINT MsgFilterMax)
BOOLEAN APIENTRY MsqPeekMessage(IN PTHREADINFO pti, IN BOOLEAN Remove, IN PWND Window, IN UINT MsgFilterLow, IN UINT MsgFilterHigh, IN UINT QSflags, OUT LONG_PTR *ExtraInfo, OUT DWORD *dwQEvent, OUT PMSG Message)
VOID FASTCALL MsqWakeQueue(PTHREADINFO pti, DWORD MessageBits, BOOL KeyEvent)
PUSER_SENT_MESSAGE FASTCALL AllocateUserMessage(BOOL KEvent)
LRESULT FASTCALL co_IntPostOrSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
NTSYSAPI NTSTATUS NTAPI ZwYieldExecution(VOID)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
_Out_ PKAPC_STATE ApcState
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
BOOLEAN NTAPI PsGetProcessExitProcessCalled(PEPROCESS Process)
POBJECT_TYPE PsProcessType
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
NTSTATUS NTAPI PsLookupThreadByThreadId(IN HANDLE ThreadId, OUT PETHREAD *Thread)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
#define STATUS_ACCESS_VIOLATION
LRESULT FASTCALL IntDefWindowProc(PWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi)
BOOL FASTCALL IntMakeHungWindowGhosted(HWND hwndHung)
PHOOK FASTCALL IntGetNextHook(PHOOK Hook)
LRESULT APIENTRY co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Wnd, INT Cmd)
PWINSTATION_OBJECT InputWindowStation
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
struct _THREADINFO * PTHREADINFO
struct _PROCESSINFO * PPROCESSINFO
static __inline VOID UserDerefObjectCo(PVOID obj)
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
Implementation of the Explorer desktop window.
struct _LIST_ENTRY * Flink
struct _DESKTOPINFO * pDeskInfo
struct tagHOOK * sphkCurrent
struct _CLIENTINFO * pClientInfo
PKEVENT pEventQueueServer
struct _CLIENTTHREADINFO * pcti
LIST_ENTRY SentMessagesListHead
struct _USER_MESSAGE_QUEUE * MessageQueue
LIST_ENTRY DesktopListHead
UNICODE_STRING ModuleName
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define WM_COPYGLOBALDATA
#define WM_QUERYDROPOBJECT
VOID FASTCALL IntPaintWindow(PWND Window)
BOOL FASTCALL IntGetPaintMessage(PWND Window, UINT MsgFilterMin, UINT MsgFilterMax, PTHREADINFO Thread, MSG *Message, BOOL Remove)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
BOOLEAN co_UserDestroyWindow(PVOID Object)
static __inline PVOID UserHeapAlloc(SIZE_T Bytes)
static __inline PVOID UserHeapAddressToUser(PVOID lpMem)
static __inline BOOL UserHeapFree(PVOID lpMem)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
_Must_inspect_result_ _In_ WDFCMRESLIST List
#define IntReferenceProcessInfo(ppi)
#define W32PF_WAITFORINPUTIDLE
#define IntDereferenceProcessInfo(ppi)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
LRESULT APIENTRY co_IntCallHookProc(INT HookId, INT Code, WPARAM wParam, LPARAM lParam, HOOKPROC Proc, INT Mod, ULONG_PTR offPfn, BOOLEAN Ansi, PUNICODE_STRING ModuleName)
VOID APIENTRY co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback, HWND hWnd, UINT Msg, ULONG_PTR CompletionCallbackContext, LRESULT Result)
LRESULT APIENTRY co_IntCallWindowProc(WNDPROC Proc, BOOLEAN IsAnsiProc, HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam, INT lParamBufferSize)
BOOL APIENTRY IntDdePostMessageHook(IN PWND pWnd, IN UINT Msg, IN WPARAM wParam, IN OUT LPARAM *lParam, IN OUT LONG_PTR *ExtraInfo)
BOOL APIENTRY IntDdeGetMessageHook(PMSG pMsg, LONG_PTR ExtraInfo)
BOOL FASTCALL IntDdeSendMessageHook(PWND pWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
PWND FASTCALL UserGetDesktopWindow(VOID)
BOOL FASTCALL DesktopWindowProc(PWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
BOOL FASTCALL UserMessageWindowProc(PWND pwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
PTHREADINFO gptiForeground
#define UserIsMessageWindow(pWnd)
#define UserIsDesktopWindow(pWnd)
LRESULT APIENTRY co_EVENT_CallEvents(DWORD event, HWND hwnd, UINT_PTR idObject, LONG_PTR idChild)
BOOL FASTCALL IntTranslateKbdMessage(LPMSG lpMsg, UINT flags)
struct tagMSGMEMORY * PMSGMEMORY
static MSGMEMORY g_MsgMemory[]
UINT FASTCALL GetWakeMask(UINT first, UINT last)
BOOL FASTCALL IntCallMsgFilter(LPMSG lpmsg, INT code)
#define MMS_SIZE_LPARAMSZ
BOOL APIENTRY NtUserDragDetect(HWND hWnd, POINT pt)
static LRESULT FASTCALL co_IntSendMessageTimeoutSingle(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uFlags, UINT uTimeout, ULONG_PTR *uResult)
#define MMS_SIZE_WPARAMWCHAR
static int is_pointer_message(UINT message, WPARAM wparam)
VOID FASTCALL IdlePing(VOID)
static VOID FASTCALL IntCallWndProcRet(PWND Window, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *uResult)
DWORD APIENTRY IntGetQueueStatus(DWORD Changes)
BOOL APIENTRY NtUserCallMsgFilter(LPMSG lpmsg, INT code)
LRESULT FASTCALL IntDispatchMessage(PMSG pMsg)
static UINT FASTCALL MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
DWORD APIENTRY NtUserWaitForInputIdle(IN HANDLE hProcess, IN DWORD dwMilliseconds, IN BOOL bSharedWow)
static LRESULT FASTCALL co_IntDoSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, PDOSENDMESSAGE dsm)
BOOL FASTCALL IntMsgCreateStructW(PWND Window, CREATESTRUCTW *pCsw, CREATESTRUCTW *Cs, PVOID *ppszClass, PVOID *ppszName)
BOOL APIENTRY NtUserPeekMessage(PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg)
BOOL APIENTRY NtUserMessageCall(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR ResultInfo, DWORD dwType, BOOL Ansi)
LRESULT FASTCALL co_IntSendMessageWithCallBack(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, SENDASYNCPROC CompletionCallback, ULONG_PTR CompletionCallbackContext, ULONG_PTR *uResult)
static const unsigned int message_pointer_flags[]
BOOL APIENTRY NtUserWaitMessage(VOID)
BOOL APIENTRY IntInitMessagePumpHook(VOID)
struct tagMSGMEMORY MSGMEMORY
LRESULT FASTCALL co_IntSendMessageNoWait(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL APIENTRY NtUserPostThreadMessage(DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL FASTCALL UserSendNotifyMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
NTSTATUS FASTCALL IntInitMessageImpl(VOID)
BOOL APIENTRY NtUserTranslateMessage(LPMSG lpMsg, UINT flags)
WCHAR StrUserKernel[3][20]
static BOOL is_message_broadcastable(UINT msg)
static NTSTATUS FASTCALL CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEntry)
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL APIENTRY NtUserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL FASTCALL co_IntWaitMessage(PWND Window, UINT MsgFilterMin, UINT MsgFilterMax)
PTHREADINFO FASTCALL IntSendTo(PWND Window, PTHREADINFO ptiCur, UINT Msg)
LRESULT FASTCALL co_IntSendMessageTimeout(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uFlags, UINT uTimeout, ULONG_PTR *uResult)
BOOL APIENTRY co_IntGetPeekMessage(PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg, BOOL bGMSG)
static INT PosInArray(_In_ PCWSTR String)
static NTSTATUS PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL NonPagedPoolNeeded)
#define MMS_FLAG_READWRITE
VOID FASTCALL IdlePong(VOID)
BOOL APIENTRY co_IntPeekMessage(PMSG Msg, PWND Window, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg, LONG_PTR *ExtraInfo, BOOL bGMSG)
LRESULT APIENTRY NtUserDispatchMessage(PMSG UnsafeMsgInfo)
BOOL APIENTRY IntUninitMessagePumpHook(VOID)
static VOID FASTCALL IntCallWndProc(PWND Window, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
static PMSGMEMORY FASTCALL FindMsgMemory(UINT Msg)
BOOL FASTCALL UserPostThreadMessage(PTHREADINFO pti, UINT Msg, WPARAM wParam, LPARAM lParam)
LRESULT APIENTRY ScrollBarWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
static NTSTATUS FASTCALL CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg)
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
static LRESULT handle_internal_message(PWND pWnd, UINT msg, WPARAM wparam, LPARAM lparam)
static NTSTATUS UnpackParam(LPARAM lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL NonPagedPoolUsed)
NTSTATUS FASTCALL IntCleanupMessageImpl(VOID)
UINT lParamMemorySize(UINT Msg, WPARAM wParam, LPARAM lParam)
static LRESULT handle_internal_events(PTHREADINFO pti, PWND pWnd, DWORD dwQEvent, LONG_PTR ExtraInfo, PMSG pMsg)
BOOL APIENTRY NtUserGetMessage(PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax)
LONG NTAPI UserGetSystemMetrics(ULONG Index)
BOOL FASTCALL ValidateTimerCallback(PTHREADINFO pti, LPARAM lParam)
BOOL FASTCALL PostTimerMessages(PWND Window)
PTIMER FASTCALL FindSystemTimer(PMSG pMsg)
HWND *FASTCALL IntWinListChildren(PWND Window)
LRESULT co_UserFreeWindow(PWND Window, PPROCESSINFO ProcessData, PTHREADINFO ThreadData, BOOLEAN SendMessages)
PWND FASTCALL VerifyWnd(PWND pWnd)
ENGAPI ULONG APIENTRY EngGetLastError(VOID)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define ERROR_MESSAGE_SYNC_ONLY
#define ERROR_INVALID_WINDOW_HANDLE
#define ERROR_INVALID_FLAGS
#define ERROR_INTERNAL_ERROR
struct tagMDINEXTMENU MDINEXTMENU
#define LB_FINDSTRINGEXACT
void(CALLBACK * SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT)
#define WH_CALLWNDPROCRET
#define WM_WINDOWPOSCHANGING
struct tagNCCALCSIZE_PARAMS NCCALCSIZE_PARAMS
#define QS_ALLPOSTMESSAGE
struct tagCREATESTRUCTW CREATESTRUCTW
struct tagMEASUREITEMSTRUCT MEASUREITEMSTRUCT
struct _WINDOWPOS WINDOWPOS
#define CB_FINDSTRINGEXACT
struct tagDRAWITEMSTRUCT DRAWITEMSTRUCT
#define WM_ASKCBFORMATNAME
struct tagMINMAXINFO MINMAXINFO
#define CB_GETDROPPEDCONTROLRECT
struct tagCOPYDATASTRUCT COPYDATASTRUCT
struct tagSTYLESTRUCT STYLESTRUCT
struct tagHELPINFO HELPINFO
#define BROADCAST_QUERY_DENY
struct _WINDOWPOS * PWINDOWPOS
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define WH_FOREGROUNDIDLE
#define WM_WINDOWPOSCHANGED
_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
#define ObDereferenceObject
#define RtlUnicodeStringToAnsiSize(String)