ReactOS 0.4.17-dev-806-gffa4164
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 NtUserGetRawInputBuffer (PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader)
 
DWORD APIENTRY NtUserGetRawInputData (HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader)
 
DWORD APIENTRY NtUserGetRegisteredRawInputDevices (PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize)
 
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)
 
BOOL APIENTRY NtUserRegisterRawInputDevices (IN PCRAWINPUTDEVICE pRawInputDevices, IN UINT uiNumDevices, IN UINT cbSize)
 
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:2878
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:2764
#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 938 of file ntstubs.c.

940{
941 STUB;
942 return 0;
943}
#define STUB
Definition: kernel32.h:27

◆ NtGdiMakeObjectUnXferable()

BOOL APIENTRY NtGdiMakeObjectUnXferable ( _In_ HANDLE  hHandle)

Definition at line 929 of file ntstubs.c.

931{
932 STUB;
933 return 0;
934}

◆ NtGdiMakeObjectXferable()

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

Definition at line 919 of file ntstubs.c.

922{
923 STUB;
924 return 0;
925}

◆ NtUserAddClipboardFormatListener()

BOOL APIENTRY NtUserAddClipboardFormatListener ( HWND  hwnd)

Definition at line 890 of file ntstubs.c.

893{
894 STUB;
895 return FALSE;
896}
#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 863 of file ntstubs.c.

867{
868 STUB;
869 return 0;
870}

◆ 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().

◆ NtUserGetRawInputBuffer()

DWORD APIENTRY NtUserGetRawInputBuffer ( PRAWINPUT  pData,
PUINT  pcbSize,
UINT  cbSizeHeader 
)

Definition at line 381 of file ntstubs.c.

385{
386 STUB;
387 return 0;
388}

Referenced by GetRawInputBuffer().

◆ NtUserGetRawInputData()

DWORD APIENTRY NtUserGetRawInputData ( HRAWINPUT  hRawInput,
UINT  uiCommand,
LPVOID  pData,
PUINT  pcbSize,
UINT  cbSizeHeader 
)

Definition at line 392 of file ntstubs.c.

398{
399 STUB;
400 return 0;
401}

◆ NtUserGetRegisteredRawInputDevices()

DWORD APIENTRY NtUserGetRegisteredRawInputDevices ( PRAWINPUTDEVICE  pRawInputDevices,
PUINT  puiNumDevices,
UINT  cbSize 
)

Definition at line 405 of file ntstubs.c.

409{
410 STUB;
411 return 0;
412}

◆ NtUserGetUpdatedClipboardFormats()

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

Definition at line 906 of file ntstubs.c.

911{
912 STUB;
913 return FALSE;
914}

◆ NtUserHardErrorControl()

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

Definition at line 416 of file ntstubs.c.

420{
421 STUB;
422 return 0;
423}

◆ 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 876 of file ntstubs.c.

877{
878 STUB;
879 return FALSE;
880}

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 427 of file ntstubs.c.

432{
433 // STUB;
434 TRACE("NtUserNotifyProcessCreate is UNIMPLEMENTED\n");
435 return FALSE;
436}

Referenced by CSR_SERVER_DLL_INIT().

◆ NtUserProcessConnect()

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

Definition at line 440 of file ntstubs.c.

