windows的消息队列定义: /* * Message Queue structure. * * Note, if you need to add a WORD sized value, * do so after xbtnDblClk. */ typedef struct tagQ { MLIST mlInput; // raw mouse and key message list. PTHREADINFO ptiSysLock; // Thread currently allowed to process input ULONG_PTR idSysLock; // Last message removed ULONG_PTR idSysPeek; // Last message peeked PTHREADINFO ptiMouse; // Last thread to get mouse msg. PTHREADINFO ptiKeyboard; PWND spwndCapture; PWND spwndFocus; PWND spwndActive; PWND spwndActivePrev; UINT codeCapture; UINT msgDblClk; WORD xbtnDblClk; DWORD timeDblClk; HWND hwndDblClk; POINT ptDblClk; BYTE afKeyRecentDown[CBKEYSTATERECENTDOWN]; BYTE afKeyState[CBKEYSTATE]; CARET caret; PCURSOR spcurCurrent; int iCursorLevel; DWORD QF_flags; // QF_ flags go here USHORT cThreads; // Count of threads using this queue USHORT cLockCount; // Count of threads that don't want this queue freed UINT msgJournal; LONG_PTR ExtraInfo; } Q;详细处理过程,在ntos\w32\ntuser\kernel\input.c里头。
/*
* Message Queue structure.
*
* Note, if you need to add a WORD sized value,
* do so after xbtnDblClk.
*/
typedef struct tagQ {
MLIST mlInput; // raw mouse and key message list. PTHREADINFO ptiSysLock; // Thread currently allowed to process input
ULONG_PTR idSysLock; // Last message removed
ULONG_PTR idSysPeek; // Last message peeked PTHREADINFO ptiMouse; // Last thread to get mouse msg.
PTHREADINFO ptiKeyboard; PWND spwndCapture;
PWND spwndFocus;
PWND spwndActive;
PWND spwndActivePrev; UINT codeCapture;
UINT msgDblClk;
WORD xbtnDblClk;
DWORD timeDblClk;
HWND hwndDblClk;
POINT ptDblClk; BYTE afKeyRecentDown[CBKEYSTATERECENTDOWN];
BYTE afKeyState[CBKEYSTATE]; CARET caret; PCURSOR spcurCurrent;
int iCursorLevel; DWORD QF_flags; // QF_ flags go here USHORT cThreads; // Count of threads using this queue
USHORT cLockCount; // Count of threads that don't want this queue freed UINT msgJournal;
LONG_PTR ExtraInfo;
} Q;详细处理过程,在ntos\w32\ntuser\kernel\input.c里头。