ReactOS  0.4.11-dev-765-g5e024bf
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_MAPPING
PW32HEAP_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

#define CLIBS   32

Definition at line 237 of file win32.h.

#define IntDereferenceProcessInfo (   ppi)
Value:
do { \
if (InterlockedDecrement((volatile LONG*)(&(ppi)->RefCount)) == 0) \
{ \
ASSERT(((ppi)->W32PF_flags & W32PF_TERMINATED) != 0); \
} \
} while(0)
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
VOID UserDeleteW32Process(_Pre_notnull_ __drv_freesMem(Mem) PPROCESSINFO)
Definition: main.c:103
long LONG
Definition: pedump.c:60
#define W32PF_TERMINATED
Definition: win32.h:16
if(!(yy_init))
Definition: macro.lex.yy.c:717
#define InterlockedDecrement
Definition: armddk.h:52

Definition at line 182 of file win32.h.

Referenced by FreeDeskProcObject(), FreeProcMarkObject(), NtUserWaitForInputIdle(), and UserDeleteW32Thread().

#define IntDereferenceThreadInfo (   pti)
Value:
do { \
if (InterlockedDecrement(&(pti)->RefCount) == 0) \
{ \
} \
} while(0)
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
#define TIF_DONTATTACHQUEUE
Definition: ntuser.h:246
VOID UserDeleteW32Thread(PTHREADINFO)
Definition: main.c:417
if(!(yy_init))
Definition: macro.lex.yy.c:717
#define InterlockedDecrement
Definition: armddk.h:52
#define TIF_INCLEANUP
Definition: ntuser.h:240

Definition at line 167 of file win32.h.

Referenced by co_HOOK_CallHooks(), FreeDeskThreadObject(), FreeThreadObject(), and IntDeactivateWindow().

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

Definition at line 177 of file win32.h.

Referenced by AllocW32Process(), InitThreadCallback(), and NtUserWaitForInputIdle().

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

Definition at line 162 of file win32.h.

Referenced by _Success_(), AllocW32Thread(), co_HOOK_CallHooks(), and IntDeactivateWindow().

#define QSIDCOUNTS   7

Definition at line 36 of file win32.h.

#define strlenW   lstrlenW

Definition at line 311 of file win32.h.

#define W32PF_ALLOWFOREGROUNDACTIVATE   0x00000100
#define W32PF_APIHOOKLOADED   (0x08000000)

Definition at line 34 of file win32.h.

Referenced by IntHookModuleUnloaded(), and IntLoadHookModule().

#define W32PF_APPSTARTING   0x00000040

Definition at line 10 of file win32.h.

Referenced by InitThreadCallback(), and MsqIsHung().

#define W32PF_CLASSESREGISTERED   0x00002000
#define W32PF_CONSOLEAPPLICATION   0x00000001

Definition at line 4 of file win32.h.

#define W32PF_CONSOLEFOREGROUND   0x00080000

Definition at line 24 of file win32.h.

#define W32PF_CREATEDWINORDC   (0x04000000)
#define W32PF_DPIAWARE   0x20000000

Definition at line 29 of file win32.h.

#define W32PF_FORCEBACKGROUNDPRIORITY   0x00000800

Definition at line 15 of file win32.h.

#define W32PF_FORCEOFFFEEDBACK   0x00000002

Definition at line 5 of file win32.h.

#define W32PF_ICONTITLEREGISTERED   0x10000000

Definition at line 28 of file win32.h.

#define W32PF_IDLESCREENSAVER   0x00400000

Definition at line 27 of file win32.h.

Referenced by DoTheScreenSaver().

#define W32PF_INITIALIZED   0x00000020

Definition at line 9 of file win32.h.

#define W32PF_IOWINSTA   0x00040000

Definition at line 23 of file win32.h.

Referenced by CheckWinstaAttributeAccess(), and UserSetProcessWindowStation().

#define W32PF_MANUALGUICHECK   (0x02000000)

Definition at line 32 of file win32.h.

Referenced by co_IntGraphicsCheck(), and co_IntUserManualGuiCheck().

#define W32PF_NOWINDOWGHOSTING   (0x01000000)

Definition at line 31 of file win32.h.

Referenced by NtUserCallOneParam().

#define W32PF_OLELOADED   0x00100000

Definition at line 25 of file win32.h.

#define W32PF_OWNDCCLEANUP   0x00000200

Definition at line 13 of file win32.h.

Referenced by UserGetDCEx().

#define W32PF_PROCESSCONNECTED   0x00008000

Definition at line 19 of file win32.h.

Referenced by UserProcessCreate().

#define W32PF_READSCREENACCESSGRANTED   0x00000010

Definition at line 8 of file win32.h.

Referenced by UserSetProcessWindowStation().

#define W32PF_SCREENSAVER   0x00200000

Definition at line 26 of file win32.h.

Referenced by UserProcessCreate().

#define W32PF_SETFOREGROUNDALLOWED   0x00008000

Definition at line 20 of file win32.h.

Referenced by CanForceFG().

#define W32PF_SHOWSTARTGLASSCALLED   0x00000400

Definition at line 14 of file win32.h.

#define W32PF_STARTGLASS   0x00000004

Definition at line 6 of file win32.h.

#define W32PF_TERMINATED   0x00001000

Definition at line 16 of file win32.h.

Referenced by ExitProcessCallback().

#define W32PF_THREADCONNECTED   0x00004000

Definition at line 18 of file win32.h.

Referenced by InitThreadCallback().

#define W32PF_WAITFORINPUTIDLE   0x00020000

Definition at line 22 of file win32.h.

Referenced by NtUserWaitForInputIdle().

#define W32PF_WAKEWOWEXEC   0x00010000

Definition at line 21 of file win32.h.

#define W32PF_WOW   0x00000008

Definition at line 7 of file win32.h.

#define W32PF_WOW64   0x00000080

Definition at line 11 of file win32.h.

Typedef Documentation

typedef struct _TL * PTL
typedef struct _TL TL

Enumeration Type Documentation

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

__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
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
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

BOOL ClientPfnInit

Definition at line 26 of file ntuser.c.

Referenced by NtUserInitializeClientPfnArrays().

HANDLE hModuleWin

Definition at line 16 of file main.c.

Referenced by DriverEntry(), and UserRegisterSystemClasses().

BOOL RegisteredSysClasses
struct _CLS* SystemClassList