ReactOS 0.4.16-dev-303-g11d5cb8
win32.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _W32THREAD
 
struct  _THREADINFO
 
struct  _W32HEAP_USER_MAPPING
 
struct  tagUSERSTARTUPINFO
 
struct  _W32PROCESS
 
struct  _PROCESSINFO
 

Macros

#define W32PF_CONSOLEAPPLICATION   0x00000001
 
#define W32PF_FORCEOFFFEEDBACK   0x00000002
 
#define W32PF_STARTGLASS   0x00000004
 
#define W32PF_WOW   0x00000008
 
#define W32PF_READSCREENACCESSGRANTED   0x00000010
 
#define W32PF_INITIALIZED   0x00000020
 
#define W32PF_APPSTARTING   0x00000040
 
#define W32PF_WOW64   0x00000080
 
#define W32PF_ALLOWFOREGROUNDACTIVATE   0x00000100
 
#define W32PF_OWNDCCLEANUP   0x00000200
 
#define W32PF_SHOWSTARTGLASSCALLED   0x00000400
 
#define W32PF_FORCEBACKGROUNDPRIORITY   0x00000800
 
#define W32PF_TERMINATED   0x00001000
 
#define W32PF_CLASSESREGISTERED   0x00002000
 
#define W32PF_THREADCONNECTED   0x00004000
 
#define W32PF_PROCESSCONNECTED   0x00008000
 
#define W32PF_SETFOREGROUNDALLOWED   0x00008000
 
#define W32PF_WAKEWOWEXEC   0x00010000
 
#define W32PF_WAITFORINPUTIDLE   0x00020000
 
#define W32PF_IOWINSTA   0x00040000
 
#define W32PF_CONSOLEFOREGROUND   0x00080000
 
#define W32PF_OLELOADED   0x00100000
 
#define W32PF_SCREENSAVER   0x00200000
 
#define W32PF_IDLESCREENSAVER   0x00400000
 
#define W32PF_DISABLEIME   0x00800000
 
#define W32PF_ICONTITLEREGISTERED   0x10000000
 
#define W32PF_DPIAWARE   0x20000000
 
#define W32PF_NOWINDOWGHOSTING   (0x01000000)
 
#define W32PF_MANUALGUICHECK   (0x02000000)
 
#define W32PF_CREATEDWINORDC   (0x04000000)
 
#define W32PF_APIHOOKLOADED   (0x08000000)
 
#define QSIDCOUNTS   7
 
#define IntReferenceThreadInfo(pti)    InterlockedIncrement(&(pti)->RefCount)
 
#define IntDereferenceThreadInfo(pti)
 
#define IntReferenceProcessInfo(ppi)    InterlockedIncrement((volatile LONG*)(&(ppi)->RefCount))
 
#define IntDereferenceProcessInfo(ppi)
 
#define CLIBS   32
 
#define strlenW   lstrlenW
 

Typedefs

typedef enum _QS_ROS_TYPES QS_ROS_TYPES
 
typedef enum _QS_ROS_TYPESPQS_ROS_TYPES
 
typedef struct _TLPTL
 
typedef struct _W32THREAD W32THREAD
 
typedef struct _W32THREADPW32THREAD
 
typedef struct _THREADINFO THREADINFO
 
typedef struct _W32HEAP_USER_MAPPING W32HEAP_USER_MAPPING
 
typedef struct _W32HEAP_USER_MAPPINGPW32HEAP_USER_MAPPING
 
typedef struct tagUSERSTARTUPINFO USERSTARTUPINFO
 
typedef struct tagUSERSTARTUPINFOPUSERSTARTUPINFO
 
typedef struct _W32PROCESS W32PROCESS
 
typedef struct _W32PROCESSPW32PROCESS
 
typedef struct _PROCESSINFO PROCESSINFO
 

Enumerations

enum  _QS_ROS_TYPES {
  QSRosKey = 0 , QSRosMouseMove , QSRosMouseButton , QSRosPostMessage ,
  QSRosSendMessage , QSRosHotKey , QSRosEvent
}
 

Functions

VOID UserDeleteW32Thread (PTHREADINFO)
 
VOID UserDeleteW32Process (_Pre_notnull_ __drv_freesMem(Mem) PPROCESSINFO)
 
