ReactOS  0.4.15-dev-5618-g8866b9d
ntuser.c File Reference
#include <win32k.h>
Include dependency graph for ntuser.c:

Go to the source code of this file.

Functions

 DBG_DEFAULT_CHANNEL (UserMisc)
 
BOOL FASTCALL RegisterControlAtoms (VOID)
 
static NTSTATUS FASTCALL InitUserAtoms (VOID)
 
NTSTATUS NTAPI InitUserImpl (VOID)
 
NTSTATUS NTAPI UserInitialize (VOID)
 
NTSTATUS APIENTRY NtUserInitialize (DWORD dwWinVersion, HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent)
 
BOOL FASTCALL UserIsEntered (VOID)
 
BOOL FASTCALL UserIsEnteredExclusive (VOID)
 
VOID FASTCALL CleanupUserImpl (VOID)
 
VOID FASTCALL UserEnterShared (VOID)
 
VOID FASTCALL UserEnterExclusive (VOID)
 
VOID FASTCALL UserLeave (VOID)
 

Variables

PTHREADINFO gptiCurrent = NULL
 
PPROCESSINFO gppiInputProvider = NULL
 
BOOL g_AlwaysDisplayVersion = FALSE
 
ERESOURCE UserLock
 
ATOM AtomMessage
 
ATOM AtomWndObj
 
ATOM AtomLayer
 
ATOM AtomFlashWndState
 
ATOM AtomDDETrack
 
ATOM AtomQOS
 
HINSTANCE hModClient = NULL
 
BOOL ClientPfnInit = FALSE
 
ATOM gaGuiConsoleWndClass
 
ATOM AtomImeLevel
 

Function Documentation

◆ CleanupUserImpl()

VOID FASTCALL CleanupUserImpl ( VOID  )

Definition at line 232 of file ntuser.c.

233 {
235 }
NTSTATUS NTAPI ExDeleteResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1456
ERESOURCE UserLock
Definition: ntuser.c:18

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( UserMisc  )

◆ InitUserAtoms()

static NTSTATUS FASTCALL InitUserAtoms ( VOID  )
static

Definition at line 34 of file ntuser.c.

35 {
37 
38  gpsi->atomSysClass[ICLS_MENU] = 32768;
39  gpsi->atomSysClass[ICLS_DESKTOP] = 32769;
40  gpsi->atomSysClass[ICLS_DIALOG] = 32770;
41  gpsi->atomSysClass[ICLS_SWITCH] = 32771;
44 
45  /* System Message Atom */
46  AtomMessage = IntAddGlobalAtom(L"Message", TRUE);
47  gpsi->atomSysClass[ICLS_HWNDMESSAGE] = AtomMessage;
48 
49  /* System Context Help Id Atom */
51 
54 
55  gpsi->atomFrostedWindowProp = IntAddGlobalAtom(L"SysFrostedWindow", TRUE);
56 
58  AtomQOS = IntAddGlobalAtom(L"SysQOS", TRUE);
59  AtomImeLevel = IntAddGlobalAtom(L"SysIMEL", TRUE);
60 
61  /*
62  * FIXME: AddPropW uses the global kernel atom table, thus leading to conflicts if we use
63  * the win32k atom table for this one. What is the right thing to do ?
64  */
65  // AtomWndObj = IntAddGlobalAtom(L"SysWNDO", TRUE);
66  NtAddAtom(L"SysWNDO", 14, &AtomWndObj);
67 
68  AtomLayer = IntAddGlobalAtom(L"SysLayer", TRUE);
69  AtomFlashWndState = IntAddGlobalAtom(L"FlashWState", TRUE);
70 
71  return STATUS_SUCCESS;
72 }
#define ICLS_ICONTITLE
Definition: ntuser.h:928
ATOM atomFrostedWindowProp
Definition: ntuser.h:1063
#define TRUE
Definition: types.h:120
PSERVERINFO gpsi
Definition: imm.c:18
#define ICLS_DESKTOP
Definition: ntuser.h:924
ATOM atomContextHelpIdProp
Definition: ntuser.h:1062
#define ICLS_DIALOG
Definition: ntuser.h:925
#define L(x)
Definition: ntvdm.h:50
#define ICLS_TOOLTIPS
Definition: ntuser.h:929
BOOL FASTCALL RegisterControlAtoms(VOID)
Definition: class.c:396
#define ICLS_SWITCH
Definition: ntuser.h:927
ATOM AtomDDETrack
Definition: ntuser.c:23
NTSTATUS NTAPI NtAddAtom(IN PWSTR AtomName, IN ULONG AtomNameLength, OUT PRTL_ATOM Atom)
Definition: atom.c:86
ATOM AtomImeLevel
Definition: ntuser.c:28
ATOM atomIconProp
Definition: ntuser.h:1061
ATOM AtomWndObj
Definition: ntuser.c:20
ATOM AtomMessage
Definition: ntuser.c:19
ATOM atomIconSmProp
Definition: ntuser.h:1060
ATOM AtomLayer
Definition: ntuser.c:21
ATOM AtomQOS
Definition: ntuser.c:24
#define STATUS_SUCCESS
Definition: shellext.h:65
#define ICLS_MENU
Definition: ntuser.h:926
ATOM AtomFlashWndState
Definition: ntuser.c:22
RTL_ATOM FASTCALL IntAddGlobalAtom(LPWSTR lpBuffer, BOOL PinAtom)
Definition: useratom.c:62
ATOM atomSysClass[ICLS_NOTUSED+1]
Definition: ntuser.h:1055

