2003-05-18 17:16:18 +00:00
|
|
|
/*
|
|
|
|
* ReactOS W32 Subsystem
|
|
|
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
2003-09-29 19:38:30 +00:00
|
|
|
/* $Id: msgqueue.c,v 1.25 2003/09/29 19:38:30 weiden Exp $
|
2001-06-12 17:51:51 +00:00
|
|
|
*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* PURPOSE: Message queues
|
|
|
|
* FILE: subsys/win32k/ntuser/msgqueue.c
|
|
|
|
* PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
* REVISION HISTORY:
|
|
|
|
* 06-06-2001 CSH Created
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
#include <ddk/ntddk.h>
|
|
|
|
#include <win32k/win32k.h>
|
|
|
|
#include <include/msgqueue.h>
|
2002-07-04 19:56:38 +00:00
|
|
|
#include <include/callback.h>
|
2002-10-31 00:03:31 +00:00
|
|
|
#include <include/window.h>
|
|
|
|
#include <include/winpos.h>
|
|
|
|
#include <include/class.h>
|
2003-09-29 19:38:30 +00:00
|
|
|
#include <include/object.h>
|
2001-06-12 17:51:51 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
2003-09-29 19:38:30 +00:00
|
|
|
#include <win32k/debug1.h>
|
2001-06-12 17:51:51 +00:00
|
|
|
#include <debug.h>
|
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
2002-10-31 00:03:31 +00:00
|
|
|
#define SYSTEM_MESSAGE_QUEUE_SIZE (256)
|
|
|
|
|
|
|
|
static MSG SystemMessageQueue[SYSTEM_MESSAGE_QUEUE_SIZE];
|
|
|
|
static ULONG SystemMessageQueueHead = 0;
|
|
|
|
static ULONG SystemMessageQueueTail = 0;
|
|
|
|
static ULONG SystemMessageQueueCount = 0;
|
2003-08-26 19:26:02 +00:00
|
|
|
static ULONG SystemMessageQueueMouseMove = -1;
|
2002-10-31 00:03:31 +00:00
|
|
|
static KSPIN_LOCK SystemMessageQueueLock;
|
|
|
|
|
|
|
|
static ULONG HardwareMessageQueueStamp = 0;
|
|
|
|
static LIST_ENTRY HardwareMessageQueueHead;
|
|
|
|
static FAST_MUTEX HardwareMessageQueueLock;
|
|
|
|
|
|
|
|
static KEVENT HardwareMessageEvent;
|
2002-01-13 22:52:08 +00:00
|
|
|
|
2003-07-25 23:53:36 +00:00
|
|
|
static PAGED_LOOKASIDE_LIST MessageLookasideList;
|
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
2003-08-02 16:53:08 +00:00
|
|
|
/* check the queue status */
|
|
|
|
inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE Queue )
|
|
|
|
{
|
|
|
|
return ((Queue->WakeBits & Queue->WakeMask) || (Queue->ChangedBits & Queue->ChangedMask));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set some queue bits */
|
|
|
|
inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE Queue, WORD Bits )
|
|
|
|
{
|
|
|
|
Queue->WakeBits |= Bits;
|
|
|
|
Queue->ChangedBits |= Bits;
|
|
|
|
if (MsqIsSignaled( Queue )) KeSetEvent(&Queue->NewMessages, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* clear some queue bits */
|
|
|
|
inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE Queue, WORD Bits )
|
|
|
|
{
|
|
|
|
Queue->WakeBits &= ~Bits;
|
|
|
|
Queue->ChangedBits &= ~Bits;
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&Queue->Lock);
|
|
|
|
Queue->PaintCount++;
|
|
|
|
Queue->PaintPosted = TRUE;
|
2003-05-21 22:58:43 +00:00
|
|
|
KeSetEvent(&Queue->NewMessages, IO_NO_INCREMENT, FALSE);
|
2002-07-04 19:56:38 +00:00
|
|
|
ExReleaseFastMutex(&Queue->Lock);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&Queue->Lock);
|
|
|
|
Queue->PaintCount--;
|
|
|
|
if (Queue->PaintCount == 0)
|
|
|
|
{
|
|
|
|
Queue->PaintPosted = FALSE;
|
|
|
|
}
|
|
|
|
ExReleaseFastMutex(&Queue->Lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
NTSTATUS FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeImpl(VOID)
|
|
|
|
{
|
2002-10-31 00:03:31 +00:00
|
|
|
/*CurrentFocusMessageQueue = NULL;*/
|
|
|
|
InitializeListHead(&HardwareMessageQueueHead);
|
|
|
|
KeInitializeEvent(&HardwareMessageEvent, NotificationEvent, 0);
|
|
|
|
KeInitializeSpinLock(&SystemMessageQueueLock);
|
|
|
|
ExInitializeFastMutex(&HardwareMessageQueueLock);
|
2003-07-25 23:53:36 +00:00
|
|
|
|
|
|
|
ExInitializePagedLookasideList(&MessageLookasideList,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
0,
|
|
|
|
sizeof(USER_MESSAGE),
|
|
|
|
0,
|
|
|
|
256);
|
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
return(STATUS_SUCCESS);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2003-08-26 19:26:02 +00:00
|
|
|
MsqInsertSystemMessage(MSG* Msg, BOOL RemMouseMoveMsg)
|
|
|
|
{
|
2002-10-31 00:03:31 +00:00
|
|
|
KIRQL OldIrql;
|
2003-08-25 14:54:06 +00:00
|
|
|
ULONG mmov = (ULONG)-1;
|
2002-10-31 00:03:31 +00:00
|
|
|
|
|
|
|
KeAcquireSpinLock(&SystemMessageQueueLock, &OldIrql);
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2003-08-25 14:26:30 +00:00
|
|
|
/* only insert WM_MOUSEMOVE messages if not already in system message queue */
|
2003-08-26 19:26:02 +00:00
|
|
|
if((Msg->message == WM_MOUSEMOVE) && RemMouseMoveMsg)
|
|
|
|
mmov = SystemMessageQueueMouseMove;
|
|
|
|
|
2003-08-25 14:54:06 +00:00
|
|
|
if(mmov != (ULONG)-1)
|
2003-08-25 14:26:30 +00:00
|
|
|
{
|
2003-08-25 23:55:46 +00:00
|
|
|
/* insert message at the queue head */
|
2003-08-26 19:26:02 +00:00
|
|
|
while (mmov != SystemMessageQueueHead )
|
2003-08-25 14:54:06 +00:00
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
ULONG prev = mmov ? mmov - 1 : SYSTEM_MESSAGE_QUEUE_SIZE - 1;
|
|
|
|
SystemMessageQueue[mmov] = SystemMessageQueue[prev];
|
|
|
|
mmov = prev;
|
2003-08-25 14:54:06 +00:00
|
|
|
}
|
|
|
|
SystemMessageQueue[SystemMessageQueueHead] = *Msg;
|
2003-08-25 14:26:30 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (SystemMessageQueueCount == SYSTEM_MESSAGE_QUEUE_SIZE)
|
2002-10-31 00:03:31 +00:00
|
|
|
{
|
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
|
|
|
return;
|
|
|
|
}
|
2003-08-25 14:26:30 +00:00
|
|
|
SystemMessageQueue[SystemMessageQueueTail] = *Msg;
|
2003-08-26 19:26:02 +00:00
|
|
|
if(Msg->message == WM_MOUSEMOVE)
|
|
|
|
SystemMessageQueueMouseMove = SystemMessageQueueTail;
|
|
|
|
SystemMessageQueueTail =
|
2003-08-25 14:26:30 +00:00
|
|
|
(SystemMessageQueueTail + 1) % SYSTEM_MESSAGE_QUEUE_SIZE;
|
|
|
|
SystemMessageQueueCount++;
|
|
|
|
}
|
2002-10-31 00:03:31 +00:00
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
|
|
|
KeSetEvent(&HardwareMessageEvent, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOL STATIC STDCALL
|
2002-10-31 00:03:31 +00:00
|
|
|
MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
2003-08-26 19:26:02 +00:00
|
|
|
PUSER_MESSAGE Message, BOOL Remove,
|
2002-10-31 00:03:31 +00:00
|
|
|
PWINDOW_OBJECT ScopeWin, PUSHORT HitTest,
|
|
|
|
PPOINT ScreenPoint, PBOOL MouseClick)
|
|
|
|
{
|
|
|
|
USHORT Msg = Message->Msg.message;
|
2003-09-29 19:38:30 +00:00
|
|
|
PWINDOW_OBJECT Window = NULL;
|
|
|
|
HWND Wnd;
|
2002-10-31 00:03:31 +00:00
|
|
|
POINT Point;
|
2003-09-28 14:21:26 +00:00
|
|
|
|
2003-09-29 19:38:30 +00:00
|
|
|
/* handle WM_MOUSEWHEEL messages differently, we don't need to check where
|
|
|
|
the mouse cursor is, we just send it to the window with the current focus */
|
|
|
|
if(Msg == WM_MOUSEWHEEL)
|
2003-08-29 19:17:32 +00:00
|
|
|
{
|
2003-09-29 19:38:30 +00:00
|
|
|
Wnd = IntGetFocusWindow();
|
2003-09-28 14:21:26 +00:00
|
|
|
|
2003-09-29 19:38:30 +00:00
|
|
|
if(Wnd)
|
2003-09-28 14:21:26 +00:00
|
|
|
{
|
2003-09-29 19:38:30 +00:00
|
|
|
*ScreenPoint = Message->Msg.pt;
|
|
|
|
|
|
|
|
/* FIXME: Check message filter. */
|
|
|
|
|
|
|
|
if(Remove)
|
2003-09-28 14:21:26 +00:00
|
|
|
{
|
2003-09-29 19:38:30 +00:00
|
|
|
Message->Msg.hwnd = Wnd;
|
|
|
|
Message->Msg.lParam = MAKELONG(Message->Msg.pt.x, Message->Msg.pt.y);
|
2003-09-28 14:21:26 +00:00
|
|
|
}
|
2003-09-29 19:38:30 +00:00
|
|
|
return TRUE;
|
2003-09-28 14:21:26 +00:00
|
|
|
}
|
2003-09-29 19:38:30 +00:00
|
|
|
|
|
|
|
ExFreePool(Message);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((Window = IntGetCaptureWindow()) == NULL)
|
|
|
|
{
|
|
|
|
*HitTest = WinPosWindowFromPoint(ScopeWin, Message->Msg.pt, &Window);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*HitTest = HTCLIENT;
|
|
|
|
}
|
2002-10-31 00:03:31 +00:00
|
|
|
|
2003-09-29 19:38:30 +00:00
|
|
|
if (Window == NULL)
|
|
|
|
{
|
|
|
|
ExFreePool(Message);
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Window->MessageQueue != PsGetWin32Thread()->MessageQueue)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&Window->MessageQueue->Lock);
|
|
|
|
InsertTailList(&Window->MessageQueue->HardwareMessagesListHead,
|
|
|
|
&Message->ListEntry);
|
|
|
|
ExReleaseFastMutex(&Window->MessageQueue->Lock);
|
|
|
|
KeSetEvent(&Window->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hWnd != NULL && Window->Self != hWnd &&
|
|
|
|
!IntIsChildWindow(hWnd, Window->Self))
|
|
|
|
{
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Msg == WM_LBUTTONDBLCLK || Msg == WM_RBUTTONDBLCLK || Msg == WM_MBUTTONDBLCLK || Msg == WM_XBUTTONDBLCLK)
|
|
|
|
{
|
|
|
|
if (((*HitTest) != HTCLIENT) || !(IntGetClassLong(Window, GCL_STYLE, FALSE) & CS_DBLCLKS))
|
|
|
|
{
|
|
|
|
Msg -= (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN);
|
|
|
|
/* FIXME set WindowStation's system cursor variables:
|
|
|
|
LastBtnDown to Msg.time
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* FIXME check if the dblclick was made in the same window, if
|
|
|
|
not, change it to a normal click message */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*ScreenPoint = Message->Msg.pt;
|
|
|
|
Point = Message->Msg.pt;
|
2002-10-31 00:03:31 +00:00
|
|
|
|
|
|
|
if ((*HitTest) != HTCLIENT)
|
2003-08-29 19:17:32 +00:00
|
|
|
{
|
2003-09-29 19:38:30 +00:00
|
|
|
switch(Msg)
|
2003-09-28 00:26:13 +00:00
|
|
|
{
|
2003-09-29 19:38:30 +00:00
|
|
|
case WM_XBUTTONDOWN:
|
|
|
|
case WM_XBUTTONUP:
|
|
|
|
case WM_XBUTTONDBLCLK:
|
|
|
|
return FALSE;
|
|
|
|
default:
|
|
|
|
Msg += WM_NCMOUSEMOVE - WM_MOUSEMOVE;
|
|
|
|
Message->Msg.wParam = *HitTest;
|
|
|
|
break;
|
2003-09-28 00:26:13 +00:00
|
|
|
}
|
2003-08-29 19:17:32 +00:00
|
|
|
}
|
2003-09-29 19:38:30 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Point.x -= Window->ClientRect.left;
|
|
|
|
Point.y -= Window->ClientRect.top;
|
|
|
|
}
|
|
|
|
|
2002-10-31 00:03:31 +00:00
|
|
|
/* FIXME: Check message filter. */
|
|
|
|
|
2003-05-21 22:58:43 +00:00
|
|
|
if (Remove)
|
2003-09-29 19:38:30 +00:00
|
|
|
{
|
|
|
|
Message->Msg.hwnd = Window->Self;
|
2003-05-21 22:58:43 +00:00
|
|
|
Message->Msg.message = Msg;
|
|
|
|
Message->Msg.lParam = MAKELONG(Point.x, Point.y);
|
|
|
|
}
|
2002-10-31 00:03:31 +00:00
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOL STDCALL
|
2003-08-26 19:26:02 +00:00
|
|
|
MsqPeekHardwareMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND hWnd,
|
2002-10-31 00:03:31 +00:00
|
|
|
UINT FilterLow, UINT FilterHigh, BOOL Remove,
|
|
|
|
PUSER_MESSAGE* Message)
|
|
|
|
{
|
|
|
|
KIRQL OldIrql;
|
|
|
|
USHORT HitTest;
|
|
|
|
POINT ScreenPoint;
|
|
|
|
BOOL Accept;
|
|
|
|
BOOL MouseClick;
|
|
|
|
PLIST_ENTRY CurrentEntry;
|
|
|
|
ULONG ActiveStamp;
|
|
|
|
PWINDOW_OBJECT DesktopWindow;
|
|
|
|
|
2003-08-19 11:48:50 +00:00
|
|
|
DesktopWindow = IntGetWindowObject(IntGetDesktopWindow());
|
2002-10-31 00:03:31 +00:00
|
|
|
|
|
|
|
/* Process messages in the message queue itself. */
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
|
|
|
CurrentEntry = MessageQueue->HardwareMessagesListHead.Flink;
|
|
|
|
while (CurrentEntry != &MessageQueue->HardwareMessagesListHead)
|
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
PUSER_MESSAGE Current =
|
2002-10-31 00:03:31 +00:00
|
|
|
CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry);
|
|
|
|
CurrentEntry = CurrentEntry->Flink;
|
2003-08-26 19:26:02 +00:00
|
|
|
if (Current->Msg.message >= WM_MOUSEFIRST &&
|
2002-10-31 00:03:31 +00:00
|
|
|
Current->Msg.message <= WM_MOUSELAST)
|
|
|
|
{
|
|
|
|
Accept = MsqTranslateMouseMessage(hWnd, FilterLow, FilterHigh,
|
2003-08-26 19:26:02 +00:00
|
|
|
Current, Remove,
|
2002-10-31 00:03:31 +00:00
|
|
|
DesktopWindow, &HitTest,
|
|
|
|
&ScreenPoint, &MouseClick);
|
|
|
|
if (Accept)
|
|
|
|
{
|
2003-05-21 22:58:43 +00:00
|
|
|
if (Remove)
|
|
|
|
{
|
|
|
|
RemoveEntryList(&Current->ListEntry);
|
|
|
|
}
|
2002-10-31 00:03:31 +00:00
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
*Message = Current;
|
2003-08-19 11:48:50 +00:00
|
|
|
IntReleaseWindowObject(DesktopWindow);
|
2002-10-31 00:03:31 +00:00
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
|
|
|
|
/* Now try the global queue. */
|
|
|
|
ExAcquireFastMutex(&HardwareMessageQueueLock);
|
|
|
|
/* Transfer all messages from the DPC accessible queue to the main queue. */
|
|
|
|
KeAcquireSpinLock(&SystemMessageQueueLock, &OldIrql);
|
|
|
|
while (SystemMessageQueueCount > 0)
|
2003-08-26 19:26:02 +00:00
|
|
|
{
|
2002-10-31 00:03:31 +00:00
|
|
|
PUSER_MESSAGE UserMsg;
|
|
|
|
MSG Msg;
|
|
|
|
|
|
|
|
Msg = SystemMessageQueue[SystemMessageQueueHead];
|
2003-08-26 19:26:02 +00:00
|
|
|
SystemMessageQueueHead =
|
2002-10-31 00:03:31 +00:00
|
|
|
(SystemMessageQueueHead + 1) % SYSTEM_MESSAGE_QUEUE_SIZE;
|
|
|
|
SystemMessageQueueCount--;
|
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
2003-07-25 23:53:36 +00:00
|
|
|
UserMsg = ExAllocateFromPagedLookasideList(&MessageLookasideList);
|
2002-10-31 00:03:31 +00:00
|
|
|
UserMsg->Msg = Msg;
|
|
|
|
InsertTailList(&HardwareMessageQueueHead, &UserMsg->ListEntry);
|
|
|
|
KeAcquireSpinLock(&SystemMessageQueueLock, &OldIrql);
|
|
|
|
}
|
2003-08-26 19:26:02 +00:00
|
|
|
/*
|
|
|
|
* we could set this to -1 conditionally if we find one, but
|
|
|
|
* this is more efficient and just as effective.
|
|
|
|
*/
|
|
|
|
SystemMessageQueueMouseMove = -1;
|
2002-10-31 00:03:31 +00:00
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
|
|
|
HardwareMessageQueueStamp++;
|
|
|
|
|
|
|
|
/* Process messages in the queue until we find one to return. */
|
|
|
|
CurrentEntry = HardwareMessageQueueHead.Flink;
|
|
|
|
while (CurrentEntry != &HardwareMessageQueueHead)
|
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
PUSER_MESSAGE Current =
|
2002-10-31 00:03:31 +00:00
|
|
|
CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry);
|
|
|
|
CurrentEntry = CurrentEntry->Flink;
|
|
|
|
RemoveEntryList(&Current->ListEntry);
|
2003-08-26 19:26:02 +00:00
|
|
|
if (Current->Msg.message >= WM_MOUSEFIRST &&
|
2002-10-31 00:03:31 +00:00
|
|
|
Current->Msg.message <= WM_MOUSELAST)
|
|
|
|
{
|
|
|
|
ActiveStamp = HardwareMessageQueueStamp;
|
|
|
|
ExReleaseFastMutex(&HardwareMessageQueueLock);
|
|
|
|
/* Translate the message. */
|
|
|
|
Accept = MsqTranslateMouseMessage(hWnd, FilterLow, FilterHigh,
|
|
|
|
Current, Remove,
|
|
|
|
DesktopWindow, &HitTest,
|
|
|
|
&ScreenPoint, &MouseClick);
|
|
|
|
ExAcquireFastMutex(&HardwareMessageQueueLock);
|
|
|
|
if (Accept)
|
|
|
|
{
|
|
|
|
/* Check for no more messages in the system queue. */
|
|
|
|
KeAcquireSpinLock(&SystemMessageQueueLock, &OldIrql);
|
|
|
|
if (SystemMessageQueueCount == 0 &&
|
|
|
|
IsListEmpty(&HardwareMessageQueueHead))
|
|
|
|
{
|
|
|
|
KeClearEvent(&HardwareMessageEvent);
|
|
|
|
}
|
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
|
|
|
|
2003-08-26 19:26:02 +00:00
|
|
|
/*
|
2002-10-31 00:03:31 +00:00
|
|
|
If we aren't removing the message then add it to the private
|
|
|
|
queue.
|
|
|
|
*/
|
|
|
|
if (!Remove)
|
|
|
|
{
|
|
|
|
InsertTailList(&MessageQueue->HardwareMessagesListHead,
|
|
|
|
&Current->ListEntry);
|
|
|
|
}
|
|
|
|
ExReleaseFastMutex(&HardwareMessageQueueLock);
|
2003-05-21 22:58:43 +00:00
|
|
|
*Message = Current;
|
2003-08-19 11:48:50 +00:00
|
|
|
IntReleaseWindowObject(DesktopWindow);
|
2002-10-31 00:03:31 +00:00
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
/* If the contents of the queue changed then restart processing. */
|
|
|
|
if (HardwareMessageQueueStamp != ActiveStamp)
|
|
|
|
{
|
|
|
|
CurrentEntry = HardwareMessageQueueHead.Flink;
|
|
|
|
continue;
|
|
|
|
}
|
2003-08-26 19:26:02 +00:00
|
|
|
}
|
2002-10-31 00:03:31 +00:00
|
|
|
}
|
|
|
|
/* Check if the system message queue is now empty. */
|
|
|
|
KeAcquireSpinLock(&SystemMessageQueueLock, &OldIrql);
|
|
|
|
if (SystemMessageQueueCount == 0 && IsListEmpty(&HardwareMessageQueueHead))
|
|
|
|
{
|
|
|
|
KeClearEvent(&HardwareMessageEvent);
|
|
|
|
}
|
|
|
|
KeReleaseSpinLock(&SystemMessageQueueLock, OldIrql);
|
|
|
|
ExReleaseFastMutex(&HardwareMessageQueueLock);
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
2003-07-05 16:04:01 +00:00
|
|
|
PUSER_MESSAGE_QUEUE FocusMessageQueue;
|
2002-01-13 22:52:08 +00:00
|
|
|
PUSER_MESSAGE Message;
|
2003-07-05 16:04:01 +00:00
|
|
|
MSG Msg;
|
|
|
|
|
|
|
|
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
|
|
|
uMsg, wParam, lParam);
|
2002-01-13 22:52:08 +00:00
|
|
|
|
2003-08-19 11:48:50 +00:00
|
|
|
FocusMessageQueue = IntGetFocusMessageQueue();
|
2003-07-05 16:04:01 +00:00
|
|
|
if (FocusMessageQueue == NULL)
|
2002-10-31 00:03:31 +00:00
|
|
|
{
|
2003-07-05 16:04:01 +00:00
|
|
|
DPRINT("No focus message queue\n");
|
2002-10-31 00:03:31 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-07-05 16:04:01 +00:00
|
|
|
if (FocusMessageQueue->FocusWindow != (HWND)0)
|
|
|
|
{
|
|
|
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
|
|
|
Msg.message = uMsg;
|
|
|
|
Msg.wParam = wParam;
|
|
|
|
Msg.lParam = lParam;
|
|
|
|
/* FIXME: Initialize time and point. */
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2003-07-05 16:04:01 +00:00
|
|
|
Message = MsqCreateMessage(&Msg);
|
|
|
|
MsqPostMessage(FocusMessageQueue, Message);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DPRINT("Invalid focus window handle\n");
|
|
|
|
}
|
2002-01-13 22:52:08 +00:00
|
|
|
}
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeMessage(PUSER_MESSAGE Message,
|
|
|
|
LPMSG Msg)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
RtlMoveMemory(&Message->Msg, Msg, sizeof(MSG));
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
PUSER_MESSAGE FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqCreateMessage(LPMSG Msg)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
PUSER_MESSAGE Message;
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2003-07-25 23:53:36 +00:00
|
|
|
Message = ExAllocateFromPagedLookasideList(&MessageLookasideList);
|
2001-06-12 17:51:51 +00:00
|
|
|
if (!Message)
|
2002-01-13 22:52:08 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
MsqInitializeMessage(Message, Msg);
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
return Message;
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqDestroyMessage(PUSER_MESSAGE Message)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-07-25 23:53:36 +00:00
|
|
|
ExFreeToPagedLookasideList(&MessageLookasideList, Message);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqDispatchSentNotifyMessages(PUSER_MESSAGE_QUEUE MessageQueue)
|
|
|
|
{
|
|
|
|
PLIST_ENTRY ListEntry;
|
|
|
|
PUSER_SENT_MESSAGE_NOTIFY Message;
|
|
|
|
|
|
|
|
while (!IsListEmpty(&MessageQueue->SentMessagesListHead))
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
|
|
|
ListEntry = RemoveHeadList(&MessageQueue->SentMessagesListHead);
|
2003-08-26 19:26:02 +00:00
|
|
|
Message = CONTAINING_RECORD(ListEntry, USER_SENT_MESSAGE_NOTIFY,
|
2002-05-06 22:20:32 +00:00
|
|
|
ListEntry);
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
|
2003-08-19 11:48:50 +00:00
|
|
|
IntCallSentMessageCallback(Message->CompletionCallback,
|
2002-05-06 22:20:32 +00:00
|
|
|
Message->hWnd,
|
|
|
|
Message->Msg,
|
|
|
|
Message->CompletionCallbackContext,
|
|
|
|
Message->Result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOLEAN FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqPeekSentMessages(PUSER_MESSAGE_QUEUE MessageQueue)
|
|
|
|
{
|
|
|
|
return(!IsListEmpty(&MessageQueue->SentMessagesListHead));
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOLEAN FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue)
|
|
|
|
{
|
|
|
|
PUSER_SENT_MESSAGE Message;
|
|
|
|
PLIST_ENTRY Entry;
|
|
|
|
LRESULT Result;
|
|
|
|
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage;
|
|
|
|
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
2002-07-04 19:56:38 +00:00
|
|
|
if (IsListEmpty(&MessageQueue->SentMessagesListHead))
|
|
|
|
{
|
2002-07-17 21:04:57 +00:00
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
2002-07-04 19:56:38 +00:00
|
|
|
return(FALSE);
|
|
|
|
}
|
2002-05-06 22:20:32 +00:00
|
|
|
Entry = RemoveHeadList(&MessageQueue->SentMessagesListHead);
|
|
|
|
Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
|
|
|
|
/* Call the window procedure. */
|
2003-08-19 11:48:50 +00:00
|
|
|
Result = IntCallWindowProc(NULL,
|
2002-05-06 22:20:32 +00:00
|
|
|
Message->Msg.hwnd,
|
|
|
|
Message->Msg.message,
|
|
|
|
Message->Msg.wParam,
|
|
|
|
Message->Msg.lParam);
|
|
|
|
|
|
|
|
/* Let the sender know the result. */
|
|
|
|
if (Message->Result != NULL)
|
|
|
|
{
|
|
|
|
*Message->Result = Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Notify the sender. */
|
|
|
|
if (Message->CompletionEvent != NULL)
|
|
|
|
{
|
|
|
|
KeSetEvent(Message->CompletionEvent, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Notify the sender if they specified a callback. */
|
|
|
|
if (Message->CompletionCallback != NULL)
|
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
NotifyMessage = ExAllocatePool(NonPagedPool,
|
2002-05-06 22:20:32 +00:00
|
|
|
sizeof(USER_SENT_MESSAGE_NOTIFY));
|
2003-08-26 19:26:02 +00:00
|
|
|
NotifyMessage->CompletionCallback =
|
2002-05-06 22:20:32 +00:00
|
|
|
Message->CompletionCallback;
|
|
|
|
NotifyMessage->CompletionCallbackContext =
|
|
|
|
Message->CompletionCallbackContext;
|
|
|
|
NotifyMessage->Result = Result;
|
|
|
|
NotifyMessage->hWnd = Message->Msg.hwnd;
|
|
|
|
NotifyMessage->Msg = Message->Msg.message;
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqSendNotifyMessage(Message->CompletionQueue, NotifyMessage);
|
2002-05-06 22:20:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ExFreePool(Message);
|
2002-07-04 19:56:38 +00:00
|
|
|
return(TRUE);
|
2002-05-06 22:20:32 +00:00
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
2003-08-26 19:26:02 +00:00
|
|
|
InsertTailList(&MessageQueue->NotifyMessagesListHead,
|
2002-05-06 22:20:32 +00:00
|
|
|
&NotifyMessage->ListEntry);
|
2003-05-21 22:58:43 +00:00
|
|
|
KeSetEvent(&MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
2002-05-06 22:20:32 +00:00
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
PUSER_SENT_MESSAGE Message)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
|
|
|
InsertTailList(&MessageQueue->SentMessagesListHead, &Message->ListEntry);
|
2003-05-21 22:58:43 +00:00
|
|
|
KeSetEvent(&MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
2002-05-06 22:20:32 +00:00
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-10-31 00:03:31 +00:00
|
|
|
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_MESSAGE Message)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2002-01-13 22:52:08 +00:00
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
2002-10-31 00:03:31 +00:00
|
|
|
InsertTailList(&MessageQueue->PostedMessagesListHead,
|
|
|
|
&Message->ListEntry);
|
2002-01-13 22:52:08 +00:00
|
|
|
KeSetEvent(&MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-05-21 22:58:43 +00:00
|
|
|
VOID FASTCALL
|
|
|
|
MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode)
|
|
|
|
{
|
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
|
|
|
MessageQueue->QuitPosted = TRUE;
|
|
|
|
MessageQueue->QuitExitCode = ExitCode;
|
|
|
|
KeSetEvent(&MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOLEAN STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
IN BOOLEAN Hardware,
|
|
|
|
IN BOOLEAN Remove,
|
|
|
|
IN HWND Wnd,
|
|
|
|
IN UINT MsgFilterLow,
|
|
|
|
IN UINT MsgFilterHigh,
|
|
|
|
OUT PUSER_MESSAGE* Message)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
PLIST_ENTRY CurrentEntry;
|
2002-01-13 22:52:08 +00:00
|
|
|
PUSER_MESSAGE CurrentMessage;
|
|
|
|
PLIST_ENTRY ListHead;
|
2002-10-31 00:03:31 +00:00
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
if (Hardware)
|
|
|
|
{
|
2002-10-31 00:03:31 +00:00
|
|
|
return(MsqPeekHardwareMessage(MessageQueue, Wnd,
|
|
|
|
MsgFilterLow, MsgFilterHigh,
|
|
|
|
Remove, Message));
|
2002-01-13 22:52:08 +00:00
|
|
|
}
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2002-10-31 00:03:31 +00:00
|
|
|
ExAcquireFastMutex(&MessageQueue->Lock);
|
|
|
|
CurrentEntry = MessageQueue->PostedMessagesListHead.Flink;
|
|
|
|
ListHead = &MessageQueue->PostedMessagesListHead;
|
2002-01-13 22:52:08 +00:00
|
|
|
while (CurrentEntry != ListHead)
|
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
|
2002-01-13 22:52:08 +00:00
|
|
|
ListEntry);
|
|
|
|
if ((Wnd == 0 || Wnd == CurrentMessage->Msg.hwnd) &&
|
|
|
|
((MsgFilterLow == 0 && MsgFilterHigh == 0) ||
|
|
|
|
(MsgFilterLow <= CurrentMessage->Msg.message &&
|
|
|
|
MsgFilterHigh >= CurrentMessage->Msg.message)))
|
|
|
|
{
|
|
|
|
if (Remove)
|
|
|
|
{
|
|
|
|
RemoveEntryList(&CurrentMessage->ListEntry);
|
|
|
|
}
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
*Message = CurrentMessage;
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
CurrentEntry = CurrentEntry->Flink;
|
|
|
|
}
|
|
|
|
ExReleaseFastMutex(&MessageQueue->Lock);
|
|
|
|
return(FALSE);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
NTSTATUS FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue)
|
|
|
|
{
|
2002-10-31 00:03:31 +00:00
|
|
|
PVOID WaitObjects[2] = {&MessageQueue->NewMessages, &HardwareMessageEvent};
|
|
|
|
return(KeWaitForMultipleObjects(2,
|
|
|
|
WaitObjects,
|
|
|
|
WaitAny,
|
|
|
|
Executive,
|
|
|
|
UserMode,
|
|
|
|
TRUE,
|
|
|
|
NULL,
|
|
|
|
NULL));
|
2002-01-13 22:52:08 +00:00
|
|
|
}
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2002-01-13 22:52:08 +00:00
|
|
|
InitializeListHead(&MessageQueue->PostedMessagesListHead);
|
|
|
|
InitializeListHead(&MessageQueue->SentMessagesListHead);
|
2002-10-31 00:03:31 +00:00
|
|
|
InitializeListHead(&MessageQueue->HardwareMessagesListHead);
|
2002-01-13 22:52:08 +00:00
|
|
|
ExInitializeFastMutex(&MessageQueue->Lock);
|
|
|
|
MessageQueue->QuitPosted = FALSE;
|
|
|
|
MessageQueue->QuitExitCode = 0;
|
2003-05-21 22:58:43 +00:00
|
|
|
KeInitializeEvent(&MessageQueue->NewMessages, SynchronizationEvent, FALSE);
|
2002-01-13 22:52:08 +00:00
|
|
|
MessageQueue->QueueStatus = 0;
|
|
|
|
MessageQueue->FocusWindow = NULL;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2002-01-13 22:52:08 +00:00
|
|
|
PLIST_ENTRY CurrentEntry;
|
|
|
|
PUSER_MESSAGE CurrentMessage;
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
CurrentEntry = MessageQueue->PostedMessagesListHead.Flink;
|
|
|
|
while (CurrentEntry != &MessageQueue->PostedMessagesListHead)
|
|
|
|
{
|
2003-08-26 19:26:02 +00:00
|
|
|
CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
|
2002-01-13 22:52:08 +00:00
|
|
|
ListEntry);
|
|
|
|
CurrentEntry = CurrentEntry->Flink;
|
2003-07-25 23:53:36 +00:00
|
|
|
MsqDestroyMessage(CurrentMessage);
|
2002-01-13 22:52:08 +00:00
|
|
|
}
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
PUSER_MESSAGE_QUEUE FASTCALL
|
2001-06-12 17:51:51 +00:00
|
|
|
MsqCreateMessageQueue(VOID)
|
|
|
|
{
|
|
|
|
PUSER_MESSAGE_QUEUE MessageQueue;
|
|
|
|
|
2003-08-26 19:26:02 +00:00
|
|
|
MessageQueue = (PUSER_MESSAGE_QUEUE)ExAllocatePool(PagedPool,
|
2002-01-13 22:52:08 +00:00
|
|
|
sizeof(USER_MESSAGE_QUEUE));
|
2001-06-12 17:51:51 +00:00
|
|
|
if (!MessageQueue)
|
2002-01-13 22:52:08 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
MsqInitializeMessageQueue(MessageQueue);
|
2003-08-26 19:26:02 +00:00
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
return MessageQueue;
|
|
|
|
}
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
MsqFreeMessageQueue(MessageQueue);
|
|
|
|
ExFreePool(MessageQueue);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|