__forceinline int lstrlenW (_In_ LPCWSTR lpString)
 

Variables

BOOL ClientPfnInit
 
HINSTANCE hModClient
 
HANDLE hModuleWin
 
struct _CLSSystemClassList
 
BOOL RegisteredSysClasses
 

Macro Definition Documentation

◆ CLIBS

#define CLIBS   32

Definition at line 243 of file win32.h.

◆ IntDereferenceProcessInfo

#define IntDereferenceProcessInfo (   ppi)
Value:
do { \
if (InterlockedDecrement((volatile LONG*)(&(ppi)->RefCount)) == 0) \
{ \
ASSERT(((ppi)->W32PF_flags & W32PF_TERMINATED) != 0); \
UserDeleteW32Process(ppi); \
} \
} while(0)
#define InterlockedDecrement
Definition: armddk.h:52
long LONG
Definition: pedump.c:60
#define W32PF_TERMINATED
Definition: win32.h:16

Definition at line 187 of file win32.h.

◆ IntDereferenceThreadInfo

#define IntDereferenceThreadInfo (   pti)
Value:
do { \
if (InterlockedDecrement(&(pti)->RefCount) == 0) \
{ \
ASSERT(((pti)->TIF_flags & (TIF_INCLEANUP|TIF_DONTATTACHQUEUE)) == (TIF_INCLEANUP|TIF_DONTATTACHQUEUE)); \
UserDeleteW32Thread(pti); \
} \
} while(0)
#define TIF_INCLEANUP
Definition: ntuser.h:263
#define TIF_DONTATTACHQUEUE
Definition: ntuser.h:269

Definition at line 172 of file win32.h.

◆ IntReferenceProcessInfo

#define IntReferenceProcessInfo (   ppi)     InterlockedIncrement((volatile LONG*)(&(ppi)->RefCount))

Definition at line 182 of file win32.h.

◆ IntReferenceThreadInfo

#define IntReferenceThreadInfo (   pti)     InterlockedIncrement(&(pti)->RefCount)

Definition at line 167 of file win32.h.

◆ QSIDCOUNTS

#define QSIDCOUNTS   7

Definition at line 37 of file win32.h.

◆ strlenW

#define strlenW   lstrlenW

Definition at line 321 of file win32.h.

◆ W32PF_ALLOWFOREGROUNDACTIVATE

#define W32PF_ALLOWFOREGROUNDACTIVATE   0x00000100

Definition at line 12 of file win32.h.

◆ W32PF_APIHOOKLOADED

#define W32PF_APIHOOKLOADED   (0x08000000)

Definition at line 35 of file win32.h.

◆ W32PF_APPSTARTING

#define W32PF_APPSTARTING   0x00000040

Definition at line 10 of file win32.h.

◆ W32PF_CLASSESREGISTERED

#define W32PF_CLASSESREGISTERED   0x00002000

Definition at line 17 of file win32.h.

◆ W32PF_CONSOLEAPPLICATION

#define W32PF_CONSOLEAPPLICATION   0x00000001

Definition at line 4 of file win32.h.

◆ W32PF_CONSOLEFOREGROUND

#define W32PF_CONSOLEFOREGROUND   0x00080000

Definition at line 24 of file win32.h.

◆ W32PF_CREATEDWINORDC

#define W32PF_CREATEDWINORDC   (0x04000000)

Definition at line 34 of file win32.h.

◆ W32PF_DISABLEIME

#define W32PF_DISABLEIME   0x00800000

Definition at line 28 of file win32.h.

◆ W32PF_DPIAWARE

#define W32PF_DPIAWARE   0x20000000

Definition at line 30 of file win32.h.

◆ W32PF_FORCEBACKGROUNDPRIORITY

#define W32PF_FORCEBACKGROUNDPRIORITY   0x00000800

Definition at line 15 of file win32.h.

◆ W32PF_FORCEOFFFEEDBACK

#define W32PF_FORCEOFFFEEDBACK   0x00000002

Definition at line 5 of file win32.h.

◆ W32PF_ICONTITLEREGISTERED

#define W32PF_ICONTITLEREGISTERED   0x10000000