Referenced by InitUserImpl().

◆ InitUserImpl()

NTSTATUS NTAPI InitUserImpl ( VOID  )

Definition at line 79 of file ntuser.c.

80 {
82  HKEY hKey;
83 
84  if (!UserCreateHandleTable())
85  {
86  ERR("Failed creating handle table\n");
88  }
89 
91  if (!NT_SUCCESS(Status))
92  {
93  ERR("Error init session impl.\n");
94  return Status;
95  }
96 
97  InitUserAtoms();
98 
99  Status = RegOpenKey(L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows",
100  &hKey);
101  if (NT_SUCCESS(Status))
102  {
103  DWORD dwValue = 0;
104  RegReadDWORD(hKey, L"DisplayVersion", &dwValue);
105  g_AlwaysDisplayVersion = !!dwValue;
106  ZwClose(hKey);
107  }
108 
109  InitSysParams();
110 
111  return STATUS_SUCCESS;
112 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NTSTATUS
Definition: precomp.h:26
#define L(x)
Definition: ntvdm.h:50
BOOL g_AlwaysDisplayVersion
Definition: ntuser.c:17
BOOL InitSysParams(VOID)
Definition: sysparams.c:350
Status
Definition: gdiplustypes.h:24
static NTSTATUS FASTCALL InitUserAtoms(VOID)
Definition: ntuser.c:34
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
BOOL NTAPI RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData)
Definition: registry.c:150
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:110
BOOL FASTCALL UserCreateHandleTable(VOID)
Definition: object.c:536
FxAutoRegKey hKey
NTSTATUS FASTCALL InitSessionImpl(VOID)
Definition: session.c:18
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RegOpenKey
Definition: winreg.h:519

Referenced by DriverEntry().

◆ NtUserInitialize()

NTSTATUS APIENTRY NtUserInitialize ( DWORD  dwWinVersion,
HANDLE  hPowerRequestEvent,
HANDLE  hMediaRequestEvent 
)

Definition at line 171 of file ntuser.c.

175 {
177 
178  TRACE("Enter NtUserInitialize(%lx, %p, %p)\n",
179  dwWinVersion, hPowerRequestEvent, hMediaRequestEvent);
180 
181  /* Check if we are already initialized */
182  if (gpepCSRSS)
183  return STATUS_UNSUCCESSFUL;
184 
185  /* Check Windows USER subsystem version */
186  if (dwWinVersion != USER_VERSION)
187  {
188  /* No match, bugcheck */
189  KeBugCheckEx(WIN32K_INIT_OR_RIT_FAILURE, 0, 0, dwWinVersion, USER_VERSION);
190  }
191 
192  /* Acquire exclusive lock */
194 
195  /* Save the EPROCESS of CSRSS */
196  InitCsrProcess(/*PsGetCurrentProcess()*/);
197 
198 // Initialize Power Request List (use hPowerRequestEvent).
199 // Initialize Media Change (use hMediaRequestEvent).
200 
201 // InitializeGreCSRSS();
202 // {
203 // Startup DxGraphics.
204 // calls ** UserGetLanguageID() and sets it **.
205 // Enables Fonts drivers, Initialize Font table & Stock Fonts.
206 // }
207 
208  /* Initialize USER */
210 
211  /* Return */
212  UserLeave();
213  return Status;
214 }
PEPROCESS gpepCSRSS
Definition: csr.c:15
LONG NTSTATUS
Definition: precomp.h:26
#define USER_VERSION
Definition: ntuser.h:1144
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:245
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
VOID InitCsrProcess(VOID)
Definition: csr.c:20
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:254
NTSTATUS NTAPI UserInitialize(VOID)
Definition: ntuser.c:116
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108