444{
447 PPROCESSINFO W32Process;
448
449 TRACE("NtUserProcessConnect\n");
450
451 if (pUserConnect == NULL ||
452 Size != sizeof(*pUserConnect))
453 {
454 return STATUS_UNSUCCESSFUL;
455 }
456
457 /* Get the process object the user handle was referencing */
461 UserMode,
462 (PVOID*)&Process,
463 NULL);
464 if (!NT_SUCCESS(Status)) return Status;
465
467
468 /* Get Win32 process information */
469 W32Process = PsGetProcessWin32Process(Process);
470
472 {
473 UINT i;
474
475 // FIXME: Check that pUserConnect->ulVersion == USER_VERSION;
476 // FIXME: Check the value of pUserConnect->dwDispatchCount.
477
478 ProbeForWrite(pUserConnect, sizeof(*pUserConnect), sizeof(PVOID));
479
480 // FIXME: Instead of assuming that the mapping of the heap desktop
481 // also holds there, we **MUST** create and map instead the shared
482 // section! Its client base must be stored in W32Process->pClientBase.
483 // What is currently done (ReactOS-specific only), is that within the
484 // IntUserHeapCommitRoutine()/MapGlobalUserHeap() routines we assume
485 // it's going to be also called early, so that we manually add a very
486 // first memory mapping that corresponds to the "global user heap",
487 // and that we use instead of a actual win32 "shared USER section"
488 // (see slide 29 of https://paper.bobylive.com/Meeting_Papers/BlackHat/USA-2011/BH_US_11_Mandt_win32k_Slides.pdf )
489
490 pUserConnect->siClient.ulSharedDelta =
493
494#define SERVER_TO_CLIENT(ptr) \
495 ((PVOID)((ULONG_PTR)ptr - pUserConnect->siClient.ulSharedDelta))
496
497 ASSERT(gpsi);
499
500 pUserConnect->siClient.psi = SERVER_TO_CLIENT(gpsi);
501 pUserConnect->siClient.aheList = SERVER_TO_CLIENT(gHandleTable);
502 pUserConnect->siClient.pDispInfo = NULL;
503
504 // NOTE: kernel server should also have a SHAREDINFO gSharedInfo;
505 // FIXME: These USER window-proc data should be used somehow!
506
507 pUserConnect->siClient.DefWindowMsgs.maxMsgs = 0;
508 pUserConnect->siClient.DefWindowMsgs.abMsgs = NULL;
509 pUserConnect->siClient.DefWindowSpecMsgs.maxMsgs = 0;
510 pUserConnect->siClient.DefWindowSpecMsgs.abMsgs = NULL;
511
512 for (i = 0; i < ARRAYSIZE(pUserConnect->siClient.awmControl); ++i)
513 {
514 pUserConnect->siClient.awmControl[i].maxMsgs = 0;
515 pUserConnect->siClient.awmControl[i].abMsgs = NULL;
516 }
517#undef SERVER_TO_CLIENT
518 }
520 {
522 }
523 _SEH2_END;
524
525 if (!NT_SUCCESS(Status))
527
528 UserLeave();
529
530 /* Dereference the process object */
532
533 return Status;
534}
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#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:1223
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:292
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 538 of file ntstubs.c.

542{
545
546 /* Allow only CSRSS to perform this operation */
549
551
552 /* Get the Thread */
553 Status = ObReferenceObjectByHandle(ThreadHandle,
556 UserMode,
557 (PVOID)&Thread,
558 NULL);
559 if (!NT_SUCCESS(Status)) goto Quit;
560
562 {
563 default:
564 {
565 STUB;
567 break;
568 }
569 }
570
572
573Quit:
574 UserLeave();
575 return Status;
576}
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:863
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 883 of file ntstubs.c.

884{
885 STUB;
886
887 return 0;
888}

◆ 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 580 of file ntstubs.c.

587{
588 STUB;
589 return 0;
590}

Referenced by ResetMessagePumpHook().

◆ NtUserRealWaitMessageEx()

BOOL APIENTRY NtUserRealWaitMessageEx ( DWORD  dwWakeMask,
UINT  uTimeout 
)

Definition at line 594 of file ntstubs.c.

597{
598 STUB;
599 return 0;
600}

Referenced by ResetMessagePumpHook().

◆ NtUserRegisterRawInputDevices()

BOOL APIENTRY NtUserRegisterRawInputDevices ( IN PCRAWINPUTDEVICE  pRawInputDevices,
IN UINT  uiNumDevices,
IN UINT  cbSize 
)

Definition at line 604 of file ntstubs.c.

608{
609 STUB;
610 return 0;
611}

◆ 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 824 of file ntstubs.c.

828{
829 STUB;
830 return 0;
831}

◆ NtUserRemoteRedrawRectangle()

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

Definition at line 835 of file ntstubs.c.

840{
841 STUB;
842 return 0;
843}

◆ NtUserRemoteRedrawScreen()

DWORD APIENTRY NtUserRemoteRedrawScreen ( VOID  )

Definition at line 847 of file ntstubs.c.

848{
849 STUB;
850 return 0;
851}

◆ NtUserRemoteStopScreenUpdates()

DWORD APIENTRY NtUserRemoteStopScreenUpdates ( VOID  )

Definition at line 855 of file ntstubs.c.

856{
857 STUB;
858 return 0;
859}

