Fix gdi32:SetSysColors apitest
[reactos.git] / reactos / subsystems / win32 / win32k / ntuser / ntstubs.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: Native User stubs
5 * FILE: subsys/win32k/ntuser/stubs.c
6 * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISION HISTORY:
8 * 04-06-2001 CSH Created
9 */
10 #include <win32k.h>
11
12 #define NDEBUG
13 #include <debug.h>
14
15 DWORD
16 APIENTRY
17 NtUserAssociateInputContext(
18 DWORD dwUnknown1,
19 DWORD dwUnknown2,
20 DWORD dwUnknown3)
21 {
22 UNIMPLEMENTED
23 return 0;
24 }
25
26
27 BOOL
28 APIENTRY
29 NtUserAttachThreadInput(
30 IN DWORD idAttach,
31 IN DWORD idAttachTo,
32 IN BOOL fAttach)
33 {
34 NTSTATUS Status;
35 PETHREAD Thread, ThreadTo;
36 PTHREADINFO pti, ptiTo;
37 BOOL Ret = FALSE;
38
39 UserEnterExclusive();
40 Status = PsLookupThreadByThreadId((HANDLE)idAttach, &Thread);
41 if (!NT_SUCCESS(Status))
42 {
43 EngSetLastError(ERROR_INVALID_PARAMETER);
44 goto Exit;
45 }
46 Status = PsLookupThreadByThreadId((HANDLE)idAttachTo, &ThreadTo);
47 if (!NT_SUCCESS(Status))
48 {
49 EngSetLastError(ERROR_INVALID_PARAMETER);
50 ObDereferenceObject(Thread);
51 goto Exit;
52 }
53
54 pti = PsGetThreadWin32Thread(Thread);
55 ptiTo = PsGetThreadWin32Thread(ThreadTo);
56 ObDereferenceObject(Thread);
57 ObDereferenceObject(ThreadTo);
58
59 Ret = UserAttachThreadInput( pti, ptiTo, fAttach);
60
61 Exit:
62 UserLeave();
63 return Ret;
64 }
65
66 //
67 // Works like BitBlt, http://msdn.microsoft.com/en-us/library/ms532278(VS.85).aspx
68 //
69 BOOL
70 APIENTRY
71 NtUserBitBltSysBmp(
72 HDC hdc,
73 INT nXDest,
74 INT nYDest,
75 INT nWidth,
76 INT nHeight,
77 INT nXSrc,
78 INT nYSrc,
79 DWORD dwRop )
80 {
81 BOOL Ret = FALSE;
82 UserEnterExclusive();
83
84 Ret = NtGdiBitBlt( hdc,
85 nXDest,
86 nYDest,
87 nWidth,
88 nHeight,
89 hSystemBM,
90 nXSrc,
91 nYSrc,
92 dwRop,
93 0,
94 0);
95
96 UserLeave();
97 return Ret;
98 }
99
100 DWORD
101 APIENTRY
102 NtUserBuildHimcList(
103 DWORD dwUnknown1,
104 DWORD dwUnknown2,
105 DWORD dwUnknown3,
106 DWORD dwUnknown4)
107 {
108 UNIMPLEMENTED;
109 return 0;
110 }
111
112 DWORD
113 APIENTRY
114 NtUserConvertMemHandle(
115 DWORD Unknown0,
116 DWORD Unknown1)
117 {
118 UNIMPLEMENTED
119
120 return 0;
121 }
122
123 DWORD
124 APIENTRY
125 NtUserCreateLocalMemHandle(
126 DWORD Unknown0,
127 DWORD Unknown1,
128 DWORD Unknown2,
129 DWORD Unknown3)
130 {
131 UNIMPLEMENTED
132
133 return 0;
134 }
135
136 BOOL
137 APIENTRY
138 NtUserDdeGetQualityOfService(
139 IN HWND hwndClient,
140 IN HWND hWndServer,
141 OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
142 {
143 UNIMPLEMENTED
144
145 return 0;
146 }
147
148 DWORD
149 APIENTRY
150 NtUserDdeInitialize(
151 DWORD Unknown0,
152 DWORD Unknown1,
153 DWORD Unknown2,
154 DWORD Unknown3,
155 DWORD Unknown4)
156 {
157 UNIMPLEMENTED
158
159 return 0;
160 }
161
162 BOOL
163 APIENTRY
164 NtUserDdeSetQualityOfService(
165 IN HWND hwndClient,
166 IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
167 OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
168 {
169 UNIMPLEMENTED
170
171 return 0;
172 }
173
174 DWORD
175 APIENTRY
176 NtUserDragObject(
177 HWND hwnd1,
178 HWND hwnd2,
179 UINT u1,
180 DWORD dw1,
181 HCURSOR hc1
182 )
183 {
184 UNIMPLEMENTED
185
186 return 0;
187 }
188
189 BOOL
190 APIENTRY
191 NtUserDrawAnimatedRects(
192 HWND hwnd,
193 INT idAni,
194 RECT *lprcFrom,
195 RECT *lprcTo)
196 {
197 UNIMPLEMENTED
198
199 return 0;
200 }
201
202 DWORD
203 APIENTRY
204 NtUserEvent(
205 DWORD Unknown0)
206 {
207 UNIMPLEMENTED
208
209 return 0;
210 }
211
212 DWORD
213 APIENTRY
214 NtUserExcludeUpdateRgn(
215 HDC hDC,
216 HWND hWnd)
217 {
218 UNIMPLEMENTED
219
220 return 0;
221 }
222
223 BOOL
224 APIENTRY
225 NtUserGetAltTabInfo(
226 HWND hwnd,
227 INT iItem,
228 PALTTABINFO pati,
229 LPWSTR pszItemText,
230 UINT cchItemText,
231 BOOL Ansi)
232 {
233 UNIMPLEMENTED
234
235 return 0;
236 }
237
238 HBRUSH
239 APIENTRY
240 NtUserGetControlBrush(
241 HWND hwnd,
242 HDC hdc,
243 UINT ctlType)
244 {
245 UNIMPLEMENTED
246
247 return 0;
248 }
249
250
251 /*
252 * Called from PaintRect, works almost like wine PaintRect16 but returns hBrush.
253 */
254 HBRUSH
255 APIENTRY
256 NtUserGetControlColor(
257 HWND hwndParent,
258 HWND hwnd,
259 HDC hdc,
260 UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush
261 {
262 UNIMPLEMENTED
263
264 return 0;
265 }
266
267 DWORD
268 APIENTRY
269 NtUserGetImeHotKey(
270 DWORD Unknown0,
271 DWORD Unknown1,
272 DWORD Unknown2,
273 DWORD Unknown3)
274 {
275 UNIMPLEMENTED
276
277 return 0;
278 }
279
280
281 DWORD
282 APIENTRY
283 NtUserGetMouseMovePointsEx(
284 UINT cbSize,
285 LPMOUSEMOVEPOINT lppt,
286 LPMOUSEMOVEPOINT lpptBuf,
287 int nBufPoints,
288 DWORD resolution)
289 {
290 UserEnterExclusive();
291
292 if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
293 {
294 UserLeave();
295 EngSetLastError(ERROR_INVALID_PARAMETER);
296 return -1;
297 }
298
299 _SEH2_TRY
300 {
301 ProbeForRead(lppt, cbSize, 1);
302 ProbeForWrite(lpptBuf, cbSize, 1);
303 }
304 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
305 {
306 SetLastNtError(_SEH2_GetExceptionCode());
307 EngSetLastError(ERROR_NOACCESS);
308 }
309 _SEH2_END;
310
311 /*
312 Call a subfunction of GetMouseMovePointsEx!
313 switch(resolution)
314 {
315 case GMMP_USE_DISPLAY_POINTS:
316 case GMMP_USE_HIGH_RESOLUTION_POINTS:
317 break;
318 default:
319 EngSetLastError(GMMP_ERR_POINT_NOT_FOUND);
320 return GMMP_ERR_POINT_NOT_FOUND;
321 }
322 */
323 UNIMPLEMENTED
324 UserLeave();
325 return -1;
326 }
327
328
329
330 BOOL
331 APIENTRY
332 NtUserImpersonateDdeClientWindow(
333 HWND hWndClient,
334 HWND hWndServer)
335 {
336 UNIMPLEMENTED
337
338 return 0;
339 }
340
341 NTSTATUS
342 APIENTRY
343 NtUserInitializeClientPfnArrays(
344 PPFNCLIENT pfnClientA,
345 PPFNCLIENT pfnClientW,
346 PPFNCLIENTWORKER pfnClientWorker,
347 HINSTANCE hmodUser)
348 {
349 NTSTATUS Status = STATUS_SUCCESS;
350 DPRINT("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser);
351
352 if (ClientPfnInit) return Status;
353
354 UserEnterExclusive();
355
356 _SEH2_TRY
357 {
358 ProbeForRead( pfnClientA, sizeof(PFNCLIENT), 1);
359 ProbeForRead( pfnClientW, sizeof(PFNCLIENT), 1);
360 ProbeForRead( pfnClientWorker, sizeof(PFNCLIENTWORKER), 1);
361 RtlCopyMemory(&gpsi->apfnClientA, pfnClientA, sizeof(PFNCLIENT));
362 RtlCopyMemory(&gpsi->apfnClientW, pfnClientW, sizeof(PFNCLIENT));
363 RtlCopyMemory(&gpsi->apfnClientWorker, pfnClientWorker, sizeof(PFNCLIENTWORKER));
364
365 //// FIXME! HAX! Temporary until server side is finished.
366 //// Copy the client side procs for now.
367 RtlCopyMemory(&gpsi->aStoCidPfn, pfnClientW, sizeof(gpsi->aStoCidPfn));
368
369 hModClient = hmodUser;
370 ClientPfnInit = TRUE;
371 }
372 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
373 {
374 Status =_SEH2_GetExceptionCode();
375 }
376 _SEH2_END
377
378 if (!NT_SUCCESS(Status))
379 {
380 DPRINT1("Failed reading Client Pfns from user space.\n");
381 SetLastNtError(Status);
382 }
383
384 UserLeave();
385 return Status;
386 }
387
388 DWORD
389 APIENTRY
390 NtUserInitTask(
391 DWORD Unknown0,
392 DWORD Unknown1,
393 DWORD Unknown2,
394 DWORD Unknown3,
395 DWORD Unknown4,
396 DWORD Unknown5,
397 DWORD Unknown6,
398 DWORD Unknown7,
399 DWORD Unknown8,
400 DWORD Unknown9,
401 DWORD Unknown10,
402 DWORD Unknown11)
403 {
404 UNIMPLEMENTED
405
406 return 0;
407 }
408
409 BOOL
410 APIENTRY
411 NtUserLockWorkStation(VOID)
412 {
413 UNIMPLEMENTED
414
415 return 0;
416 }
417
418 DWORD
419 APIENTRY
420 NtUserMNDragLeave(VOID)
421 {
422 UNIMPLEMENTED
423
424 return 0;
425 }
426
427 DWORD
428 APIENTRY
429 NtUserMNDragOver(
430 DWORD Unknown0,
431 DWORD Unknown1)
432 {
433 UNIMPLEMENTED
434
435 return 0;
436 }
437
438 DWORD
439 APIENTRY
440 NtUserModifyUserStartupInfoFlags(
441 DWORD Unknown0,
442 DWORD Unknown1)
443 {
444 UNIMPLEMENTED
445
446 return 0;
447 }
448
449 DWORD
450 APIENTRY
451 NtUserNotifyIMEStatus(
452 DWORD Unknown0,
453 DWORD Unknown1,
454 DWORD Unknown2)
455 {
456 UNIMPLEMENTED
457
458 return 0;
459 }
460
461 DWORD
462 APIENTRY
463 NtUserQueryUserCounters(
464 DWORD Unknown0,
465 DWORD Unknown1,
466 DWORD Unknown2,
467 DWORD Unknown3,
468 DWORD Unknown4)
469 {
470 UNIMPLEMENTED
471
472 return 0;
473 }
474
475 DWORD
476 APIENTRY
477 NtUserRegisterTasklist(
478 DWORD Unknown0)
479 {
480 UNIMPLEMENTED
481
482 return 0;
483 }
484
485 DWORD
486 APIENTRY
487 NtUserSetConsoleReserveKeys(
488 DWORD Unknown0,
489 DWORD Unknown1)
490 {
491 UNIMPLEMENTED
492
493 return 0;
494 }
495
496 DWORD
497 APIENTRY
498 NtUserSetDbgTag(
499 DWORD Unknown0,
500 DWORD Unknown1)
501 {
502 UNIMPLEMENTED
503
504 return 0;
505 }
506
507 DWORD
508 APIENTRY
509 NtUserSetImeHotKey(
510 DWORD Unknown0,
511 DWORD Unknown1,
512 DWORD Unknown2,
513 DWORD Unknown3,
514 DWORD Unknown4)
515 {
516 UNIMPLEMENTED
517
518 return 0;
519 }
520
521
522 DWORD
523 APIENTRY
524 NtUserSetRipFlags(
525 DWORD Unknown0,
526 DWORD Unknown1)
527 {
528 UNIMPLEMENTED
529
530 return 0;
531 }
532
533 BOOL
534 APIENTRY
535 NtUserSetSysColors(
536 int cElements,
537 IN CONST INT *lpaElements,
538 IN CONST COLORREF *lpaRgbValues,
539 FLONG Flags)
540 {
541 DWORD Ret = TRUE;
542 NTSTATUS Status = STATUS_SUCCESS;
543
544 if (cElements == 0)
545 return TRUE;
546
547 UserEnterExclusive();
548 _SEH2_TRY
549 {
550 ProbeForRead(lpaElements,
551 sizeof(INT),
552 1);
553 ProbeForRead(lpaRgbValues,
554 sizeof(COLORREF),
555 1);
556 // Developers: We are thread locked and calling gdi.
557 IntSetSysColors(cElements, lpaElements, lpaRgbValues);
558 }
559 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
560 {
561 Status = _SEH2_GetExceptionCode();
562 }
563 _SEH2_END;
564 if (!NT_SUCCESS(Status))
565 {
566 SetLastNtError(Status);
567 Ret = FALSE;
568 }
569 if (Ret)
570 {
571 UserSendNotifyMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0);
572 }
573 UserLeave();
574 return Ret;
575 }
576
577 DWORD
578 APIENTRY
579 NtUserSetThreadState(
580 DWORD Unknown0,
581 DWORD Unknown1)
582 {
583 UNIMPLEMENTED
584
585 return 0;
586 }
587
588 BOOL
589 APIENTRY
590 NtUserTrackMouseEvent(
591 LPTRACKMOUSEEVENT lpEventTrack)
592 {
593 UNIMPLEMENTED
594
595 return 0;
596 }
597
598
599 DWORD
600 APIENTRY
601 NtUserUpdateInputContext(
602 DWORD Unknown0,
603 DWORD Unknown1,
604 DWORD Unknown2)
605 {
606 UNIMPLEMENTED
607
608 return 0;
609 }
610
611 DWORD
612 APIENTRY
613 NtUserUpdateInstance(
614 DWORD Unknown0,
615 DWORD Unknown1,
616 DWORD Unknown2)
617 {
618 UNIMPLEMENTED
619
620 return 0;
621 }
622
623 BOOL
624 APIENTRY
625 NtUserUserHandleGrantAccess(
626 IN HANDLE hUserHandle,
627 IN HANDLE hJob,
628 IN BOOL bGrant)
629 {
630 UNIMPLEMENTED
631
632 return 0;
633 }
634
635 DWORD
636 APIENTRY
637 NtUserWaitForMsgAndEvent(
638 DWORD Unknown0)
639 {
640 UNIMPLEMENTED
641
642 return 0;
643 }
644
645 DWORD
646 APIENTRY
647 NtUserWin32PoolAllocationStats(
648 DWORD Unknown0,
649 DWORD Unknown1,
650 DWORD Unknown2,
651 DWORD Unknown3,
652 DWORD Unknown4,
653 DWORD Unknown5)
654 {
655 UNIMPLEMENTED
656
657 return 0;
658 }
659
660 DWORD
661 APIENTRY
662 NtUserYieldTask(VOID)
663 {
664 UNIMPLEMENTED
665
666 return 0;
667 }
668
669
670 DWORD
671 APIENTRY
672 NtUserCheckImeHotKey(
673 DWORD dwUnknown1,
674 DWORD dwUnknown2)
675 {
676 UNIMPLEMENTED;
677 return 0;
678 }
679
680 DWORD
681 APIENTRY
682 NtUserConsoleControl(
683 DWORD dwUnknown1,
684 DWORD dwUnknown2,
685 DWORD dwUnknown3)
686 {
687 UNIMPLEMENTED;
688 return 0;
689 }
690
691 DWORD
692 APIENTRY
693 NtUserCreateInputContext(
694 DWORD dwUnknown1)
695 {
696 UNIMPLEMENTED;
697 return 0;
698 }
699
700 DWORD
701 APIENTRY
702 NtUserDestroyInputContext(
703 DWORD dwUnknown1)
704 {
705 UNIMPLEMENTED;
706 return 0;
707 }
708
709 DWORD
710 APIENTRY
711 NtUserDisableThreadIme(
712 DWORD dwUnknown1)
713 {
714 UNIMPLEMENTED;
715 return 0;
716 }
717
718 DWORD
719 APIENTRY
720 NtUserGetAppImeLevel(
721 DWORD dwUnknown1)
722 {
723 UNIMPLEMENTED;
724 return 0;
725 }
726
727 DWORD
728 APIENTRY
729 NtUserGetAtomName(
730 ATOM nAtom,
731 LPWSTR lpBuffer)
732 {
733 UNIMPLEMENTED;
734 return 0;
735 }
736
737 DWORD
738 APIENTRY
739 NtUserGetImeInfoEx(
740 DWORD dwUnknown1,
741 DWORD dwUnknown2)
742 {
743 UNIMPLEMENTED;
744 return 0;
745 }
746
747 DWORD
748 APIENTRY
749 NtUserGetRawInputBuffer(
750 PRAWINPUT pData,
751 PUINT pcbSize,
752 UINT cbSizeHeader)
753 {
754 UNIMPLEMENTED;
755 return 0;
756 }
757
758 DWORD
759 APIENTRY
760 NtUserGetRawInputData(
761 HRAWINPUT hRawInput,
762 UINT uiCommand,
763 LPVOID pData,
764 PUINT pcbSize,
765 UINT cbSizeHeader)
766 {
767 UNIMPLEMENTED;
768 return 0;
769 }
770
771 DWORD
772 APIENTRY
773 NtUserGetRawInputDeviceInfo(
774 HANDLE hDevice,
775 UINT uiCommand,
776 LPVOID pData,
777 PUINT pcbSize
778 )
779 {
780 UNIMPLEMENTED;
781 return 0;
782 }
783
784 DWORD
785 APIENTRY
786 NtUserGetRawInputDeviceList(
787 PRAWINPUTDEVICELIST pRawInputDeviceList,
788 PUINT puiNumDevices,
789 UINT cbSize)
790 {
791 UNIMPLEMENTED;
792 return 0;
793 }
794
795 DWORD
796 APIENTRY
797 NtUserGetRegisteredRawInputDevices(
798 PRAWINPUTDEVICE pRawInputDevices,
799 PUINT puiNumDevices,
800 UINT cbSize)
801 {
802 UNIMPLEMENTED;
803 return 0;
804 }
805
806 DWORD
807 APIENTRY
808 NtUserHardErrorControl(
809 DWORD dwUnknown1,
810 DWORD dwUnknown2,
811 DWORD dwUnknown3)
812 {
813 UNIMPLEMENTED;
814 return 0;
815 }
816
817 DWORD
818 APIENTRY
819 NtUserMinMaximize(
820 HWND hWnd,
821 UINT cmd, // Wine SW_ commands
822 BOOL Hide)
823 {
824 RECTL NewPos;
825 UINT SwFlags;
826 PWND pWnd;
827
828 DPRINT("Enter NtUserMinMaximize\n");
829 UserEnterExclusive();
830
831 pWnd = UserGetWindowObject(hWnd);
832 if ( !pWnd || // FIXME:
833 pWnd == IntGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
834 pWnd == IntGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
835 {
836 goto Exit;
837 }
838
839 if ( cmd > SW_MAX || pWnd->state2 & WNDS2_INDESTROY)
840 {
841 EngSetLastError(ERROR_INVALID_PARAMETER);
842 goto Exit;
843 }
844
845 co_WinPosMinMaximize(pWnd, cmd, &NewPos);
846
847 SwFlags = Hide ? SWP_NOACTIVATE|SWP_NOZORDER|SWP_FRAMECHANGED : SWP_NOZORDER|SWP_FRAMECHANGED;
848
849 co_WinPosSetWindowPos( pWnd,
850 NULL,
851 NewPos.left,
852 NewPos.top,
853 NewPos.right,
854 NewPos.bottom,
855 SwFlags);
856
857 co_WinPosShowWindow(pWnd, cmd);
858
859 Exit:
860 DPRINT("Leave NtUserMinMaximize\n");
861 UserLeave();
862 return 0; // Always NULL?
863 }
864
865 DWORD
866 APIENTRY
867 NtUserNotifyProcessCreate(
868 DWORD dwUnknown1,
869 DWORD dwUnknown2,
870 DWORD dwUnknown3,
871 DWORD dwUnknown4)
872 {
873 UNIMPLEMENTED;
874 return 0;
875 }
876
877 NTSTATUS
878 APIENTRY
879 NtUserProcessConnect(
880 HANDLE Process,
881 PUSERCONNECT pUserConnect,
882 DWORD Size)
883 {
884 NTSTATUS Status = STATUS_SUCCESS;
885 DPRINT("NtUserProcessConnect\n");
886 if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
887 {
888 PPROCESSINFO W32Process;
889 UserEnterShared();
890 GetW32ThreadInfo();
891 W32Process = PsGetCurrentProcessWin32Process();
892 _SEH2_TRY
893 {
894 pUserConnect->siClient.psi = gpsi;
895 pUserConnect->siClient.aheList = gHandleTable;
896 pUserConnect->siClient.ulSharedDelta = (ULONG_PTR)W32Process->HeapMappings.KernelMapping -
897 (ULONG_PTR)W32Process->HeapMappings.UserMapping;
898 }
899 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
900 {
901 Status = _SEH2_GetExceptionCode();
902 }
903 _SEH2_END
904 if (!NT_SUCCESS(Status))
905 {
906 SetLastNtError(Status);
907 }
908 UserLeave();
909 return Status;
910 }
911 return STATUS_UNSUCCESSFUL;
912 }
913
914 DWORD
915 APIENTRY
916 NtUserQueryInformationThread(
917 DWORD dwUnknown1,
918 DWORD dwUnknown2,
919 DWORD dwUnknown3,
920 DWORD dwUnknown4,
921 DWORD dwUnknown5)
922 {
923 UNIMPLEMENTED;
924 return 0;
925 }
926
927 DWORD
928 APIENTRY
929 NtUserQueryInputContext(
930 DWORD dwUnknown1,
931 DWORD dwUnknown2)
932 {
933 UNIMPLEMENTED;
934 return 0;
935 }
936
937 DWORD
938 APIENTRY
939 NtUserRealInternalGetMessage(
940 DWORD dwUnknown1,
941 DWORD dwUnknown2,
942 DWORD dwUnknown3,
943 DWORD dwUnknown4,
944 DWORD dwUnknown5,
945 DWORD dwUnknown6)
946 {
947 UNIMPLEMENTED;
948 return 0;
949 }
950
951 DWORD
952 APIENTRY
953 NtUserRealWaitMessageEx(
954 DWORD dwUnknown1,
955 DWORD dwUnknown2)
956 {
957 UNIMPLEMENTED;
958 return 0;
959 }
960
961 BOOL
962 APIENTRY
963 NtUserRegisterUserApiHook(
964 PUNICODE_STRING m_dllname1,
965 PUNICODE_STRING m_funname1,
966 DWORD dwUnknown3,
967 DWORD dwUnknown4)
968 {
969 UserEnterExclusive();
970 UNIMPLEMENTED;
971 UserLeave();
972 return 0;
973 }
974
975 BOOL
976 APIENTRY
977 NtUserRegisterRawInputDevices(
978 IN PCRAWINPUTDEVICE pRawInputDevices,
979 IN UINT uiNumDevices,
980 IN UINT cbSize)
981 {
982 UNIMPLEMENTED;
983 return 0;
984 }
985
986 DWORD
987 APIENTRY
988 NtUserResolveDesktop(
989 DWORD dwUnknown1,
990 DWORD dwUnknown2,
991 DWORD dwUnknown3,
992 DWORD dwUnknown4)
993 {
994 UNIMPLEMENTED;
995 return 0;
996 }
997
998 DWORD
999 APIENTRY
1000 NtUserSetAppImeLevel(
1001 DWORD dwUnknown1,
1002 DWORD dwUnknown2)
1003 {
1004 UNIMPLEMENTED;
1005 return 0;
1006 }
1007
1008 DWORD
1009 APIENTRY
1010 NtUserSetImeInfoEx(
1011 DWORD dwUnknown1)
1012 {
1013 UNIMPLEMENTED;
1014 return 0;
1015 }
1016
1017 DWORD
1018 APIENTRY
1019 NtUserSetInformationProcess(
1020 DWORD dwUnknown1,
1021 DWORD dwUnknown2,
1022 DWORD dwUnknown3,
1023 DWORD dwUnknown4)
1024 {
1025 UNIMPLEMENTED;
1026 return 0;
1027 }
1028
1029 NTSTATUS
1030 APIENTRY
1031 NtUserSetInformationThread(IN HANDLE ThreadHandle,
1032 IN USERTHREADINFOCLASS ThreadInformationClass,
1033 IN PVOID ThreadInformation,
1034 IN ULONG ThreadInformationLength)
1035
1036 {
1037 if (ThreadInformationClass == UserThreadInitiateShutdown)
1038 {
1039 DPRINT1("Shutdown initiated\n");
1040 }
1041 else if (ThreadInformationClass == UserThreadEndShutdown)
1042 {
1043 DPRINT1("Shutdown ended\n");
1044 }
1045 else
1046 {
1047 UNIMPLEMENTED;
1048 }
1049
1050 return STATUS_SUCCESS;
1051 }
1052
1053 DWORD
1054 APIENTRY
1055 NtUserSetThreadLayoutHandles(
1056 DWORD dwUnknown1,
1057 DWORD dwUnknown2)
1058 {
1059 UNIMPLEMENTED;
1060 return 0;
1061 }
1062
1063 BOOL
1064 APIENTRY
1065 NtUserSoundSentry(VOID)
1066 {
1067 UNIMPLEMENTED;
1068 return 0;
1069 }
1070
1071 DWORD
1072 APIENTRY
1073 NtUserTestForInteractiveUser(
1074 DWORD dwUnknown1)
1075 {
1076 UNIMPLEMENTED;
1077 return 0;
1078 }
1079
1080 /* http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634ccb2c30630da7e3666d3d07/b47155634ccb2c30630da7e3666d3d07.trace.html#NtUserGetIconSize */
1081 DWORD
1082 APIENTRY
1083 NtUserCalcMenuBar(
1084 DWORD dwUnknown1,
1085 DWORD dwUnknown2,
1086 DWORD dwUnknown3,
1087 DWORD dwUnknown4,
1088 DWORD dwUnknown5)
1089 {
1090 UNIMPLEMENTED;
1091 return 0;
1092 }
1093
1094 DWORD
1095 APIENTRY
1096 NtUserPaintMenuBar(
1097 DWORD dwUnknown1,
1098 DWORD dwUnknown2,
1099 DWORD dwUnknown3,
1100 DWORD dwUnknown4,
1101 DWORD dwUnknown5,
1102 DWORD dwUnknown6)
1103 {
1104 UNIMPLEMENTED;
1105 return 0;
1106 }
1107
1108 BOOL
1109 APIENTRY
1110 NtUserUnregisterUserApiHook(VOID)
1111 {
1112 UNIMPLEMENTED;
1113 return 0;
1114 }
1115
1116 BOOL
1117 APIENTRY
1118 NtUserGetLayeredWindowAttributes(
1119 HWND hwnd,
1120 COLORREF *pcrKey,
1121 BYTE *pbAlpha,
1122 DWORD *pdwFlags)
1123 {
1124 UNIMPLEMENTED;
1125 return 0;
1126 }
1127
1128 BOOL
1129 APIENTRY
1130 NtUserValidateTimerCallback(
1131 HWND hWnd,
1132 WPARAM wParam,
1133 LPARAM lParam)
1134 {
1135 BOOL Ret = FALSE;
1136
1137 UserEnterShared();
1138
1139 Ret = ValidateTimerCallback(PsGetCurrentThreadWin32Thread(), lParam);
1140
1141 UserLeave();
1142 return Ret;
1143 }
1144
1145 DWORD
1146 APIENTRY
1147 NtUserRemoteConnect(
1148 DWORD dwUnknown1,
1149 DWORD dwUnknown2,
1150 DWORD dwUnknown3)
1151 {
1152 UNIMPLEMENTED;
1153 return 0;
1154 }
1155
1156 DWORD
1157 APIENTRY
1158 NtUserRemoteRedrawRectangle(
1159 DWORD dwUnknown1,
1160 DWORD dwUnknown2,
1161 DWORD dwUnknown3,
1162 DWORD dwUnknown4)
1163 {
1164 UNIMPLEMENTED;
1165 return 0;
1166 }
1167
1168 DWORD
1169 APIENTRY
1170 NtUserRemoteRedrawScreen(VOID)
1171 {
1172 UNIMPLEMENTED;
1173 return 0;
1174 }
1175
1176 DWORD
1177 APIENTRY
1178 NtUserRemoteStopScreenUpdates(VOID)
1179 {
1180 UNIMPLEMENTED;
1181 return 0;
1182 }
1183
1184 DWORD
1185 APIENTRY
1186 NtUserCtxDisplayIOCtl(
1187 DWORD dwUnknown1,
1188 DWORD dwUnknown2,
1189 DWORD dwUnknown3)
1190 {
1191 UNIMPLEMENTED;
1192 return 0;
1193 }
1194
1195 /*
1196 * @unimplemented
1197 */
1198 DWORD
1199 APIENTRY
1200 NtUserDrawMenuBarTemp(
1201 HWND hWnd,
1202 HDC hDC,
1203 PRECT hRect,
1204 HMENU hMenu,
1205 HFONT hFont)
1206 {
1207 /* we'll use this function just for caching the menu bar */
1208 UNIMPLEMENTED
1209 return 0;
1210 }
1211
1212 /*
1213 * FillWindow: Called from User; Dialog, Edit and ListBox procs during a WM_ERASEBKGND.
1214 */
1215 /*
1216 * @unimplemented
1217 */
1218 BOOL APIENTRY
1219 NtUserFillWindow(HWND hWndPaint,
1220 HWND hWndPaint1,
1221 HDC hDC,
1222 HBRUSH hBrush)
1223 {
1224 UNIMPLEMENTED
1225
1226 return 0;
1227 }
1228
1229 /*
1230 * @unimplemented
1231 */
1232 BOOL APIENTRY
1233 NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
1234 {
1235 UNIMPLEMENTED
1236
1237 return 1;
1238 }
1239
1240 /*
1241 * @unimplemented
1242 */
1243 BOOL APIENTRY
1244 NtUserLockWindowUpdate(HWND hWnd)
1245 {
1246 UNIMPLEMENTED
1247
1248 return 0;
1249 }
1250
1251 /*
1252 * @unimplemented
1253 */
1254 DWORD APIENTRY
1255 NtUserRealChildWindowFromPoint(DWORD Unknown0,
1256 DWORD Unknown1,
1257 DWORD Unknown2)
1258 {
1259 UNIMPLEMENTED
1260
1261 return 0;
1262 }
1263
1264 /*
1265 * @unimplemented
1266 */
1267 DWORD APIENTRY
1268 NtUserSetImeOwnerWindow(DWORD Unknown0,
1269 DWORD Unknown1)
1270 {
1271 UNIMPLEMENTED
1272
1273 return 0;
1274 }
1275
1276 /*
1277 * @unimplemented
1278 */
1279 DWORD APIENTRY
1280 NtUserSetInternalWindowPos(
1281 HWND hwnd,
1282 UINT showCmd,
1283 LPRECT rect,
1284 LPPOINT pt)
1285 {
1286 UNIMPLEMENTED
1287
1288 return 0;
1289 }
1290
1291 /*
1292 * @unimplemented
1293 */
1294 BOOL APIENTRY
1295 NtUserSetLayeredWindowAttributes(HWND hwnd,
1296 COLORREF crKey,
1297 BYTE bAlpha,
1298 DWORD dwFlags)
1299 {
1300 UNIMPLEMENTED;
1301 return FALSE;
1302 }
1303
1304 /*
1305 * @unimplemented
1306 */
1307 BOOL
1308 APIENTRY
1309 NtUserUpdateLayeredWindow(
1310 HWND hwnd,
1311 HDC hdcDst,
1312 POINT *pptDst,
1313 SIZE *psize,
1314 HDC hdcSrc,
1315 POINT *pptSrc,
1316 COLORREF crKey,
1317 BLENDFUNCTION *pblend,
1318 DWORD dwFlags,
1319 RECT *prcDirty)
1320 {
1321 UNIMPLEMENTED
1322
1323 return 0;
1324 }
1325
1326 /*
1327 * @unimplemented
1328 */
1329 HWND APIENTRY
1330 NtUserWindowFromPhysicalPoint(POINT Point)
1331 {
1332 UNIMPLEMENTED
1333
1334 return NULL;
1335 }
1336
1337 /*
1338 * NtUserResolveDesktopForWOW
1339 *
1340 * Status
1341 * @unimplemented
1342 */
1343
1344 DWORD APIENTRY
1345 NtUserResolveDesktopForWOW(DWORD Unknown0)
1346 {
1347 UNIMPLEMENTED
1348 return 0;
1349 }
1350
1351 /*
1352 * @unimplemented
1353 */
1354 BOOL APIENTRY
1355 NtUserEndMenu(VOID)
1356 {
1357 UNIMPLEMENTED
1358
1359 return 0;
1360 }
1361
1362 /*
1363 * @implemented
1364 */
1365 /* NOTE: unused function */
1366 BOOL APIENTRY
1367 NtUserTrackPopupMenuEx(
1368 HMENU hMenu,
1369 UINT fuFlags,
1370 int x,
1371 int y,
1372 HWND hWnd,
1373 LPTPMPARAMS lptpm)
1374 {
1375 UNIMPLEMENTED
1376
1377 return FALSE;
1378 }
1379
1380 DWORD APIENTRY
1381 NtUserQuerySendMessage(DWORD Unknown0)
1382 {
1383 UNIMPLEMENTED;
1384
1385 return 0;
1386 }
1387
1388 /*
1389 * @unimplemented
1390 */
1391 DWORD APIENTRY
1392 NtUserAlterWindowStyle(DWORD Unknown0,
1393 DWORD Unknown1,
1394 DWORD Unknown2)
1395 {
1396 UNIMPLEMENTED
1397
1398 return(0);
1399 }
1400
1401 /*
1402 * NtUserSetWindowStationUser
1403 *
1404 * Status
1405 * @unimplemented
1406 */
1407
1408 DWORD APIENTRY
1409 NtUserSetWindowStationUser(
1410 DWORD Unknown0,
1411 DWORD Unknown1,
1412 DWORD Unknown2,
1413 DWORD Unknown3)
1414 {
1415 UNIMPLEMENTED
1416
1417 return 0;
1418 }
1419
1420 BOOL APIENTRY NtUserAddClipboardFormatListener(
1421 HWND hwnd
1422 )
1423 {
1424 UNIMPLEMENTED;
1425 return FALSE;
1426 }
1427
1428 BOOL APIENTRY NtUserRemoveClipboardFormatListener(
1429 HWND hwnd
1430 )
1431 {
1432 UNIMPLEMENTED;
1433 return FALSE;
1434 }
1435
1436 BOOL APIENTRY NtUserGetUpdatedClipboardFormats(
1437 PUINT lpuiFormats,
1438 UINT cFormats,
1439 PUINT pcFormatsOut
1440 )
1441 {
1442 UNIMPLEMENTED;
1443 return FALSE;
1444 }
1445
1446 /*
1447 * @unimplemented
1448 */
1449 DWORD
1450 APIENTRY
1451 NtUserGetCursorFrameInfo(
1452 DWORD Unknown0,
1453 DWORD Unknown1,
1454 DWORD Unknown2,
1455 DWORD Unknown3)
1456 {
1457 UNIMPLEMENTED
1458
1459 return 0;
1460 }
1461
1462 /*
1463 * @unimplemented
1464 */
1465 BOOL
1466 APIENTRY
1467 NtUserSetSystemCursor(
1468 HCURSOR hcur,
1469 DWORD id)
1470 {
1471 return FALSE;
1472 }
1473
1474 /* EOF */