Referenced by CSR_SERVER_DLL_INIT().

◆ RegisterControlAtoms()

BOOL FASTCALL RegisterControlAtoms ( VOID  )

Definition at line 396 of file class.c.

397 {
398  RTL_ATOM Atom;
399  UNICODE_STRING ClassName;
400  INT i = 0;
401 
402  while ( i < ICLS_DESKTOP)
403  {
404  RtlInitUnicodeString(&ClassName, ControlsList[i]);
405  if (IntRegisterClassAtom(&ClassName, &Atom))
406  {
407  gpsi->atomSysClass[i] = Atom;
408  TRACE("Reg Control Atom %ls: 0x%x\n", ControlsList[i], Atom);
409  }
410  i++;
411  }
412  return TRUE;
413 }
unsigned short RTL_ATOM
Definition: atom.c:42
#define TRUE
Definition: types.h:120
PSERVERINFO gpsi
Definition: imm.c:18
#define ICLS_DESKTOP
Definition: ntuser.h:924
int32_t INT
Definition: typedefs.h:58
#define TRACE(s)
Definition: solgame.cpp:4
_Out_ RTL_ATOM * Atom
Definition: class.h:54
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static PWSTR ControlsList[]
Definition: class.c:12
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static BOOL IntRegisterClassAtom(IN PUNICODE_STRING ClassName, OUT RTL_ATOM *pAtom)
Definition: class.c:334
ATOM atomSysClass[ICLS_NOTUSED+1]
Definition: ntuser.h:1055

Referenced by InitUserAtoms().

◆ UserEnterExclusive()

VOID FASTCALL UserEnterExclusive ( VOID  )

Definition at line 245 of file ntuser.c.

246 {
251 }
#define TRUE
Definition: types.h:120
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
ERESOURCE UserLock
Definition: ntuser.c:18
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
PTHREADINFO gptiCurrent
Definition: ntuser.c:15
#define KeEnterCriticalRegion()
Definition: ke_x.h:88
#define ASSERT_NOGDILOCKS()
Definition: gdidebug.h:10