◆ NtUserRemoveClipboardFormatListener()

BOOL APIENTRY NtUserRemoveClipboardFormatListener ( HWND  hwnd)

Definition at line 898 of file ntstubs.c.

901{
902 STUB;
903 return FALSE;
904}

◆ NtUserResolveDesktopForWOW()

DWORD APIENTRY NtUserResolveDesktopForWOW ( DWORD  Unknown0)

Definition at line 614 of file ntstubs.c.

615{
616 STUB
617 return 0;
618}

◆ 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 622 of file ntstubs.c.

627{
628 STUB;
629 return 0;
630}

◆ NtUserSetInformationThread()

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

Definition at line 637 of file ntstubs.c.

641{
644
645 /* Allow only CSRSS to perform this operation */
648
650
651 /* Get the Thread */
652 Status = ObReferenceObjectByHandle(ThreadHandle,
655 UserMode,
656 (PVOID)&Thread,
657 NULL);
658 if (!NT_SUCCESS(Status)) goto Quit;
659
661 {
663 {
664 ULONG CapturedFlags = 0;
665
666 TRACE("Shutdown initiated\n");
667
668 if (ThreadInformationLength != sizeof(CapturedFlags))
669 {
671 break;
672 }
673
674 /* Capture the caller value */
677 {
678 ProbeForWrite(ThreadInformation, sizeof(CapturedFlags), __alignof(CapturedFlags));
679 CapturedFlags = *(PULONG)ThreadInformation;
680 }
682 {
684 _SEH2_YIELD(break);
685 }
686 _SEH2_END;
687
688 Status = UserInitiateShutdown(Thread, &CapturedFlags);
689
690 /* Return the modified value to the caller */
692 {
693 *(PULONG)ThreadInformation = CapturedFlags;
694 }
696 {
698 }
699 _SEH2_END;
700
701 break;
702 }
703
705 {
706 NTSTATUS ShutdownStatus;
707
708 TRACE("Shutdown ended\n");
709
710 if (ThreadInformationLength != sizeof(ShutdownStatus))
711 {
713 break;
714 }
715
716 /* Capture the caller value */
719 {
720 ProbeForRead(ThreadInformation, sizeof(ShutdownStatus), __alignof(ShutdownStatus));
721 ShutdownStatus = *(NTSTATUS*)ThreadInformation;
722 }
724 {
726 _SEH2_YIELD(break);
727 }
728 _SEH2_END;
729
730 Status = UserEndShutdown(Thread, ShutdownStatus);
731 break;
732 }
733
735 {
736 HANDLE CsrPortHandle;
737
738
739 TRACE("Set CSR API Port for Win32k\n");
740 if (ThreadInformationLength != sizeof(CsrPortHandle))
741 {
743 break;
744 }
745
746 /* Capture the caller value */
749 {
750 ProbeForRead(ThreadInformation, sizeof(CsrPortHandle), __alignof(CsrPortHandle));
751 CsrPortHandle = *(PHANDLE)ThreadInformation;
752 }
754 {
756 _SEH2_YIELD(break);
757 }
758 _SEH2_END;
759
760 Status = InitCsrApiPort(CsrPortHandle);
761 break;
762 }
763
765 {
766 HDESK hdesk;
767
768 if (Thread != PsGetCurrentThread())
769 {
771 break;
772 }
773
776
777 break;
778 }
780 {
781 if (Thread != PsGetCurrentThread())
782 {
784 break;
785 }
786
788 break;
789 }
790 default:
791 {
792 STUB;
794 break;
795 }
796 }
797
799
800Quit:
801 UserLeave();
802 return Status;
803}
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:866
#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
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:2090
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
DWORD COLORREF
Definition: windef.h:100
#define ERROR_NOACCESS
Definition: winerror.h:902
#define HWND_BROADCAST
Definition: winuser.h:1215
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1654

Referenced by SetSysColors().

◆ NtUserSoundSentry()

BOOL APIENTRY NtUserSoundSentry ( VOID  )

Definition at line 807 of file ntstubs.c.

808{
809 STUB;
810 return 0;
811}

◆ NtUserTestForInteractiveUser()

DWORD APIENTRY NtUserTestForInteractiveUser ( DWORD  dwUnknown1)

Definition at line 815 of file ntstubs.c.

817{
818 STUB;
819 return 0;
820}

◆ 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}