ReactOS 0.4.17-dev-1190-g4c812f4
ntstubs.c File Reference
#include <win32k.h>
Include dependency graph for ntstubs.c:

Go to the source code of this file.

Macros

#define SERVER_TO_CLIENT(ptr)    ((PVOID)((ULONG_PTR)ptr - pUserConnect->siClient.ulSharedDelta))
 

Functions

 DBG_DEFAULT_CHANNEL (UserMisc)
 
BOOL APIENTRY NtUserBitBltSysBmp (HDC hdc, INT nXDest, INT nYDest, INT nWidth, INT nHeight, INT nXSrc, INT nYSrc, DWORD dwRop)
 
DWORD APIENTRY NtUserDragObject (HWND hwnd1, HWND hwnd2, UINT u1, DWORD dw1, HCURSOR hc1)
 
BOOL APIENTRY NtUserDrawAnimatedRects (HWND hwnd, INT idAni, RECT *lprcFrom, RECT *lprcTo)
 
DWORD APIENTRY NtUserEvent (DWORD Unknown0)
 
BOOL APIENTRY NtUserGetAltTabInfo (HWND hwnd, INT iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText, BOOL Ansi)
 
NTSTATUS APIENTRY NtUserInitializeClientPfnArrays (PPFNCLIENT pfnClientA, PPFNCLIENT pfnClientW, PPFNCLIENTWORKER pfnClientWorker, HINSTANCE hmodUser)
 
DWORD APIENTRY NtUserInitTask (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7, DWORD Unknown8, DWORD Unknown9, DWORD Unknown10, DWORD Unknown11)
 
DWORD APIENTRY NtUserMNDragLeave (VOID)
 