Referenced by _Success_(), co_IntGetPeekMessage(), DesktopThreadMain(), DriverEntry(), EngCreateWnd(), EngDeleteWnd(), IntDesktopObjectClose(), IntDesktopObjectOpen(), NtGdiSetPixelFormat(), NtGdiSwapBuffers(), NtGdiUpdateColors(), NtUserActivateKeyboardLayout(), NtUserAlterWindowStyle(), NtUserAssociateInputContext(), NtUserAttachThreadInput(), NtUserBeginPaint(), NtUserBitBltSysBmp(), NtUserBlockInput(), NtUserBuildHimcList(), NtUserBuildHwndList(), NtUserCalcMenuBar(), NtUserCallHwnd(), NtUserCallHwndLock(), NtUserCallHwndParam(), NtUserCallHwndParamLock(), NtUserCallMsgFilter(), NtUserCallNextHookEx(), NtUserCallNoParam(), NtUserCallOneParam(), NtUserCallTwoParam(), NtUserChangeClipboardChain(), NtUserChangeDisplaySettings(), NtUserCheckImeHotKey(), NtUserCheckMenuItem(), NtUserChildWindowFromPointEx(), NtUserClipCursor(), NtUserCloseClipboard(), NtUserCloseDesktop(), NtUserConsoleControl(), NtUserConvertMemHandle(), NtUserCreateAcceleratorTable(), NtUserCreateCaret(), NtUserCreateDesktop(), NtUserCreateInputContext(), NtUserCreateWindowEx(), NtUserCreateWindowStation(), NtUserDeferWindowPos(), NtUserDefSetText(), NtUserDeleteMenu(), NtUserDestroyAcceleratorTable(), NtUserDestroyCursor(), NtUserDestroyInputContext(), NtUserDestroyMenu(), NtUserDestroyWindow(), NtUserDisableThreadIme(), NtUserDispatchMessage(), NtUserDragDetect(), NtUserDrawCaptionTemp(), NtUserDrawIconEx(), NtUserDrawMenuBarTemp(), NtUserEmptyClipboard(), NtUserEnableMenuItem(), NtUserEnableScrollBar(), NtUserEndDeferWindowPosEx(), NtUserEndMenu(), NtUserEndPaint(), NtUserExcludeUpdateRgn(), NtUserFillWindow(), NtUserFlashWindowEx(), NtUserGetAncestor(), NtUserGetAsyncKeyState(), NtUserGetClassInfo(), NtUserGetControlBrush(), NtUserGetControlColor(), NtUserGetCPD(), NtUserGetDCEx(), NtUserGetForegroundWindow(), NtUserGetImeHotKey(), NtUserGetLayeredWindowAttributes(), NtUserGetMessage(), NtUserGetScrollBarInfo(), NtUserGetSystemMenu(), NtUserGetThreadDesktop(), NtUserGetThreadState(), NtUserGetTitleBarInfo(), NtUserGetUpdateRect(), NtUserGetUpdateRgn(), NtUserGetWOWClass(), NtUserHideCaret(), NtUserHiliteMenuItem(), NtUserInitialize(), NtUserInitializeClientPfnArrays(), NtUserKillTimer(), NtUserLoadKeyboardLayoutEx(), NtUserLockWorkStation(), NtUserMenuItemFromPoint(), NtUserMessageCall(), NtUserMinMaximize(), NtUserNotifyIMEStatus(), NtUserNotifyWinEvent(), NtUserOpenClipboard(), NtUserOpenInputDesktop(), NtUserPaintDesktop(), NtUserPaintMenuBar(), NtUserPeekMessage(), NtUserPostMessage(), NtUserPostThreadMessage(), NtUserPrintWindow(), NtUserQueryInformationThread(), NtUserQueryInputContext(), NtUserRedrawWindow(), NtUserRegisterClassExWOW(), NtUserRegisterHotKey(), NtUserRegisterUserApiHook(), NtUserRegisterWindowMessage(), NtUserRemoveMenu(), NtUserRemoveProp(), NtUserResolveDesktop(), NtUserScrollDC(), NtUserScrollWindowEx(), NtUserSelectPalette(), NtUserSendInput(), NtUserSetActiveWindow(), NtUserSetAppImeLevel(), NtUserSetCapture(), NtUserSetClassLong(), NtUserSetClipboardData(), NtUserSetClipboardViewer(), NtUserSetCursor(), NtUserSetCursorIconData(), NtUserSetFocus(), NtUserSetImeHotKey(), NtUserSetImeInfoEx(), NtUserSetImeOwnerWindow(), NtUserSetInformationThread(), NtUserSetInternalWindowPos(), NtUserSetKeyboardState(), NtUserSetLayeredWindowAttributes(), NtUserSetMenu(), NtUserSetMenuContextHelpId(), NtUserSetMenuDefaultItem(), NtUserSetMenuFlagRtoL(), NtUserSetParent(), NtUserSetProcessWindowStation(), NtUserSetProp(), NtUserSetScrollBarInfo(), NtUserSetScrollInfo(), NtUserSetShellWindowEx(), NtUserSetSysColors(), NtUserSetSystemCursor(), NtUserSetSystemMenu(), NtUserSetSystemTimer(), NtUserSetThreadDesktop(), NtUserSetThreadLayoutHandles(), NtUserSetThreadState(), NtUserSetTimer(), NtUserSetWindowFNID(), NtUserSetWindowLong(), NtUserSetWindowPlacement(), NtUserSetWindowPos(), NtUserSetWindowRgn(), NtUserSetWindowsHookEx(), NtUserSetWindowStationUser(), NtUserSetWindowWord(), NtUserSetWinEventHook(), NtUserShowCaret(), NtUserShowScrollBar(), NtUserShowWindow(), NtUserShowWindowAsync(), NtUserSwitchDesktop(), NtUserSystemParametersInfo(), NtUserThunkedMenuInfo(), NtUserThunkedMenuItemInfo(), NtUserToUnicodeEx(), NtUserTrackMouseEvent(), NtUserTrackPopupMenuEx(), NtUserTranslateMessage(), NtUserUnhookWindowsHookEx(), NtUserUnhookWinEvent(), NtUserUnloadKeyboardLayout(), NtUserUnregisterClass(), NtUserUnregisterHotKey(), NtUserUnregisterUserApiHook(), NtUserUpdateInputContext(), NtUserUpdateLayeredWindow(), NtUserUpdatePerUserSystemParameters(), NtUserValidateHandleSecure(), NtUserWaitForInputIdle(), NtUserWaitMessage(), NtUserWindowFromPoint(), RawInputThreadMain(), UserGetDesktopDC(), UserGhostThreadEntry(), Win32kProcessCallback(), and Win32kThreadCallback().