Definition at line 29 of file win32.h.

◆ W32PF_IDLESCREENSAVER

#define W32PF_IDLESCREENSAVER   0x00400000

Definition at line 27 of file win32.h.

◆ W32PF_INITIALIZED

#define W32PF_INITIALIZED   0x00000020

Definition at line 9 of file win32.h.

◆ W32PF_IOWINSTA

#define W32PF_IOWINSTA   0x00040000

Definition at line 23 of file win32.h.

◆ W32PF_MANUALGUICHECK

#define W32PF_MANUALGUICHECK   (0x02000000)

Definition at line 33 of file win32.h.

◆ W32PF_NOWINDOWGHOSTING

#define W32PF_NOWINDOWGHOSTING   (0x01000000)

Definition at line 32 of file win32.h.

◆ W32PF_OLELOADED

#define W32PF_OLELOADED   0x00100000

Definition at line 25 of file win32.h.

◆ W32PF_OWNDCCLEANUP

#define W32PF_OWNDCCLEANUP   0x00000200

Definition at line 13 of file win32.h.

◆ W32PF_PROCESSCONNECTED

#define W32PF_PROCESSCONNECTED   0x00008000

Definition at line 19 of file win32.h.

◆ W32PF_READSCREENACCESSGRANTED

#define W32PF_READSCREENACCESSGRANTED   0x00000010

Definition at line 8 of file win32.h.

◆ W32PF_SCREENSAVER

#define W32PF_SCREENSAVER   0x00200000

Definition at line 26 of file win32.h.

◆ W32PF_SETFOREGROUNDALLOWED

#define W32PF_SETFOREGROUNDALLOWED   0x00008000

Definition at line 20 of file win32.h.

◆ W32PF_SHOWSTARTGLASSCALLED

#define W32PF_SHOWSTARTGLASSCALLED   0x00000400

Definition at line 14 of file win32.h.

◆ W32PF_STARTGLASS

#define W32PF_STARTGLASS   0x00000004

Definition at line 6 of file win32.h.

◆ W32PF_TERMINATED

#define W32PF_TERMINATED   0x00001000

Definition at line 16 of file win32.h.

◆ W32PF_THREADCONNECTED

#define W32PF_THREADCONNECTED   0x00004000

Definition at line 18 of file win32.h.

◆ W32PF_WAITFORINPUTIDLE

#define W32PF_WAITFORINPUTIDLE   0x00020000

Definition at line 22 of file win32.h.

◆ W32PF_WAKEWOWEXEC

#define W32PF_WAKEWOWEXEC   0x00010000

Definition at line 21 of file win32.h.

◆ W32PF_WOW

#define W32PF_WOW   0x00000008

Definition at line 7 of file win32.h.

◆ W32PF_WOW64

#define W32PF_WOW64   0x00000080

Definition at line 11 of file win32.h.

Typedef Documentation

◆ PQS_ROS_TYPES

◆ PROCESSINFO

◆ PTL

typedef struct _TL* PTL

Definition at line 57 of file win32.h.

◆ PUSERSTARTUPINFO

◆ PW32HEAP_USER_MAPPING

◆ PW32PROCESS

◆ PW32THREAD

◆ QS_ROS_TYPES

◆ THREADINFO

◆ USERSTARTUPINFO

◆ W32HEAP_USER_MAPPING

◆ W32PROCESS

◆ W32THREAD

Enumeration Type Documentation

◆ _QS_ROS_TYPES

Enumerator
QSRosKey 
QSRosMouseMove 
QSRosMouseButton 
QSRosPostMessage 
QSRosSendMessage 
QSRosHotKey 
QSRosEvent 

Definition at line 39 of file win32.h.