DWORD APIENTRY NtUserMNDragOver (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserModifyUserStartupInfoFlags (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserQueryUserCounters (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
 
DWORD APIENTRY NtUserRegisterTasklist (DWORD Unknown0)
 
DWORD APIENTRY NtUserSetConsoleReserveKeys (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserSetDbgTag (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserSetDbgTagCount (DWORD Unknown0)
 
DWORD APIENTRY NtUserSetRipFlags (DWORD Unknown0)
 
DWORD APIENTRY NtUserDbgWin32HeapFail (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserDbgWin32HeapStat (DWORD Unknown0, DWORD Unknown1)
 
BOOL APIENTRY NtUserSetSysColors (int cElements, IN CONST INT *lpaElements, IN CONST COLORREF *lpaRgbValues, FLONG Flags)
 
DWORD APIENTRY NtUserUpdateInstance (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2)
 
DWORD APIENTRY NtUserWaitForMsgAndEvent (DWORD Unknown0)
 
DWORD APIENTRY NtUserWin32PoolAllocationStats (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5)
 
DWORD APIENTRY NtUserYieldTask (VOID)
 
DWORD APIENTRY NtUserHardErrorControl (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
BOOL NTAPI NtUserNotifyProcessCreate (HANDLE NewProcessId, HANDLE ParentThreadId, ULONG dwUnknown, ULONG CreateFlags)
 
NTSTATUS APIENTRY NtUserProcessConnect (IN HANDLE ProcessHandle, OUT PUSERCONNECT pUserConnect, IN ULONG Size)
 
NTSTATUS APIENTRY NtUserQueryInformationThread (IN HANDLE ThreadHandle, IN USERTHREADINFOCLASS ThreadInformationClass, OUT PVOID ThreadInformation, IN ULONG ThreadInformationLength)
 
BOOL APIENTRY NtUserRealInternalGetMessage (LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg, BOOL bGMSG)
 
BOOL APIENTRY NtUserRealWaitMessageEx (DWORD dwWakeMask, UINT uTimeout)
 
DWORD APIENTRY NtUserResolveDesktopForWOW (DWORD Unknown0)
 
DWORD APIENTRY NtUserSetInformationProcess (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3, DWORD dwUnknown4)
 
HDESK FASTCALL IntGetDesktopObjectHandle (PDESKTOP DesktopObject)
 
NTSTATUS APIENTRY NtUserSetInformationThread (IN HANDLE ThreadHandle, IN USERTHREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
 
BOOL APIENTRY NtUserSoundSentry (VOID)
 
DWORD APIENTRY NtUserTestForInteractiveUser (DWORD dwUnknown1)
 
DWORD APIENTRY NtUserRemoteConnect (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
DWORD APIENTRY NtUserRemoteRedrawRectangle (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3, DWORD dwUnknown4)
 
DWORD APIENTRY NtUserRemoteRedrawScreen (VOID)
 
DWORD APIENTRY NtUserRemoteStopScreenUpdates (VOID)
 
DWORD APIENTRY NtUserCtxDisplayIOCtl (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
BOOL APIENTRY NtUserLockWindowUpdate (HWND hWnd)
 
DWORD APIENTRY NtUserQuerySendMessage (DWORD Unknown0)
 
BOOL APIENTRY NtUserAddClipboardFormatListener (HWND hwnd)
 
BOOL APIENTRY NtUserRemoveClipboardFormatListener (HWND hwnd)
 
BOOL APIENTRY NtUserGetUpdatedClipboardFormats (PUINT lpuiFormats, UINT cFormats, PUINT pcFormatsOut)
 
BOOL APIENTRY NtGdiMakeObjectXferable (_In_ HANDLE hHandle, _In_ DWORD dwProcessId)
 
BOOL APIENTRY NtGdiMakeObjectUnXferable (_In_ HANDLE hHandle)
 
DWORD APIENTRY NtDxEngGetRedirectionBitmap (DWORD Unknown0)
 

Macro Definition Documentation

◆ SERVER_TO_CLIENT

#define SERVER_TO_CLIENT (   ptr)     ((PVOID)((ULONG_PTR)ptr - pUserConnect->siClient.ulSharedDelta))

Function Documentation

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( UserMisc  )

◆ IntGetDesktopObjectHandle()

HDESK FASTCALL IntGetDesktopObjectHandle ( PDESKTOP  DesktopObject)

Definition at line 1299 of file desktop.c.

1300{
1302 HDESK hDesk;
1303
1304 ASSERT(DesktopObject);
1305
1307 DesktopObject,
1309 NULL,
1310 (PHANDLE)&hDesk))
1311 {
1312 Status = ObOpenObjectByPointer(DesktopObject,
1313 0,
1314 NULL,
1315 0,
1317 UserMode,
1318 (PHANDLE)&hDesk);
1319 if (!NT_SUCCESS(Status))
1320 {
1321 /* Unable to create a handle */
1322 ERR("Unable to create a desktop handle\n");
1323 return NULL;
1324 }
1325 }
1326 else
1327 {
1328 TRACE("Got handle: 0x%p\n", hDesk);
1329 }
1330
1331 return hDesk;
1332}
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:24
#define ASSERT(a)
Definition: mode.c:44
#define UserMode
Definition: asm.h:39
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
BOOLEAN NTAPI ObFindHandleForObject(IN PEPROCESS Process, IN PVOID Object, IN POBJECT_TYPE ObjectType, IN POBJECT_HANDLE_INFORMATION HandleInformation, OUT PHANDLE Handle)
Definition: obhandle.c:2883
NTSTATUS NTAPI ObOpenObjectByPointer(IN PVOID Object, IN ULONG HandleAttributes, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PHANDLE Handle)
Definition: obhandle.c:2769
#define TRACE(s)
Definition: solgame.cpp:4
POBJECT_TYPE ExDesktopObjectType
Definition: win32k.c:22
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Referenced by NtUserGetThreadDesktop(), and NtUserSetInformationThread().

◆ NtDxEngGetRedirectionBitmap()

DWORD APIENTRY NtDxEngGetRedirectionBitmap ( DWORD  Unknown0)

Definition at line 892 of file ntstubs.c.

894{
895 STUB;
896 return 0;
897}
#define STUB
Definition: kernel32.h:27

◆ NtGdiMakeObjectUnXferable()

BOOL APIENTRY NtGdiMakeObjectUnXferable ( _In_ HANDLE  hHandle)

Definition at line 883 of file ntstubs.c.

885{
886 STUB;
887 return 0;
888}

◆ NtGdiMakeObjectXferable()

BOOL APIENTRY NtGdiMakeObjectXferable ( _In_ HANDLE  hHandle,
_In_ DWORD  dwProcessId 
)

Definition at line 873 of file ntstubs.c.

876{
877 STUB;
878 return 0;
879}

◆ NtUserAddClipboardFormatListener()

BOOL APIENTRY NtUserAddClipboardFormatListener ( HWND  hwnd)

Definition at line 844 of file ntstubs.c.

847{
848 STUB;
849 return FALSE;
850}
#define FALSE
Definition: types.h:117

◆ NtUserBitBltSysBmp()

BOOL APIENTRY NtUserBitBltSysBmp ( HDC  hdc,
INT  nXDest,
INT  nYDest,
INT  nWidth,
INT  nHeight,
INT  nXSrc,
INT  nYSrc,
DWORD  dwRop 
)

Definition at line 17 of file ntstubs.c.

26{
27 BOOL Ret = FALSE;
29
30 Ret = NtGdiBitBlt( hdc,
31 nXDest,
32 nYDest,
33 nWidth,
34 nHeight,
36 nXSrc,
37 nYSrc,
38 dwRop,
40 0);
41
42 UserLeave();
43 return Ret;
44}
unsigned int BOOL
Definition: ntddk_ex.h:94
HDC hSystemBM
Definition: stockobj.c:52
HDC hdc
Definition: main.c:9
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:255
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:247
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBitBlt(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD rop4, _In_ DWORD crBackColor, _In_ FLONG fl)
#define CLR_INVALID
Definition: wingdi.h:883

◆ NtUserCtxDisplayIOCtl()

DWORD APIENTRY NtUserCtxDisplayIOCtl ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 817 of file ntstubs.c.

821{
822 STUB;
823 return 0;
824}

◆ NtUserDbgWin32HeapFail()

DWORD APIENTRY NtUserDbgWin32HeapFail ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 266 of file ntstubs.c.

269{
270 STUB
271
272 return 0;
273}

◆ NtUserDbgWin32HeapStat()

DWORD APIENTRY NtUserDbgWin32HeapStat ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 277 of file ntstubs.c.

280{
281 STUB
282
283 return 0;
284}

◆ NtUserDragObject()

DWORD APIENTRY NtUserDragObject ( HWND  hwnd1,
HWND  hwnd2,
UINT  u1,
DWORD  dw1,
HCURSOR  hc1 
)

Definition at line 48 of file ntstubs.c.

55{
56 STUB
57
58 return 0;
59}

Referenced by DragObject().

◆ NtUserDrawAnimatedRects()

BOOL APIENTRY NtUserDrawAnimatedRects ( HWND  hwnd,
INT  idAni,
RECT *  lprcFrom,
RECT *  lprcTo 
)

Definition at line 63 of file ntstubs.c.

68{
69 STUB
70
71 return 0;
72}

Referenced by DrawAnimatedRects().

◆ NtUserEvent()

DWORD APIENTRY NtUserEvent ( DWORD  Unknown0)

Definition at line 76 of file ntstubs.c.

78{
79 STUB
80
81 return 0;
82}

◆ NtUserGetAltTabInfo()

BOOL APIENTRY NtUserGetAltTabInfo ( HWND  hwnd,
INT  iItem,
PALTTABINFO  pati,
LPWSTR  pszItemText,
UINT  cchItemText,
BOOL  Ansi 
)

Definition at line 86 of file ntstubs.c.

93{
94 STUB
95
96 return 0;
97}

Referenced by GetAltTabInfoA(), and GetAltTabInfoW().

◆ NtUserGetUpdatedClipboardFormats()

BOOL APIENTRY NtUserGetUpdatedClipboardFormats ( PUINT  lpuiFormats,
UINT  cFormats,
PUINT  pcFormatsOut 
)

Definition at line 860 of file ntstubs.c.

865{
866 STUB;
867 return FALSE;
868}

◆ NtUserHardErrorControl()

DWORD APIENTRY NtUserHardErrorControl ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 381 of file ntstubs.c.

385{
386 STUB;
387 return 0;
388}

◆ NtUserInitializeClientPfnArrays()

NTSTATUS APIENTRY NtUserInitializeClientPfnArrays ( PPFNCLIENT  pfnClientA,
PPFNCLIENT  pfnClientW,
PPFNCLIENTWORKER  pfnClientWorker,
HINSTANCE  hmodUser 
)

Definition at line 101 of file ntstubs.c.

106{
108 TRACE("Enter NtUserInitializeClientPfnArrays User32 0x%p\n", hmodUser);
109
110 if (ClientPfnInit) return Status;
111
113
115 {
116 ProbeForRead( pfnClientA, sizeof(PFNCLIENT), 1);
117 ProbeForRead( pfnClientW, sizeof(PFNCLIENT), 1);
122
126
127 hModClient = hmodUser;
129 }
131 {
133 }
135
136 if (!NT_SUCCESS(Status))
137 {
138 ERR("Failed reading Client Pfns from user space.\n");
140 }
141
142 UserLeave();
143 return Status;
144}
#define TRUE
Definition: types.h:120
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
PSERVERINFO gpsi
Definition: imm.c:18
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
HINSTANCE hModClient
Definition: ntuser.c:25
BOOL ClientPfnInit
Definition: ntuser.c:26
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:204
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:104
#define _SEH2_END
Definition: pseh2_64.h:194
#define _SEH2_TRY
Definition: pseh2_64.h:93
static PFNCLIENT pfnClientA
Definition: regcontrol.c:15
static PFNCLIENT pfnClientW
Definition: regcontrol.c:16
static PFNCLIENTWORKER pfnClientWorker
Definition: regcontrol.c:17
#define STATUS_SUCCESS
Definition: shellext.h:65
PFNCLIENT apfnClientA
Definition: ntuser.h:1060
PFNCLIENT apfnClientW
Definition: ntuser.h:1061
WNDPROC aStoCidPfn[FNID_NUMSERVERPROC]
Definition: ntuser.h:1058
PFNCLIENTWORKER apfnClientWorker
Definition: ntuser.h:1062
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:30

Referenced by RegisterClientPFN().

◆ NtUserInitTask()

DWORD APIENTRY NtUserInitTask ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4,
DWORD  Unknown5,
DWORD  Unknown6,
DWORD  Unknown7,
DWORD  Unknown8,
DWORD  Unknown9,
DWORD  Unknown10,
DWORD  Unknown11 
)

Definition at line 148 of file ntstubs.c.

161{
162 STUB
163
164 return 0;
165}

◆ NtUserLockWindowUpdate()

BOOL APIENTRY NtUserLockWindowUpdate ( HWND  hWnd)

Definition at line 830 of file ntstubs.c.

831{
832 STUB;
833 return FALSE;
834}

Referenced by LockWindowUpdate().

◆ NtUserMNDragLeave()

DWORD APIENTRY NtUserMNDragLeave ( VOID  )

Definition at line 169 of file ntstubs.c.

170{
171 STUB
172
173 return 0;
174}

◆ NtUserMNDragOver()

DWORD APIENTRY NtUserMNDragOver ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 178 of file ntstubs.c.

181{
182 STUB
183
184 return 0;
185}

◆ NtUserModifyUserStartupInfoFlags()

DWORD APIENTRY NtUserModifyUserStartupInfoFlags ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 189 of file ntstubs.c.

192{
193 STUB
194
195 return 0;
196}

◆ NtUserNotifyProcessCreate()

BOOL NTAPI NtUserNotifyProcessCreate ( HANDLE  NewProcessId,
HANDLE  ParentThreadId,
ULONG  dwUnknown,
ULONG  CreateFlags 
)

Definition at line 392 of file ntstubs.c.

397{
398 // STUB;
399 TRACE("NtUserNotifyProcessCreate is UNIMPLEMENTED\n");
400 return FALSE;
401}

Referenced by CSR_SERVER_DLL_INIT().

◆ NtUserProcessConnect()

NTSTATUS APIENTRY NtUserProcessConnect ( IN HANDLE  ProcessHandle,
OUT PUSERCONNECT  pUserConnect,
IN ULONG  Size 
)

Definition at line 405 of file ntstubs.c.

409{
412 PPROCESSINFO W32Process;
413
414 TRACE("NtUserProcessConnect\n");
415
416 if (pUserConnect == NULL ||
417 Size != sizeof(*pUserConnect))
418 {
419 return STATUS_UNSUCCESSFUL;
420 }
421
422 /* Get the process object the user handle was referencing */
426 UserMode,
427 (PVOID*)&Process,
428 NULL);
429 if (!NT_SUCCESS(Status)) return Status;
430
432
433 /* Get Win32 process information */
434 W32Process = PsGetProcessWin32Process(Process);
435
437 {
438 UINT i;
439
440 // FIXME: Check that pUserConnect->ulVersion == USER_VERSION;
441 // FIXME: Check the value of pUserConnect->dwDispatchCount.
442
443 ProbeForWrite(pUserConnect, sizeof(*pUserConnect), sizeof(PVOID));
444
445 // FIXME: Instead of assuming that the mapping of the heap desktop
446 // also holds there, we **MUST** create and map instead the shared
447 // section! Its client base must be stored in W32Process->pClientBase.
448 // What is currently done (ReactOS-specific only), is that within the
449 // IntUserHeapCommitRoutine()/MapGlobalUserHeap() routines we assume
450 // it's going to be also called early, so that we manually add a very
451 // first memory mapping that corresponds to the "global user heap",
452 // and that we use instead of a actual win32 "shared USER section"
453 // (see slide 29 of https://paper.bobylive.com/Meeting_Papers/BlackHat/USA-2011/BH_US_11_Mandt_win32k_Slides.pdf )
454
455 pUserConnect->siClient.ulSharedDelta =
458
459#define SERVER_TO_CLIENT(ptr) \
460 ((PVOID)((ULONG_PTR)ptr - pUserConnect->siClient.ulSharedDelta))
461
462 ASSERT(gpsi);
464
465 pUserConnect->siClient.psi = SERVER_TO_CLIENT(gpsi);
466 pUserConnect->siClient.aheList = SERVER_TO_CLIENT(gHandleTable);
467 pUserConnect->siClient.pDispInfo = NULL;
468
469 // NOTE: kernel server should also have a SHAREDINFO gSharedInfo;
470 // FIXME: These USER window-proc data should be used somehow!
471
472 pUserConnect->siClient.DefWindowMsgs.maxMsgs = 0;
473 pUserConnect->siClient.DefWindowMsgs.abMsgs = NULL;
474 pUserConnect->siClient.DefWindowSpecMsgs.maxMsgs = 0;
475 pUserConnect->siClient.DefWindowSpecMsgs.abMsgs = NULL;
476
477 for (i = 0; i < ARRAYSIZE(pUserConnect->siClient.awmControl); ++i)
478 {
479 pUserConnect->siClient.awmControl[i].maxMsgs = 0;
480 pUserConnect->siClient.awmControl[i].abMsgs = NULL;
481 }
482#undef SERVER_TO_CLIENT
483 }
485 {
487 }
488 _SEH2_END;
489
490 if (!NT_SUCCESS(Status))
492
493 UserLeave();
494
495 /* Dereference the process object */
497
498 return Status;
499}
#define ARRAYSIZE(a)
Definition: cat.c:25
#define ULONG_PTR
Definition: config.h:101
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
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
unsigned int UINT
Definition: sysinfo.c:13
#define PROCESS_VM_OPERATION
Definition: pstypes.h:156
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:407
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
Definition: process.c:1233
POBJECT_TYPE PsProcessType
Definition: process.c:20
#define SERVER_TO_CLIENT(ptr)
VOID FASTCALL UserEnterShared(VOID)
Definition: ntuser.c:241
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:493
W32HEAP_USER_MAPPING HeapMappings
Definition: win32.h:294
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by ClientThreadSetupHelper(), Init(), START_TEST(), and UserClientConnect().

◆ NtUserQueryInformationThread()

NTSTATUS APIENTRY NtUserQueryInformationThread ( IN HANDLE  ThreadHandle,
IN USERTHREADINFOCLASS  ThreadInformationClass,
OUT PVOID  ThreadInformation,
IN ULONG  ThreadInformationLength 
)

Definition at line 503 of file ntstubs.c.

507{
510
511 /* Allow only CSRSS to perform this operation */
514
516
517 /* Get the Thread */
518 Status = ObReferenceObjectByHandle(ThreadHandle,
521 UserMode,
522 (PVOID)&Thread,
523 NULL);
524 if (!NT_SUCCESS(Status)) goto Quit;
525
527 {
528 default:
529 {
530 STUB;
532 break;
533 }
534 }
535
537
538Quit:
539 UserLeave();
540 return Status;
541}
PEPROCESS gpepCSRSS
Definition: csr.c:15
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
#define THREAD_QUERY_INFORMATION
Definition: pstypes.h:145
_In_ THREADINFOCLASS ThreadInformationClass
Definition: psfuncs.h:886
POBJECT_TYPE PsThreadType
Definition: thread.c:20
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145

◆ NtUserQuerySendMessage()

DWORD APIENTRY NtUserQuerySendMessage ( DWORD  Unknown0)

Definition at line 837 of file ntstubs.c.

838{
839 STUB;
840
841 return 0;
842}

◆ NtUserQueryUserCounters()

DWORD APIENTRY NtUserQueryUserCounters ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4 
)

Definition at line 200 of file ntstubs.c.

206{
207 STUB
208
209 return 0;
210}

◆ NtUserRealInternalGetMessage()

BOOL APIENTRY NtUserRealInternalGetMessage ( LPMSG  lpMsg,
HWND  hWnd,
UINT  wMsgFilterMin,
UINT  wMsgFilterMax,
UINT  wRemoveMsg,
BOOL  bGMSG 
)

Definition at line 545 of file ntstubs.c.

552{
553 STUB;
554 return 0;
555}

Referenced by ResetMessagePumpHook().

◆ NtUserRealWaitMessageEx()

BOOL APIENTRY NtUserRealWaitMessageEx ( DWORD  dwWakeMask,
UINT  uTimeout 
)

Definition at line 559 of file ntstubs.c.

562{
563 STUB;
564 return 0;
565}

Referenced by ResetMessagePumpHook().

◆ NtUserRegisterTasklist()

DWORD APIENTRY NtUserRegisterTasklist ( DWORD  Unknown0)

Definition at line 214 of file ntstubs.c.

216{
217 STUB
218
219 return 0;
220}

Referenced by RegisterTasklist().

◆ NtUserRemoteConnect()

DWORD APIENTRY NtUserRemoteConnect ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 778 of file ntstubs.c.

782{
783 STUB;
784 return 0;
785}

◆ NtUserRemoteRedrawRectangle()

DWORD APIENTRY NtUserRemoteRedrawRectangle ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3,
DWORD  dwUnknown4 
)

Definition at line 789 of file ntstubs.c.

794{
795 STUB;
796 return 0;
797}

◆ NtUserRemoteRedrawScreen()

DWORD APIENTRY NtUserRemoteRedrawScreen ( VOID  )

Definition at line 801 of file ntstubs.c.

802{
803 STUB;
804 return 0;
805}

◆ NtUserRemoteStopScreenUpdates()

DWORD APIENTRY NtUserRemoteStopScreenUpdates ( VOID  )

Definition at line 809 of file ntstubs.c.

810{
811 STUB;
812 return 0;
813}

◆ NtUserRemoveClipboardFormatListener()

BOOL APIENTRY NtUserRemoveClipboardFormatListener ( HWND  hwnd)

Definition at line 852 of file ntstubs.c.

855{
856 STUB;
857 return FALSE;
858}

◆ NtUserResolveDesktopForWOW()

DWORD APIENTRY NtUserResolveDesktopForWOW ( DWORD  Unknown0)

Definition at line 568 of file ntstubs.c.

569{
570 STUB
571 return 0;
572}

◆ NtUserSetConsoleReserveKeys()

DWORD APIENTRY NtUserSetConsoleReserveKeys ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 224 of file ntstubs.c.

227{
228 STUB
229
230 return 0;
231}

◆ NtUserSetDbgTag()

DWORD APIENTRY NtUserSetDbgTag ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 235 of file ntstubs.c.

238{
239 STUB;
240
241 return 0;
242}

◆ NtUserSetDbgTagCount()

DWORD APIENTRY NtUserSetDbgTagCount ( DWORD  Unknown0)

Definition at line 246 of file ntstubs.c.

248{
249 STUB;
250
251 return 0;
252}

◆ NtUserSetInformationProcess()

DWORD APIENTRY NtUserSetInformationProcess ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3,
DWORD  dwUnknown4 
)

Definition at line 576 of file ntstubs.c.

581{
582 STUB;
583 return 0;
584}

◆ NtUserSetInformationThread()

NTSTATUS APIENTRY NtUserSetInformationThread ( IN HANDLE  ThreadHandle,
IN USERTHREADINFOCLASS  ThreadInformationClass,
IN PVOID  ThreadInformation,
IN ULONG  ThreadInformationLength 
)

Definition at line 591 of file ntstubs.c.

595{
598
599 /* Allow only CSRSS to perform this operation */
602
604
605 /* Get the Thread */
606 Status = ObReferenceObjectByHandle(ThreadHandle,
609 UserMode,
610 (PVOID)&Thread,
611 NULL);
612 if (!NT_SUCCESS(Status)) goto Quit;
613
615 {
617 {
618 ULONG CapturedFlags = 0;
619
620 TRACE("Shutdown initiated\n");
621
622 if (ThreadInformationLength != sizeof(CapturedFlags))
623 {
625 break;
626 }
627
628 /* Capture the caller value */
631 {
632 ProbeForWrite(ThreadInformation, sizeof(CapturedFlags), __alignof(CapturedFlags));
633 CapturedFlags = *(PULONG)ThreadInformation;
634 }
636 {
638 _SEH2_YIELD(break);
639 }
640 _SEH2_END;
641
642 Status = UserInitiateShutdown(Thread, &CapturedFlags);
643
644 /* Return the modified value to the caller */
646 {
647 *(PULONG)ThreadInformation = CapturedFlags;
648 }
650 {
652 }
653 _SEH2_END;
654
655 break;
656 }
657
659 {
660 NTSTATUS ShutdownStatus;
661
662 TRACE("Shutdown ended\n");
663
664 if (ThreadInformationLength != sizeof(ShutdownStatus))
665 {
667 break;
668 }
669
670 /* Capture the caller value */
673 {
674 ProbeForRead(ThreadInformation, sizeof(ShutdownStatus), __alignof(ShutdownStatus));
675 ShutdownStatus = *(NTSTATUS*)ThreadInformation;
676 }
678 {
680 _SEH2_YIELD(break);
681 }
682 _SEH2_END;
683
684 Status = UserEndShutdown(Thread, ShutdownStatus);
685 break;
686 }
687
689 {
690 HANDLE CsrPortHandle;
691
692
693 TRACE("Set CSR API Port for Win32k\n");
694 if (ThreadInformationLength != sizeof(CsrPortHandle))
695 {
697 break;
698 }
699
700 /* Capture the caller value */
703 {
704 ProbeForRead(ThreadInformation, sizeof(CsrPortHandle), __alignof(CsrPortHandle));
705 CsrPortHandle = *(PHANDLE)ThreadInformation;
706 }
708 {
710 _SEH2_YIELD(break);
711 }
712 _SEH2_END;
713
714 Status = InitCsrApiPort(CsrPortHandle);
715 break;
716 }
717
719 {
720 HDESK hdesk;
721
722 if (Thread != PsGetCurrentThread())
723 {
725 break;
726 }
727
730
731 break;
732 }
734 {
735 if (Thread != PsGetCurrentThread())
736 {
738 break;
739 }
740
742 break;
743 }
744 default:
745 {
746 STUB;
748 break;
749 }
750 }
751
753
754Quit:
755 UserLeave();
756 return Status;
757}
NTSTATUS InitCsrApiPort(IN HANDLE CsrPortHandle)
Definition: csr.c:38
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
@ UserThreadEndShutdown
Definition: ntuser.h:77
@ UserThreadRestoreDesktop
Definition: ntuser.h:80
@ UserThreadInitiateShutdown
Definition: ntuser.h:76
@ UserThreadCsrApiPort
Definition: ntuser.h:81
@ UserThreadUseActiveDesktop
Definition: ntuser.h:78
_In_ THREADINFOCLASS _In_ ULONG ThreadInformationLength
Definition: psfuncs.h:889
#define THREAD_SET_INFORMATION
Definition: nt_native.h:1340
HDESK FASTCALL IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
Definition: desktop.c:1299
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:207
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
PDESKTOP gpdeskInputDesktop
Currently active desktop.
Definition: desktop.c:51
BOOL IntSetThreadDesktop(IN HDESK hDesktop, IN BOOL FreeOnFailure)
Definition: desktop.c:3400
NTSTATUS UserEndShutdown(IN PETHREAD Thread, IN NTSTATUS ShutdownStatus)
Definition: shutdown.c:290
NTSTATUS UserInitiateShutdown(IN PETHREAD Thread, IN OUT PULONG pFlags)
Definition: shutdown.c:166

Referenced by CSR_API(), EndNowThreadProc(), UserClientConnect(), UserExitReactOS(), and UserServerHardError().

◆ NtUserSetRipFlags()

DWORD APIENTRY NtUserSetRipFlags ( DWORD  Unknown0)

Definition at line 256 of file ntstubs.c.

258{
259 STUB;
260
261 return 0;
262}

◆ NtUserSetSysColors()

BOOL APIENTRY NtUserSetSysColors ( int  cElements,
IN CONST INT *  lpaElements,
IN CONST COLORREF *  lpaRgbValues,
FLONG  Flags 
)

Definition at line 288 of file ntstubs.c.

293{
294 DWORD Ret = TRUE;
295
296 if (cElements == 0)
297 return TRUE;
298
299 /* We need this check to prevent overflow later */
300 if ((ULONG)cElements >= 0x40000000)
301 {
303 return FALSE;
304 }
305
307
309 {
310 ProbeForRead(lpaElements, cElements * sizeof(INT), 1);
311 ProbeForRead(lpaRgbValues, cElements * sizeof(COLORREF), 1);
312
313 IntSetSysColors(cElements, lpaElements, lpaRgbValues);
314 }
316 {
318 Ret = FALSE;
319 }
320 _SEH2_END;
321
322 if (Ret)
323 {
325
327 }
328
329 UserLeave();
330 return Ret;
331}
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID FASTCALL IntSetSysColors(UINT nColors, CONST INT *Elements, CONST COLORREF *Colors)
Definition: stockobj.c:300
#define HWND_BROADCAST
Definition: winuser.h:1215
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1654
int32_t INT
Definition: typedefs.h:58
VOID APIENTRY UserRedrawDesktop(VOID)
Definition: desktop.c:1619
BOOL FASTCALL UserSendNotifyMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:2092
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
DWORD COLORREF
Definition: windef.h:100
#define ERROR_NOACCESS
Definition: winerror.h:902

Referenced by SetSysColors().

◆ NtUserSoundSentry()

BOOL APIENTRY NtUserSoundSentry ( VOID  )

Definition at line 761 of file ntstubs.c.

762{
763 STUB;
764 return 0;
765}

◆ NtUserTestForInteractiveUser()

DWORD APIENTRY NtUserTestForInteractiveUser ( DWORD  dwUnknown1)

Definition at line 769 of file ntstubs.c.

771{
772 STUB;
773 return 0;
774}

◆ NtUserUpdateInstance()

DWORD APIENTRY NtUserUpdateInstance ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2 
)

Definition at line 335 of file ntstubs.c.

339{
340 STUB
341
342 return 0;
343}

◆ NtUserWaitForMsgAndEvent()

DWORD APIENTRY NtUserWaitForMsgAndEvent ( DWORD  Unknown0)

Definition at line 347 of file ntstubs.c.

349{
350 STUB
351
352 return 0;
353}

◆ NtUserWin32PoolAllocationStats()

DWORD APIENTRY NtUserWin32PoolAllocationStats ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4,
DWORD  Unknown5 
)

Definition at line 357 of file ntstubs.c.

364{
365 STUB
366
367 return 0;
368}

◆ NtUserYieldTask()

DWORD APIENTRY NtUserYieldTask ( VOID  )

Definition at line 372 of file ntstubs.c.

373{
374 STUB
375
376 return 0;
377}