4 #define W32PF_CONSOLEAPPLICATION 0x00000001
5 #define W32PF_FORCEOFFFEEDBACK 0x00000002
6 #define W32PF_STARTGLASS 0x00000004
7 #define W32PF_WOW 0x00000008
8 #define W32PF_READSCREENACCESSGRANTED 0x00000010
9 #define W32PF_INITIALIZED 0x00000020
10 #define W32PF_APPSTARTING 0x00000040
11 #define W32PF_WOW64 0x00000080
12 #define W32PF_ALLOWFOREGROUNDACTIVATE 0x00000100
13 #define W32PF_OWNDCCLEANUP 0x00000200
14 #define W32PF_SHOWSTARTGLASSCALLED 0x00000400
15 #define W32PF_FORCEBACKGROUNDPRIORITY 0x00000800
16 #define W32PF_TERMINATED 0x00001000
17 #define W32PF_CLASSESREGISTERED 0x00002000
18 #define W32PF_THREADCONNECTED 0x00004000
19 #define W32PF_PROCESSCONNECTED 0x00008000
20 #define W32PF_SETFOREGROUNDALLOWED 0x00008000
21 #define W32PF_WAKEWOWEXEC 0x00010000
22 #define W32PF_WAITFORINPUTIDLE 0x00020000
23 #define W32PF_IOWINSTA 0x00040000
24 #define W32PF_CONSOLEFOREGROUND 0x00080000
25 #define W32PF_OLELOADED 0x00100000
26 #define W32PF_SCREENSAVER 0x00200000
27 #define W32PF_IDLESCREENSAVER 0x00400000
28 #define W32PF_ICONTITLEREGISTERED 0x10000000
29 #define W32PF_DPIAWARE 0x20000000
31 #define W32PF_NOWINDOWGHOSTING (0x01000000)
32 #define W32PF_MANUALGUICHECK (0x02000000)
33 #define W32PF_CREATEDWINORDC (0x04000000)
34 #define W32PF_APIHOOKLOADED (0x08000000)
38 typedef enum _QS_ROS_TYPES
47 }QS_ROS_TYPES
,*PQS_ROS_TYPES
;
49 extern BOOL ClientPfnInit
;
50 extern HINSTANCE hModClient
;
51 extern HANDLE hModuleWin
; // This Win32k Instance.
52 extern PCLS SystemClassList
;
53 extern BOOL RegisteredSysClasses
;
55 typedef struct _WIN32HEAP WIN32HEAP
, *PWIN32HEAP
;
58 // FIXME: Move to ntuser.h
66 typedef struct _W32THREAD
75 DWORD dwEngAcquireCount
;
78 } W32THREAD
, *PW32THREAD
;
80 typedef struct _THREADINFO
85 struct _USER_MESSAGE_QUEUE
* MessageQueue
;
86 struct tagKL
* KeyboardLayout
;
87 PCLIENTTHREADINFO pcti
;
88 struct _DESKTOP
* rpdesk
;
89 PDESKTOPINFO pDeskInfo
;
90 PCLIENTINFO pClientInfo
;
92 PUNICODE_STRING pstrAppName
;
93 /* Messages that are currently dispatched to other threads */
94 LIST_ENTRY DispatchingMessagesHead
; // psmsSent
95 struct _USER_SENT_MESSAGE
*pusmCurrent
;
96 /* Queue of messages sent to the queue. */
97 LIST_ENTRY SentMessagesListHead
; // psmsReceiveList
98 /* Last time PeekMessage() was called. */
101 /* True if a WM_QUIT message is pending. */
103 /* The quit exit code. */
106 UINT cPaintsReady
; /* Count of paints pending. */
107 UINT cTimersReady
; /* Count of timers pending. */
110 DWORD dwCompatFlags2
;
111 struct _USER_MESSAGE_QUEUE
* pqAttach
;
112 PTHREADINFO ptiSibling
;
115 LPARAM lParamHkCurrent
;
116 WPARAM wParamHkCurrent
;
117 struct tagSBTRACK
* pSBTrack
;
118 /* Set if there are new messages specified by WakeMask in any of the queues. */
119 HANDLE hEventQueueClient
;
120 /* Handle for the above event (in the context of the process owning the queue). */
121 PKEVENT pEventQueueServer
;
126 /* Queue of messages posted to the queue. */
127 LIST_ENTRY PostedMessagesListHead
; // mlPost
128 UINT fsChangeBitsRemoved
;
131 LIST_ENTRY aphkStart
[NB_HOOKS
];
132 CLIENTTHREADINFO cti
; // Used only when no Desktop or pcti NULL.
136 /* Thread Queue state tracking */
137 // Send list QS_SENDMESSAGE
138 // Post list QS_POSTMESSAGE|QS_HOTKEY|QS_PAINT|QS_TIMER|QS_KEY
139 // Hard list QS_MOUSE|QS_KEY only
140 // Accounting of queue bit sets, the rest are flags. QS_TIMER QS_PAINT counts are handled in thread information.
141 DWORD nCntsQBits
[QSIDCOUNTS
]; // QS_KEY QS_MOUSEMOVE QS_MOUSEBUTTON QS_POSTMESSAGE QS_SENDMESSAGE QS_HOTKEY
143 /* Messages that are currently dispatched by this message queue, required for cleanup */
144 LIST_ENTRY LocalDispatchingMessagesHead
;
145 LIST_ENTRY WindowListHead
;
146 LIST_ENTRY W32CallbackListHead
;
147 SINGLE_LIST_ENTRY ReferencesList
;
148 ULONG cExclusiveLocks
;
150 USHORT acExclusiveLockCount
[GDIObjTypeTotal
+ 1];
158 #define IntReferenceThreadInfo(pti) \
159 InterlockedIncrement(&(pti)->RefCount)
161 VOID FASTCALL
UserDeleteW32Thread(PTHREADINFO
);
163 #define IntDereferenceThreadInfo(pti) \
165 if(InterlockedDecrement(&(pti)->RefCount) == 0) \
167 ASSERT(pti->TIF_flags &= (TIF_INCLEANUP|TIF_DONTATTACHQUEUE) == (TIF_INCLEANUP|TIF_DONTATTACHQUEUE)); \
168 UserDeleteW32Thread(pti); \
173 typedef struct _W32HEAP_USER_MAPPING
175 struct _W32HEAP_USER_MAPPING
*Next
;
180 } W32HEAP_USER_MAPPING
, *PW32HEAP_USER_MAPPING
;
184 Information from STARTUPINFOW, psdk/winbase.h.
185 Set from PsGetCurrentProcess()->Peb->ProcessParameters.
187 typedef struct tagUSERSTARTUPINFO
190 DWORD dwX
; // STARTF_USEPOSITION StartupInfo->dwX/Y
192 DWORD dwXSize
; // STARTF_USESIZE StartupInfo->dwX/YSize
194 DWORD dwFlags
; // STARTF_ StartupInfo->dwFlags
195 WORD wShowWindow
; // StartupInfo->wShowWindow
197 } USERSTARTUPINFO
, *PUSERSTARTUPINFO
;
199 typedef struct _W32PROCESS
204 PKEVENT InputIdleEvent
;
205 DWORD StartCursorHideTime
;
206 struct _W32PROCESS
* NextStart
;
208 PVOID pBrushAttrList
;
211 LONG UserHandleCount
;
212 PEX_PUSH_LOCK GDIPushLock
; /* Locking Process during access to structure. */
213 RTL_AVL_TABLE GDIEngUserMemAllocTable
; /* Process AVL Table. */
214 LIST_ENTRY GDIDcAttrFreeList
;
215 LIST_ENTRY GDIBrushAttrFreeList
;
216 } W32PROCESS
, *PW32PROCESS
;
220 typedef struct _PROCESSINFO
224 PTHREADINFO ptiMainThread
;
225 struct _DESKTOP
* rpdeskStartup
;
226 PCLS pclsPrivateList
;
228 PPROCESSINFO ppiNext
;
231 DWORD dwhmodLibLoadedMask
;
232 HANDLE ahmodLibLoaded
[CLIBS
];
233 struct _WINSTATION_OBJECT
*prpwinsta
;
235 ACCESS_MASK amwinsta
;
238 struct _CURICON_OBJECT
* pCursorCache
;
243 DWORD dwRegisteredClasses
;
245 LIST_ENTRY MenuListHead
;
246 FAST_MUTEX PrivateFontListLock
;
247 LIST_ENTRY PrivateFontListHead
;
248 FAST_MUTEX DriverObjListLock
;
249 LIST_ENTRY DriverObjListHead
;
250 struct tagKL
* KeyboardLayout
; // THREADINFO only
251 W32HEAP_USER_MAPPING HeapMappings
;
252 struct _GDI_POOL
*pPoolDcAttr
;
253 struct _GDI_POOL
*pPoolBrushAttr
;
254 struct _GDI_POOL
*pPoolRgnAttr
;
257 BYTE DbgChannelLevel
[DbgChCount
];
258 DWORD DbgHandleCount
[TYPE_CTYPES
];
263 void NTAPI
UserDbgPreServiceHook(ULONG ulSyscallId
, PULONG_PTR pulArguments
);
264 ULONG_PTR NTAPI
UserDbgPostServiceHook(ULONG ulSyscallId
, ULONG_PTR ulResult
);