ReactOS  0.4.12-dev-409-g9f418243
win32.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for win32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _TL
 
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_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 _TL TL
 
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 237 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)
long LONG
Definition: pedump.c:60
#define W32PF_TERMINATED
Definition: win32.h:16
#define InterlockedDecrement
Definition: armddk.h:52

Definition at line 182 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_DONTATTACHQUEUE
Definition: ntuser.h:246
#define InterlockedDecrement
Definition: armddk.h:52
#define TIF_INCLEANUP
Definition: ntuser.h:240

Definition at line 167 of file win32.h.

◆ IntReferenceProcessInfo

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

Definition at line 177 of file win32.h.

◆ IntReferenceThreadInfo

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

Definition at line 162 of file win32.h.

◆ QSIDCOUNTS

#define QSIDCOUNTS   7

Definition at line 36 of file win32.h.

◆ strlenW

#define strlenW   lstrlenW

Definition at line 311 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 34 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 33 of file win32.h.

◆ W32PF_DPIAWARE

#define W32PF_DPIAWARE   0x20000000

Definition at line 29 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 28 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 32 of file win32.h.

◆ W32PF_NOWINDOWGHOSTING

#define W32PF_NOWINDOWGHOSTING   (0x01000000)

Definition at line 31 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

◆ PUSERSTARTUPINFO

◆ PW32HEAP_USER_MAPPING

◆ PW32PROCESS

◆ PW32THREAD

◆ QS_ROS_TYPES

◆ THREADINFO

◆ TL

typedef struct _TL TL

◆ USERSTARTUPINFO

◆ W32HEAP_USER_MAPPING

◆ W32PROCESS

◆ W32THREAD

Enumeration Type Documentation

◆ _QS_ROS_TYPES

Enumerator
QSRosKey 
QSRosMouseMove 
QSRosMouseButton 
QSRosPostMessage 
QSRosSendMessage 
QSRosHotKey 
QSRosEvent 

Definition at line 38 of file win32.h.

39 {
40  QSRosKey = 0,
46  QSRosEvent,
enum _QS_ROS_TYPES * PQS_ROS_TYPES
Definition: win32.h:40
enum _QS_ROS_TYPES QS_ROS_TYPES

Function Documentation

◆ lstrlenW()

__forceinline int lstrlenW ( _In_ LPCWSTR  lpString)

Definition at line 303 of file win32.h.

305 {
306  size_t size = wcslen(lpString);
307  if (size > ULONG_MAX) __fastfail(FAST_FAIL_RANGE_CHECK_FAILURE);
308  return (int)size;
309 }
#define FAST_FAIL_RANGE_CHECK_FAILURE
GLsizeiptr size
Definition: glext.h:5919
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ULONG_MAX
Definition: limits.h:44

◆ UserDeleteW32Process()

VOID UserDeleteW32Process ( _Pre_notnull_ __drv_freesMem(Mem)  PPROCESSINFO)

Definition at line 103 of file main.c.

105 {
106  if (ppiCurrent->InputIdleEvent)
107  {
108  /* Free the allocated memory */
109  ExFreePoolWithTag(ppiCurrent->InputIdleEvent, USERTAG_EVENT);
110  }
111 
112  /* Close the startup desktop */
113  if (ppiCurrent->rpdeskStartup)
114  ObDereferenceObject(ppiCurrent->rpdeskStartup);
115 
116 #if DBG
117  if (DBG_IS_CHANNEL_ENABLED(ppiCurrent, DbgChUserObj, WARN_LEVEL))
118  {
119  TRACE_PPI(ppiCurrent, UserObj, "Dumping user handles now that process info %p is gets freed.\n", ppiCurrent);
121  }
122 #endif
123 
124  /* Free the PROCESSINFO */
126 }
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
#define USERTAG_EVENT
Definition: tags.h:229
#define USERTAG_PROCESSINFO
Definition: tags.h:259
#define DBG_IS_CHANNEL_ENABLED(ppi, ch, level)
Definition: win32kdebug.h:164
#define TRACE_PPI(ppi, ch, fmt,...)
Definition: win32kdebug.h:181
void DbgUserDumpHandleTable()
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099

◆ UserDeleteW32Thread()

VOID UserDeleteW32Thread ( PTHREADINFO  )

Definition at line 417 of file main.c.

418 {
419  PPROCESSINFO ppi = pti->ppi;
420 
421  TRACE_CH(UserThread, "UserDeleteW32Thread pti 0x%p\n",pti);
422 
423  /* Free the message queue */
424  if (pti->MessageQueue)
425  {
427  }
428 
430 
432 
434 }
#define USERTAG_THREADINFO
Definition: tags.h:283
VOID FASTCALL MsqDestroyMessageQueue(_In_ PTHREADINFO pti)
Definition: msgqueue.c:2457
#define TRACE_CH(ch, fmt,...)
Definition: debug.h:107
VOID FASTCALL MsqCleanupThreadMsgs(PTHREADINFO pti)
Definition: msgqueue.c:2255
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:182

Variable Documentation

◆ ClientPfnInit

BOOL ClientPfnInit

Definition at line 26 of file ntuser.c.

Referenced by NtUserInitializeClientPfnArrays().

◆ hModClient

◆ hModuleWin

HANDLE hModuleWin

Definition at line 16 of file main.c.

Referenced by DriverEntry(), and UserRegisterSystemClasses().

◆ RegisteredSysClasses

BOOL RegisteredSysClasses

◆ SystemClassList

struct _CLS* SystemClassList