40{
41 QSRosKey = 0,
enum _QS_ROS_TYPES * PQS_ROS_TYPES
@ QSRosMouseMove
Definition: win32.h:42
@ QSRosKey
Definition: win32.h:41
@ QSRosEvent
Definition: win32.h:47
@ QSRosHotKey
Definition: win32.h:46
@ QSRosSendMessage
Definition: win32.h:45
@ QSRosPostMessage
Definition: win32.h:44
@ QSRosMouseButton
Definition: win32.h:43
enum _QS_ROS_TYPES QS_ROS_TYPES

Function Documentation

◆ lstrlenW()

__forceinline int lstrlenW ( _In_ LPCWSTR  lpString)

Definition at line 313 of file win32.h.

315{
316 size_t size = wcslen(lpString);
318 return (int)size;
319}
GLsizeiptr size
Definition: glext.h:5919
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ULONG_MAX
Definition: intsafe.h:155
#define FAST_FAIL_RANGE_CHECK_FAILURE

◆ UserDeleteW32Process()

VOID UserDeleteW32Process ( _Pre_notnull_ __drv_freesMem(Mem)  PPROCESSINFO)

Definition at line 95 of file main.c.

97{
98 if (ppiCurrent->InputIdleEvent)
99 {
100 /* Free the allocated memory */
101 ExFreePoolWithTag(ppiCurrent->InputIdleEvent, USERTAG_EVENT);
102 }
103
104 /* Close the startup desktop */
105 if (ppiCurrent->rpdeskStartup)
106 ObDereferenceObject(ppiCurrent->rpdeskStartup);
107
108#if DBG
109 if (DBG_IS_CHANNEL_ENABLED(ppiCurrent, DbgChUserObj, WARN_LEVEL))
110 {
111 TRACE_PPI(ppiCurrent, UserObj, "Dumping user handles now that process info %p is gets freed.\n", ppiCurrent);
113 }
114#endif
115
116 /* Free the PROCESSINFO */
118}
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
void DbgUserDumpHandleTable()
#define DBG_IS_CHANNEL_ENABLED(ppi, ch, level)
Definition: win32kdebug.h:167
#define TRACE_PPI(ppi, ch, fmt,...)
Definition: win32kdebug.h:184
#define USERTAG_PROCESSINFO
Definition: tags.h:260
#define USERTAG_EVENT
Definition: tags.h:230
#define ObDereferenceObject
Definition: obfuncs.h:203

◆ UserDeleteW32Thread()

VOID UserDeleteW32Thread ( PTHREADINFO  pti)

Definition at line 411 of file main.c.

412{
413 PPROCESSINFO ppi = pti->ppi;
414
415 TRACE_CH(UserThread, "UserDeleteW32Thread pti 0x%p\n",pti);
416
417 /* Free the message queue */
418 if (pti->MessageQueue)
419 {
421 }
422
424
425 ObDereferenceObject(pti->pEThread);
426
428
430
431 {
432 // Find another queue for mouse cursor.
433 MSG msg;
434 msg.message = WM_MOUSEMOVE;
435 msg.wParam = UserGetMouseButtonsState();
436 msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
437 msg.pt = gpsi->ptCursor;
439 }
440}
#define msg(x)
Definition: auth_time.c:54
#define TRACE_CH(ch, fmt,...)
Definition: debug.h:111
#define TRUE
Definition: types.h:120
VOID FASTCALL co_MsqInsertMouseMessage(MSG *Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook)
Definition: msgqueue.c:580
VOID FASTCALL MsqDestroyMessageQueue(_In_ PTHREADINFO pti)
Definition: msgqueue.c:2417
VOID FASTCALL MsqCleanupThreadMsgs(PTHREADINFO pti)
Definition: msgqueue.c:2215
PPROCESSINFO ppi
Definition: win32.h:88
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:187
WORD FASTCALL UserGetMouseButtonsState(VOID)
Definition: mouse.c:22
PSERVERINFO gpsi
Definition: main.c:27
#define USERTAG_THREADINFO
Definition: tags.h:284
#define MAKELPARAM(l, h)
Definition: winuser.h:4011
#define WM_MOUSEMOVE
Definition: winuser.h:1778

Variable Documentation

◆ ClientPfnInit

BOOL ClientPfnInit
extern

Definition at line 26 of file ntuser.c.

Referenced by NtUserInitializeClientPfnArrays().

◆ hModClient

◆ hModuleWin

HANDLE hModuleWin
extern

Definition at line 16 of file main.c.

Referenced by DriverEntry(), and UserRegisterSystemClasses().

◆ RegisteredSysClasses

BOOL RegisteredSysClasses
extern

◆ SystemClassList

struct _CLS* SystemClassList
extern