◆ UserEnterShared()

VOID FASTCALL UserEnterShared ( VOID  )

Definition at line 238 of file ntuser.c.

239 {
242 }
#define TRUE
Definition: types.h:120
ERESOURCE UserLock
Definition: ntuser.c:18
#define KeEnterCriticalRegion()
Definition: ke_x.h:88
BOOLEAN NTAPI ExAcquireResourceSharedLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:885

Referenced by NtUserBuildPropList(), NtUserCallHwnd(), NtUserCopyAcceleratorTable(), NtUserCountClipboardFormats(), NtUserCreateLocalMemHandle(), NtUserEnumDisplayDevices(), NtUserEnumDisplayMonitors(), NtUserEnumDisplaySettings(), NtUserFindExistingCursorIcon(), NtUserFindWindowEx(), NtUserGetAppImeLevel(), NtUserGetCaretBlinkTime(), NtUserGetCaretPos(), NtUserGetClassName(), NtUserGetClipboardData(), NtUserGetClipboardFormatName(), NtUserGetClipboardOwner(), NtUserGetClipboardSequenceNumber(), NtUserGetClipboardViewer(), NtUserGetClipCursor(), NtUserGetComboBoxInfo(), NtUserGetCursorFrameInfo(), NtUserGetCursorInfo(), NtUserGetDoubleClickTime(), NtUserGetGuiResources(), NtUserGetGUIThreadInfo(), NtUserGetIconSize(), NtUserGetImeInfoEx(), NtUserGetInternalWindowPos(), NtUserGetKeyboardLayoutList(), NtUserGetKeyboardLayoutName(), NtUserGetKeyboardState(), NtUserGetKeyNameText(), NtUserGetKeyState(), NtUserGetListBoxInfo(), NtUserGetMenuBarInfo(), NtUserGetMenuIndex(), NtUserGetMenuItemRect(), NtUserGetMonitorInfo(), NtUserGetMouseMovePointsEx(), NtUserGetOpenClipboardWindow(), NtUserGetPriorityClipboardFormat(), NtUserGetThreadState(), NtUserGetWindowPlacement(), NtUserInternalGetWindowText(), NtUserIsClipboardFormatAvailable(), NtUserMapVirtualKeyEx(), NtUserMonitorFromPoint(), NtUserMonitorFromRect(), NtUserMonitorFromWindow(), NtUserProcessConnect(), NtUserQueryWindow(), NtUserRealChildWindowFromPoint(), NtUserSBGetParms(), NtUserTranslateAccelerator(), NtUserValidateTimerCallback(), NtUserVkKeyScanEx(), and UserSystemThreadProc().

◆ UserInitialize()

NTSTATUS NTAPI UserInitialize ( VOID  )

Definition at line 116 of file ntuser.c.

117 {
118  static const DWORD wPattern55AA[] = /* 32 bit aligned */
119  { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa,
120  0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa };
121  HBITMAP hPattern55AABitmap = NULL;
123 
125 
126 // Create Event for Disconnect Desktop.
127 
129  if (!NT_SUCCESS(Status)) return Status;
130 
131  /* Initialize the Video */
132  Status = InitVideo();
133  if (!NT_SUCCESS(Status))
134  {
135  /* We failed, bugcheck */
136  KeBugCheckEx(VIDEO_DRIVER_INIT_FAILURE, Status, 0, 0, USER_VERSION);
137  }
138 
139 // {
140 // DrvInitConsole.
141 // DrvChangeDisplaySettings.
142 // Update Shared Device Caps.
143 // Initialize User Screen.
144 // }
145 
146 // Set Global SERVERINFO Error flags.
147 // Load Resources.
148 
150 
151  if (gpsi->hbrGray == NULL)
152  {
153  hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA);
154  if (hPattern55AABitmap == NULL)
156 
157  gpsi->hbrGray = IntGdiCreatePatternBrush(hPattern55AABitmap);
158 
159  if (gpsi->hbrGray == NULL)
161  }
162 
163  return STATUS_SUCCESS;
164 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define TRUE
Definition: types.h:120
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
LONG NTSTATUS
Definition: precomp.h:26
PSERVERINFO gpsi
Definition: imm.c:18
#define USER_VERSION
Definition: ntuser.h:1144
HBRUSH NTAPI IntGdiCreatePatternBrush(HBITMAP hbmPattern)
Definition: brush.cpp:303
unsigned char * LPBYTE
Definition: typedefs.h:53
NTSTATUS NTAPI UserCreateWinstaDirectory(VOID)
Definition: winsta.c:51
NTSTATUS NTAPI InitVideo(VOID)
Definition: display.c:151
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL NTAPI NtUserUpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable)
Definition: sysparams.c:360
#define NULL
Definition: types.h:112
static HBITMAP
Definition: button.c:44
#define STATUS_SUCCESS
Definition: shellext.h:65
static const WORD wPattern55AA[]
Definition: commctrl.c:86
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
#define NT_ASSERT
Definition: rtlfuncs.h:3310
HBITMAP NTAPI GreCreateBitmap(_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cPlanes, _In_ ULONG cBitsPixel, _In_opt_ PVOID pvBits)
Definition: bitmaps.c:172

Referenced by NtUserInitialize().

◆ UserIsEntered()

BOOL FASTCALL UserIsEntered ( VOID  )

Definition at line 221 of file ntuser.c.

222 {
225 }
ERESOURCE UserLock
Definition: ntuser.c:18
BOOLEAN NTAPI ExIsResourceAcquiredExclusiveLite(IN PERESOURCE Resource)
Definition: resource.c:1619
ULONG NTAPI ExIsResourceAcquiredSharedLite(IN PERESOURCE Resource)
Definition: resource.c:1658

Referenced by IntGetProp(), NtGdiUpdateColors(), UserGetProp(), and UserLeave().

◆ UserIsEnteredExclusive()

◆ UserLeave()

VOID FASTCALL UserLeave ( VOID  )

Definition at line 254 of file ntuser.c.

255 {
260 }
BOOL FASTCALL UserIsEntered(VOID)
Definition: ntuser.c:221
ERESOURCE UserLock
Definition: ntuser.c:18
#define ASSERT(a)
Definition: mode.c:44
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
#define KeLeaveCriticalRegion()
Definition: ke_x.h:119
#define ASSERT_NOGDILOCKS()
Definition: gdidebug.h:10

Referenced by _Success_(), co_IntGetPeekMessage(), DesktopThreadMain(), DriverEntry(), EngCreateWnd(), EngDeleteWnd(), IntDesktopObjectClose(), IntDesktopObjectOpen(), NtGdiSetPixelFormat(), NtGdiSwapBuffers(), NtGdiUpdateColors(), NtUserActivateKeyboardLayout(), NtUserAlterWindowStyle(), NtUserAssociateInputContext(), NtUserAttachThreadInput(), NtUserBeginPaint(), NtUserBitBltSysBmp(), NtUserBlockInput(), NtUserBuildHimcList(), NtUserBuildHwndList(), NtUserBuildPropList(), NtUserCalcMenuBar(), NtUserCallHwnd(), NtUserCallHwndLock(), NtUserCallHwndParam(), NtUserCallHwndParamLock(), NtUserCallMsgFilter(), NtUserCallNextHookEx(), NtUserCallNoParam(), NtUserCallOneParam(), NtUserCallTwoParam(), NtUserChangeClipboardChain(), NtUserChangeDisplaySettings(), NtUserCheckImeHotKey(), NtUserCheckMenuItem(), NtUserChildWindowFromPointEx(), NtUserClipCursor(), NtUserCloseClipboard(), NtUserCloseDesktop(), NtUserConsoleControl(), NtUserConvertMemHandle(), NtUserCopyAcceleratorTable(), NtUserCountClipboardFormats(), NtUserCreateAcceleratorTable(), NtUserCreateCaret(), NtUserCreateDesktop(), NtUserCreateInputContext(), NtUserCreateLocalMemHandle(), NtUserCreateWindowEx(), NtUserCreateWindowStation(), NtUserDeferWindowPos(), NtUserDefSetText(), NtUserDeleteMenu(), NtUserDestroyAcceleratorTable(), NtUserDestroyCursor(), NtUserDestroyInputContext(), NtUserDestroyMenu(), NtUserDestroyWindow(), NtUserDisableThreadIme(), NtUserDispatchMessage(), NtUserDragDetect(), NtUserDrawCaptionTemp(), NtUserDrawIconEx(), NtUserDrawMenuBarTemp(), NtUserEmptyClipboard(), NtUserEnableMenuItem(), NtUserEnableScrollBar(), NtUserEndDeferWindowPosEx(), NtUserEndMenu(), NtUserEndPaint(), NtUserEnumDisplayDevices(), NtUserEnumDisplayMonitors(), NtUserEnumDisplaySettings(), NtUserExcludeUpdateRgn(), NtUserFillWindow(), NtUserFindExistingCursorIcon(), NtUserFindWindowEx(), NtUserFlashWindowEx(), NtUserGetAncestor(), NtUserGetAppImeLevel(), NtUserGetAsyncKeyState(), NtUserGetCaretBlinkTime(), NtUserGetCaretPos(), NtUserGetClassInfo(), NtUserGetClassName(), NtUserGetClipboardData(), NtUserGetClipboardFormatName(), NtUserGetClipboardOwner(), NtUserGetClipboardSequenceNumber(), NtUserGetClipboardViewer(), NtUserGetClipCursor(), NtUserGetComboBoxInfo(), NtUserGetControlBrush(), NtUserGetControlColor(), NtUserGetCPD(), NtUserGetCursorFrameInfo(), NtUserGetCursorInfo(), NtUserGetDCEx(), NtUserGetDoubleClickTime(), NtUserGetForegroundWindow(), NtUserGetGuiResources(), NtUserGetGUIThreadInfo(), NtUserGetIconSize(), NtUserGetImeHotKey(), NtUserGetImeInfoEx(), NtUserGetInternalWindowPos(), NtUserGetKeyboardLayoutList(), NtUserGetKeyboardLayoutName(), NtUserGetKeyboardState(), NtUserGetKeyNameText(), NtUserGetKeyState(), NtUserGetLayeredWindowAttributes(), NtUserGetListBoxInfo(), NtUserGetMenuBarInfo(), NtUserGetMenuIndex(), NtUserGetMenuItemRect(), NtUserGetMessage(), NtUserGetMonitorInfo(), NtUserGetMouseMovePointsEx(), NtUserGetOpenClipboardWindow(), NtUserGetPriorityClipboardFormat(), NtUserGetScrollBarInfo(), NtUserGetSystemMenu(), NtUserGetThreadDesktop(), NtUserGetThreadState(), NtUserGetTitleBarInfo(), NtUserGetUpdateRect(), NtUserGetUpdateRgn(), NtUserGetWindowPlacement(), NtUserGetWOWClass(), NtUserHideCaret(), NtUserHiliteMenuItem(), NtUserInitialize(), NtUserInitializeClientPfnArrays(), NtUserInternalGetWindowText(), NtUserIsClipboardFormatAvailable(), NtUserKillTimer(), NtUserLoadKeyboardLayoutEx(), NtUserLockWorkStation(), NtUserMapVirtualKeyEx(), NtUserMenuItemFromPoint(), NtUserMessageCall(), NtUserMinMaximize(), NtUserMonitorFromPoint(), NtUserMonitorFromRect(), NtUserMonitorFromWindow(), NtUserNotifyIMEStatus(), NtUserNotifyWinEvent(), NtUserOpenClipboard(), NtUserOpenInputDesktop(), NtUserPaintDesktop(), NtUserPaintMenuBar(), NtUserPeekMessage(), NtUserPostMessage(), NtUserPostThreadMessage(), NtUserPrintWindow(), NtUserProcessConnect(), NtUserQueryInformationThread(), NtUserQueryInputContext(), NtUserQueryWindow(), NtUserRealChildWindowFromPoint(), NtUserRedrawWindow(), NtUserRegisterClassExWOW(), NtUserRegisterHotKey(), NtUserRegisterUserApiHook(), NtUserRegisterWindowMessage(), NtUserRemoveMenu(), NtUserRemoveProp(), NtUserResolveDesktop(), NtUserSBGetParms(), NtUserScrollDC(), NtUserScrollWindowEx(), NtUserSelectPalette(), NtUserSendInput(), NtUserSetActiveWindow(), NtUserSetAppImeLevel(), NtUserSetCapture(), NtUserSetClassLong(), NtUserSetClipboardData(), NtUserSetClipboardViewer(), NtUserSetCursor(), NtUserSetCursorIconData(), NtUserSetFocus(), NtUserSetImeHotKey(), NtUserSetImeInfoEx(), NtUserSetImeOwnerWindow(), NtUserSetInformationThread(), NtUserSetInternalWindowPos(), NtUserSetKeyboardState(), NtUserSetLayeredWindowAttributes(), NtUserSetMenu(), NtUserSetMenuContextHelpId(), NtUserSetMenuDefaultItem(), NtUserSetMenuFlagRtoL(), NtUserSetParent(), NtUserSetProcessWindowStation(), NtUserSetProp(), NtUserSetScrollBarInfo(), NtUserSetScrollInfo(), NtUserSetShellWindowEx(), NtUserSetSysColors(), NtUserSetSystemCursor(), NtUserSetSystemMenu(), NtUserSetSystemTimer(), NtUserSetThreadDesktop(), NtUserSetThreadLayoutHandles(), NtUserSetThreadState(), NtUserSetTimer(), NtUserSetWindowFNID(), NtUserSetWindowLong(), NtUserSetWindowPlacement(), NtUserSetWindowPos(), NtUserSetWindowRgn(), NtUserSetWindowsHookEx(), NtUserSetWindowStationUser(), NtUserSetWindowWord(), NtUserSetWinEventHook(), NtUserShowCaret(), NtUserShowScrollBar(), NtUserShowWindow(), NtUserShowWindowAsync(), NtUserSwitchDesktop(), NtUserSystemParametersInfo(), NtUserThunkedMenuInfo(), NtUserThunkedMenuItemInfo(), NtUserToUnicodeEx(), NtUserTrackMouseEvent(), NtUserTrackPopupMenuEx(), NtUserTranslateAccelerator(), NtUserTranslateMessage(), NtUserUnhookWindowsHookEx(), NtUserUnhookWinEvent(), NtUserUnloadKeyboardLayout(), NtUserUnregisterClass(), NtUserUnregisterHotKey(), NtUserUnregisterUserApiHook(), NtUserUpdateInputContext(), NtUserUpdateLayeredWindow(), NtUserUpdatePerUserSystemParameters(), NtUserValidateHandleSecure(), NtUserValidateTimerCallback(), NtUserVkKeyScanEx(), NtUserWaitForInputIdle(), NtUserWaitMessage(), NtUserWindowFromPoint(), RawInputThreadMain(), UserGetDesktopDC(), UserGhostThreadEntry(), UserSystemThreadProc(), Win32kProcessCallback(), and Win32kThreadCallback().

Variable Documentation

◆ AtomDDETrack

ATOM AtomDDETrack

Definition at line 23 of file ntuser.c.

Referenced by InitUserAtoms(), IntDdeGetMessageHook(), and IntDdeSendMessageHook().

◆ AtomFlashWndState

ATOM AtomFlashWndState

Definition at line 22 of file ntuser.c.

Referenced by InitUserAtoms(), and IntFlashWindowEx().

◆ AtomImeLevel

ATOM AtomImeLevel

Definition at line 28 of file ntuser.c.

Referenced by InitUserAtoms(), NtUserGetAppImeLevel(), and NtUserSetAppImeLevel().

◆ AtomLayer

◆ AtomMessage

ATOM AtomMessage

Definition at line 19 of file ntuser.c.

Referenced by InitUserAtoms().

◆ AtomQOS

ATOM AtomQOS

Definition at line 24 of file ntuser.c.

Referenced by InitUserAtoms().

◆ AtomWndObj

ATOM AtomWndObj

Definition at line 20 of file ntuser.c.

Referenced by EngCreateWnd(), EngDeleteWnd(), InitUserAtoms(), IntEngWindowChanged(), and UserGethWnd().

◆ ClientPfnInit

BOOL ClientPfnInit = FALSE

Definition at line 26 of file ntuser.c.

Referenced by NtUserInitializeClientPfnArrays().

◆ g_AlwaysDisplayVersion

BOOL g_AlwaysDisplayVersion = FALSE

Definition at line 17 of file ntuser.c.

Referenced by InitUserImpl(), and IntPaintDesktop().

◆ gaGuiConsoleWndClass

ATOM gaGuiConsoleWndClass

◆ gppiInputProvider

◆ gptiCurrent

◆ hModClient

◆ UserLock