ReactOS 0.4.17-dev-470-gf9e3448
simplecall.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: NtUserCallXxx call stubs
5 * FILE: win32ss/user/ntuser/simplecall.c
6 * PROGRAMERS: Ge van Geldorp (ge@gse.nl)
7 * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
8 */
9
10#include <win32k.h>
11
13
14/* Registered logon process ID */
16
19{
22
24 if (!NT_SUCCESS(Status))
25 {
27 return FALSE;
28 }
29
30 ProcessId = Process->UniqueProcessId;
31
33
34 if (Register)
35 {
36 /* Register the logon process */
37 if (gpidLogon != 0)
38 return FALSE;
39
41 }
42 else
43 {
44 /* Deregister the logon process */
45 if (gpidLogon != ProcessId)
46 return FALSE;
47
48 gpidLogon = 0;
49 }
50
51 return TRUE;
52}
53
54/*
55 * @unimplemented
56 */
60{
61 DWORD_PTR Result = 0;
62
63 TRACE("Enter NtUserCallNoParam\n");
64
65 /* Read-only routines only need a shared lock; the rest stay exclusive */
66 switch (Routine)
67 {
72 break;
73 default:
75 break;
76 }
77
78 switch (Routine)
79 {
82 break;
83
86 break;
87
90 break;
91
94 break;
95
98 break;
99
102 break;
103
105 {
107 Result = (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y);
108 break;
109 }
110
113 break;
114
117 break;
118
120 {
122 TRACE("Zapping the Active and Focus window out of the Queue!\n");
123 pti->MessageQueue->spwndFocus = NULL;
124 pti->MessageQueue->spwndActive = NULL;
125 Result = 0;
126 break;
127 }
128
131 break;
132
133 /* this is a ReactOS only case and is needed for gui-on-demand */
136 break;
137
139 if (UserIsIMMEnabled())
141 else
143
144 Result = TRUE; // Always return TRUE.
145 break;
146
147 default:
148 ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
150 break;
151 }
152
153 TRACE("Leave NtUserCallNoParam, ret=%p\n",(PVOID)Result);
154 UserLeave();
155
156 return Result;
157}
158
159
160/*
161 * @implemented
162 */
166 DWORD_PTR Param,
167 DWORD Routine)
168{
170
171 TRACE("Enter NtUserCallOneParam\n");
172
173 /* Read-only routines only need a shared lock; the rest stay exclusive */
174 switch (Routine)
175 {
181 case ONEPARAM_ROUTINE_GETCURSORPOS:
184 break;
185 default:
187 break;
188 }
189
190 switch (Routine)
191 {
193 {
194 PTHREADINFO pti;
196 MsqPostQuitMessage(pti, Param);
197 Result = TRUE;
198 break;
199 }
200
202 {
203 PSMWP psmwp;
204 HDWP hDwp = NULL;
205 INT count = (INT)Param;
206
207 if (count < 0)
208 {
210 Result = 0;
211 break;
212 }
213
214 /* Windows allows zero count, in which case it allocates context for 8 moves */
215 if (count == 0) count = 8;
216
218 NULL,
219 NULL,
220 (PHANDLE)&hDwp,
222 sizeof(SMWP));
223 if (!psmwp)
224 {
225 Result = 0;
226 break;
227 }
228
230 if (!psmwp->acvr)
231 {
233 Result = 0;
234 break;
235 }
236
237 RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
238 psmwp->bHandle = TRUE;
239 psmwp->ccvr = 0; // actualCount
240 psmwp->ccvrAlloc = count; // suggestedCount
241 Result = (DWORD_PTR)hDwp;
242 break;
243 }
244
247 break;
248
250 {
251 PTHREADINFO ti;
252 ti = GetW32ThreadInfo();
253 if (ti != NULL)
254 {
255 /* Try convert the pointer to a user mode pointer if the desktop is
256 mapped into the process */
258 }
259 else
260 {
261 Result = 0;
262 }
263 break;
264 }
265
268 break;
269
271 {
273 gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
275 break;
276 }
277
280 break;
281
284 break;
285
287 {
289 {
291 Result = 0;
292 }
293 break;
294 }
295
297 {
298 BOOL Enable;
300
301 if (Process != NULL)
302 {
303 Enable = (BOOL)(Param != 0);
304
305 if (Enable)
306 {
307 Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING;
308 }
309 else
310 {
311 Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING;
312 }
313
314 Result = TRUE;
315 break;
316 }
317
318 Result = FALSE;
319 break;
320 }
321
324 break;
325
328 break;
329
332 break;
333
335 Result = UserReleaseDC(NULL, (HDC) Param, FALSE);
336 break;
337
339 Result = UserRealizePalette((HDC) Param);
340 break;
341
343 {
345 break;
346 }
347
350 break;
351
352 case ONEPARAM_ROUTINE_GETCURSORPOS:
353 {
356 Result = TRUE;
357 if (pti->rpdesk != IntGetActiveDesktop())
358 {
359 Result = FALSE;
360 break;
361 }
363 {
364 ProbeForWrite((POINT*)Param,sizeof(POINT),1);
365 pptl = (PPOINTL)Param;
366 *pptl = gpsi->ptCursor;
367 }
369 {
370 Result = FALSE;
371 }
372 _SEH2_END;
373 break;
374 }
375
377 {
378 PPROCESSINFO ppi;
379 if (Param & LAYOUT_ORIENTATIONMASK || Param == LAYOUT_LTR)
380 {
382 ppi->dwLayout = Param;
383 Result = TRUE;
384 break;
385 }
387 Result = FALSE;
388 break;
389 }
390
392 {
393 PPROCESSINFO ppi;
394 PDWORD pdwLayout;
395 Result = TRUE;
396
398 {
400 Result = FALSE;
401 break;
402 }
403
406 {
407 pdwLayout = (PDWORD)Param;
408 *pdwLayout = ppi->dwLayout;
409 }
411 {
413 Result = FALSE;
414 }
415 _SEH2_END;
416 break;
417 }
418
421 break;
422
424 /* TODO: Implement sound sentry */
426 break;
427
428 case ONEPARAM_ROUTINE_CREATESYSTEMTHREADS:
430 break;
431
434 break;
435
438 break;
439
440 default:
441 ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
442 Routine, Param);
444 Result = 0;
445 break;
446 }
447
448 TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)Result);
449 UserLeave();
450
451 return Result;
452}
453
454
455/*
456 * @implemented
457 */
461 DWORD_PTR Param1,
462 DWORD_PTR Param2,
463 DWORD Routine)
464{
465 PWND Window;
466 DWORD_PTR Ret;
467 TRACE("Enter NtUserCallTwoParam\n");
469
470 switch (Routine)
471 {
473 {
475 Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2);
476 break;
477 }
478
480 {
481 PMENU MenuObject = IntGetMenuObject((HMENU)Param1);
482 if (!MenuObject)
483 {
484 Ret = 0;
485 break;
486 }
487
488 if (Param2 > 0)
489 {
490 Ret = (MenuObject->cyMenu == (int)Param2);
491 MenuObject->cyMenu = (int)Param2;
492 }
493 else
494 Ret = (DWORD_PTR)MenuObject->cyMenu;
495 IntReleaseMenuObject(MenuObject);
496 break;
497 }
498
500 {
502 ASSERT(pti->MessageQueue);
503 Ret = (DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2);
504 break;
505 }
506
508 Ret = IntEnableWindow((HWND)Param1, (BOOL)Param2);
509 break;
510
512 {
514 if (!Window)
515 {
516 Ret = 0;
517 break;
518 }
519
520 Ret = (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL)Param2);
521 break;
522 }
523
525 {
528 if (!Window)
529 {
530 Ret = 0;
531 break;
532 }
533
534 /* Unpack wParam */
535 wParam = MAKEWPARAM((Param2 >> 3) & 0x3,
536 Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE));
537
539 break;
540 }
541
543 {
544 HWND hwnd = (HWND)Param1;
545 BOOL fAltTab = (BOOL)Param2;
546 Ret = 0;
548 if (!Window)
549 break;
550
551 if (gpqForeground && !fAltTab)
552 {
553 PWND pwndActive = gpqForeground->spwndActive;
554 if (pwndActive && !(pwndActive->ExStyle & WS_EX_TOPMOST))
555 {
556 co_WinPosSetWindowPos(pwndActive, HWND_BOTTOM, 0, 0, 0, 0,
559 }
560
562 break;
563 }
564
566
567 if (fAltTab && (Window->style & WS_MINIMIZE))
568 {
570 MsqPostMessage(Window->head.pti, &msg, FALSE, QS_POSTMESSAGE, 0, 0);
571 }
572 break;
573 }
574
576 Ret = (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2);
577 break;
578
580 Ret = (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2);
581 break;
582
584 Ret = (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE);
585 break;
586
588 Ret = IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2);
589 break;
590
591 default:
592 ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
593 Routine, Param1, Param2);
595 Ret = 0;
596 }
597
598
599 TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)Ret);
600 UserLeave();
601
602 return Ret;
603}
604
605
606/*
607 * @unimplemented
608 */
609BOOL
612 HWND hWnd,
613 DWORD Routine)
614{
615 BOOL Ret = FALSE;
616 PWND Window;
618
619 TRACE("Enter NtUserCallHwndLock\n");
621
623 {
624 Ret = FALSE;
625 goto Exit;
626 }
627
628 UserRefObjectCo(Window, &Ref);
629
630 /* FIXME: Routine can be 0x53 - 0x5E */
631 switch (Routine)
632 {
635 break;
636
638 {
639 TRACE("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
640 Ret = TRUE;
641 if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
644 0, 0, 0, 0,
645 SWP_NOSIZE |
646 SWP_NOMOVE |
650 break;
651 }
652
656 0, 0, 0, 0,
657 SWP_NOSIZE |
658 SWP_NOMOVE |
662 Ret = TRUE;
663 break;
664
668 0, 0, 0, 0,
669 SWP_NOSIZE |
670 SWP_NOMOVE |
674 if (!Window->spwndOwner && !IntGetParent(Window))
675 {
676 co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM)hWnd, FALSE); // FIXME Flashing?
677 }
678 Ret = TRUE;
679 break;
680
682 TRACE("co_IntSetForegroundWindow 1 0x%p\n", hWnd);
684 TRACE("co_IntSetForegroundWindow 2 0x%p\n", hWnd);
685 break;
686
688 TRACE("co_IntSetForegroundWindow M 1 0x%p\n", hWnd);
690 TRACE("co_IntSetForegroundWindow M 2 0x%p\n", hWnd);
691 break;
692
695 Ret = TRUE;
696 break;
697
700 break;
701 }
702
704
705Exit:
706 TRACE("Leave NtUserCallHwndLock, ret=%u\n", Ret);
707 UserLeave();
708
709 return Ret;
710}
711
712/*
713 * @unimplemented
714 */
715HWND
718 HWND hWnd,
719 DWORD Routine)
720{
721 switch (Routine)
722 {
724 GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd;
725 break;
726
728 GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd;
729 break;
730 }
731
732 return hWnd;
733}
734
738 HWND hWnd,
739 DWORD Routine)
740{
741 switch (Routine)
742 {
744 {
745 PWND Window;
746 DWORD HelpId;
747
749
751 {
752 UserLeave();
753 return 0;
754 }
755
757
758 UserLeave();
759 return HelpId;
760 }
761
763 if (IntIsWindow(hWnd))
765 return FALSE;
766 break;
767
769 if (IntIsWindow(hWnd))
771 return FALSE;
772
774 {
775 PWND Window;
778 {
779 Window->state |= WNDS_MSGBOX;
780 }
781 UserLeave();
782 return FALSE;
783 }
784
786 {
787 PWND pWnd;
790 if (pWnd)
791 pWnd = DWP_GetEnabledPopup(pWnd);
792 UserLeave();
793 return (DWORD_PTR)pWnd;
794 }
795 }
796
797 STUB;
798
799 return 0;
800}
801
802DWORD
805 HWND hWnd,
806 DWORD_PTR Param,
807 DWORD Routine)
808{
809
810 switch (Routine)
811 {
813 {
814 DWORD ret;
815
818 UserLeave();
819 return ret;
820 }
821
823 {
824 PWND Window;
825
828 {
829 UserLeave();
830 return FALSE;
831 }
832
833 if (Param)
834 UserSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param, TRUE);
835 else
837
838 UserLeave();
839 return TRUE;
840 }
841
843 {
844 PWND pWnd;
846
848
849 if (!(pWnd = UserGetWindowObject(hWnd)))
850 {
851 UserLeave();
852 return 0;
853 }
854 UserRefObjectCo(pWnd, &Ref);
855
856 if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() &&
857 pWnd->cbwndExtra >= DLGWINDOWEXTRA &&
859 {
860 pWnd->DialogPointer = (PVOID)Param;
861 if (Param)
862 {
863 if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG;
864 pWnd->state |= WNDS_DIALOGWINDOW;
865 }
866 else
867 {
868 pWnd->fnid |= FNID_DESTROY;
869 pWnd->state &= ~WNDS_DIALOGWINDOW;
870 }
871 }
872
873 UserDerefObjectCo(pWnd);
874 UserLeave();
875 return 0;
876 }
877
879 {
880 PWND pWnd;
881 PNOTIFYEVENT pne;
883 pne = (PNOTIFYEVENT)Param;
884 if (hWnd)
886 else
887 pWnd = NULL;
888 IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags);
889 UserLeave();
890 return 0;
891 }
892
894 {
895 PWND pWnd;
898 if (pWnd) IntClearWindowState(pWnd, (UINT)Param);
899 UserLeave();
900 return 0;
901 }
902
904 {
905 PWND pWnd;
908 if (pWnd) IntSetWindowState(pWnd, (UINT)Param);
909 UserLeave();
910 return 0;
911 }
912 }
913
914 STUB;
915
916 return 0;
917}
918
919DWORD
922 HWND hWnd,
923 DWORD_PTR Param,
924 DWORD Routine)
925{
926 DWORD Ret = FALSE;
927 PWND Window;
929
930 TRACE("Enter NtUserCallHwndParamLock\n");
932
934 {
935 Ret = FALSE;
936 goto Exit;
937 }
938
939 UserRefObjectCo(Window, &Ref);
940
941 switch (Routine)
942 {
945 break;
946
948 {
949 PREGION Rgn = REGION_LockRgn((HRGN)Param);
951 if (Rgn) REGION_UnlockRgn(Rgn);
952 break;
953 }
954 }
955
957
958Exit:
959
960 TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n", Ret);
961 UserLeave();
962
963 return Ret;
964}
965
966/* EOF */
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: precomp.h:57
#define HandleToUlong(h)
Definition: basetsd.h:73
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
WPARAM wParam
Definition: combotst.c:138
PEPROCESS gpepCSRSS
Definition: csr.c:15
DWORD UserSystemThreadProc(BOOL bRemoteProcess)
Definition: csr.c:207
HWND FASTCALL IntWindowFromDC(HDC hDc)
Definition: windc.c:894
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
static __inline PVOID DesktopHeapAddressToUser(PVOID lpMem)
Definition: desktop.h:308
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define APIENTRY
Definition: api.h:79
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
HANDLE HWND
Definition: compat.h:19
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
return ret
Definition: mutex.c:146
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define PagedPool
Definition: env_spec_w32.h:308
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2712
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL FASTCALL IntLockSetForegroundWindow(UINT uLockCode)
Definition: focus.c:1567
BOOL FASTCALL IntAllowSetForegroundWindow(DWORD dwProcessId)
Definition: focus.c:1598
BOOL FASTCALL UserSetActiveWindow(_In_opt_ PWND Wnd)
Definition: focus.c:1258
PUSER_MESSAGE_QUEUE gpqForeground
Definition: focus.c:13
BOOL FASTCALL co_IntSetForegroundWindow(PWND Window)
Definition: focus.c:1545
BOOL FASTCALL IntReleaseCapture(VOID)
Definition: focus.c:1525
BOOL FASTCALL co_IntSetForegroundWindowMouse(PWND Window)
Definition: focus.c:1556
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
UINT WINAPI UserRealizePalette(HDC hDC)
Definition: painting.c:2345
Status
Definition: gdiplustypes.h:24
GLuint GLuint GLsizei count
Definition: gl.h:1545
unsigned int UINT
Definition: sysinfo.c:13
struct _NOTIFYEVENT * PNOTIFYEVENT
PSERVERINFO gpsi
Definition: imm.c:18
#define FNID_DESTROY
Definition: ntuser.h:898
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE
Definition: ntuser.h:3606
#define WNDS_SERVERSIDEWINDOWPROC
Definition: ntuser.h:623
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
struct _THREADINFO * GetW32ThreadInfo(VOID)
Definition: misc.c:806
#define FNID_DIALOG
Definition: ntuser.h:869
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT
Definition: ntuser.h:3617
#define NOPARAM_ROUTINE_ISCONSOLEMODE
Definition: ntuser.h:3602
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING
Definition: ntuser.h:3603
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING
Definition: ntuser.h:3604
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE
Definition: ntuser.h:3616
@ TWOPARAM_ROUTINE_REGISTERLOGONPROCESS
Definition: ntuser.h:1671
@ TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS
Definition: ntuser.h:1657
@ HWNDLOCK_ROUTINE_UPDATEWINDOW
Definition: ntuser.h:1653
@ TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK
Definition: ntuser.h:1685
@ NOPARAM_ROUTINE_INIT_MESSAGE_PUMP
Definition: ntuser.h:1560
@ NOPARAM_ROUTINE_ZAPACTIVEANDFOUS
Definition: ntuser.h:1545
@ TWOPARAM_ROUTINE_REDRAWTITLE
Definition: ntuser.h:1656
@ ONEPARAM_ROUTINE_GETKEYBOARDTYPE
Definition: ntuser.h:1583
@ TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW
Definition: ntuser.h:1658
@ NOPARAM_ROUTINE_CREATEMENUPOPUP
Definition: ntuser.h:1515
@ HWNDPARAM_ROUTINE_SETDIALOGPOINTER
Definition: ntuser.h:1638
@ ONEPARAM_ROUTINE_WINDOWFROMDC
Definition: ntuser.h:1569
@ HWNDPARAM_ROUTINE_KILLSYSTEMTIMER
Definition: ntuser.h:1637
@ HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID
Definition: ntuser.h:1640
@ NOPARAM_ROUTINE_LOADUSERAPIHOOK
Definition: ntuser.h:1540
@ TWOPARAM_ROUTINE_ENABLEWINDOW
Definition: ntuser.h:1655
@ ONEPARAM_ROUTINE_MESSAGEBEEP
Definition: ntuser.h:1593
@ HWNDLOCK_ROUTINE_DRAWMENUBAR
Definition: ntuser.h:1644
@ ONEPARAM_ROUTINE_SETPROCDEFLAYOUT
Definition: ntuser.h:1617
@ ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS
Definition: ntuser.h:1577
@ ONEPARAM_ROUTINE_BEGINDEFERWNDPOS
Definition: ntuser.h:1565
@ HWND_ROUTINE_REGISTERSHELLHOOKWINDOW
Definition: ntuser.h:1631
@ NOPARAM_ROUTINE_GETMSESSAGEPOS
Definition: ntuser.h:1531
@ ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT
Definition: ntuser.h:1582
@ HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW
Definition: ntuser.h:1650
@ NOPARAM_ROUTINE_MSQCLEARWAKEMASK
Definition: ntuser.h:1518
@ ONEPARAM_ROUTINE_POSTQUITMESSAGE
Definition: ntuser.h:1595
@ HWND_ROUTINE_SETMSGBOX
Definition: ntuser.h:1632
@ HWNDPARAM_ROUTINE_CLEARWINDOWSTATE
Definition: ntuser.h:1636
@ NOPARAM_ROUTINE_CREATEMENU
Definition: ntuser.h:1514
@ ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW
Definition: ntuser.h:1590
@ HWND_ROUTINE_GETWNDCONTEXTHLPID
Definition: ntuser.h:1630
@ ONEPARAM_ROUTINE_RELEASEDC
Definition: ntuser.h:1606
@ ONEPARAM_ROUTINE_SWAPMOUSEBUTTON
Definition: ntuser.h:1623
@ NOPARAM_ROUTINE_GETIMESHOWSTATUS
Definition: ntuser.h:1529
@ HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS
Definition: ntuser.h:1643
@ ONEPARAM_ROUTINE_SHOWCURSOR
Definition: ntuser.h:1621
@ ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO
Definition: ntuser.h:1616
@ ONEPARAM_ROUTINE_REALIZEPALETTE
Definition: ntuser.h:1599
@ HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK
Definition: ntuser.h:1648
@ NOPARAM_ROUTINE_DESTROY_CARET
Definition: ntuser.h:1520
@ HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD
Definition: ntuser.h:1645
@ HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW
Definition: ntuser.h:1628
@ ONEPARAM_ROUTINE_REPLYMESSAGE
Definition: ntuser.h:1610
@ HWNDLOCK_ROUTINE_REDRAWFRAME
Definition: ntuser.h:1647
@ ONEPARAM_ROUTINE_GETQUEUESTATUS
Definition: ntuser.h:1585
@ HWNDOPT_ROUTINE_SETTASKMANWINDOW
Definition: ntuser.h:1634
@ NOPARAM_ROUTINE_RELEASECAPTURE
Definition: ntuser.h:1543
@ ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT
Definition: ntuser.h:1571
@ HWND_ROUTINE_DWP_GETENABLEDPOPUP
Definition: ntuser.h:1629
@ NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP
Definition: ntuser.h:1561
@ NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING
Definition: ntuser.h:1555
@ ONEPARAM_ROUTINE_SETCARETBLINKTIME
Definition: ntuser.h:1611
@ TWOPARAM_ROUTINE_VALIDATERGN
Definition: ntuser.h:1660
@ TWOPARAM_ROUTINE_SETCARETPOS
Definition: ntuser.h:1680
@ TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE
Definition: ntuser.h:1654
@ ONEPARAM_ROUTINE_GETPROCDEFLAYOUT
Definition: ntuser.h:1584
@ HWNDOPT_ROUTINE_SETPROGMANWINDOW
Definition: ntuser.h:1633
@ ONEPARAM_ROUTINE_GETINPUTEVENT
Definition: ntuser.h:1581
@ ONEPARAM_ROUTINE_ALLOWSETFOREGND
Definition: ntuser.h:1570
@ HWNDPARAM_ROUTINE_SETWINDOWSTATE
Definition: ntuser.h:1641
@ TWOPARAM_ROUTINE_SETCURSORPOS
Definition: ntuser.h:1681
#define WNDS_MSGBOX
Definition: ntuser.h:610
#define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE
Definition: ntuser.h:3607
@ TYPE_SETWINDOWPOS
Definition: ntuser.h:44
#define WNDS_DIALOGWINDOW
Definition: ntuser.h:621
#define SRVINFO_IMM32
Definition: ntuser.h:949
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT
Definition: ntuser.h:3605
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define STUB
Definition: kernel32.h:27
#define IntReleaseMenuObject(MenuObj)
Definition: menu.h:130
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define ASSERT(a)
Definition: mode.c:44
static HDC
Definition: imagelist.c:88
#define LAYOUT_LTR
Definition: dc.c:33
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
VOID FASTCALL MsqPostQuitMessage(PTHREADINFO pti, ULONG ExitCode)
Definition: msgqueue.c:1381
HWND FASTCALL MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd)
Definition: msgqueue.c:2507
int UserShowCursor(BOOL bShow)
Definition: msgqueue.c:168
BOOL FASTCALL IntMsqClearWakeMask(VOID)
Definition: msgqueue.c:392
VOID FASTCALL MsqPostMessage(PTHREADINFO pti, MSG *Msg, BOOLEAN HardwareMessage, DWORD MessageBits, DWORD dwQEvent, LONG_PTR ExtraInfo)
Definition: msgqueue.c:1337
LPARAM FASTCALL MsqSetMessageExtraInfo(LPARAM lParam)
Definition: msgqueue.c:2447
BOOL FASTCALL co_MsqReplyMessage(LRESULT lResult)
Definition: msgqueue.c:2484
HANDLE FASTCALL IntMsqSetWakeMask(DWORD WakeMask)
Definition: msgqueue.c:362
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define FASTCALL
Definition: nt_native.h:50
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
NTSTATUS NTAPI PsLookupProcessByProcessId(IN HANDLE ProcessId, OUT PEPROCESS *Process)
Definition: process.c:919
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
Definition: process.c:1183
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:395
PWND FASTCALL DWP_GetEnabledPopup(PWND pWnd)
Definition: defwnd.c:494
BOOL FASTCALL UserLoadApiHook(VOID)
Definition: hook.c:131
BOOL FASTCALL IntUnhookWindowsHook(int HookId, HOOKPROC pfnFilterProc)
Definition: hook.c:1319
BOOL FASTCALL IntBroadcastImeShowStatusChange(_In_ PWND pImeWnd, _In_ BOOL bShow)
Definition: ime.c:2514
BOOL gfIMEShowStatus
Definition: ime.c:24
VOID FASTCALL IntCheckImeShowStatusInThread(_In_ PWND pImeWnd)
Definition: ime.c:2527
UINT FASTCALL co_WinPosArrangeIconicWindows(PWND parent)
Definition: winpos.c:737
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1792
HWND hwndSAS
Definition: winsta.c:24
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:255
VOID FASTCALL UserEnterShared(VOID)
Definition: ntuser.c:241
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:247
struct _THREADINFO * PTHREADINFO
Definition: ntwin32.h:6
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:43
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
#define WS_MINIMIZE
Definition: pedump.c:622
DWORD * PDWORD
Definition: pedump.c:68
#define WS_EX_TOPMOST
Definition: pedump.c:647
#define INT
Definition: polytest.cpp:20
#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
BOOL FASTCALL co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
Definition: simplecall.c:18
DWORD_PTR APIENTRY NtUserCallNoParam(DWORD Routine)
Definition: simplecall.c:59
DWORD_PTR APIENTRY NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:165
HWND APIENTRY NtUserCallHwndOpt(HWND hWnd, DWORD Routine)
Definition: simplecall.c:717
DWORD APIENTRY NtUserCallHwndParam(HWND hWnd, DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:804
BOOL APIENTRY NtUserCallHwndLock(HWND hWnd, DWORD Routine)
Definition: simplecall.c:611
DWORD APIENTRY NtUserCallHwndParamLock(HWND hWnd, DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:921
DWORD_PTR APIENTRY NtUserCallTwoParam(DWORD_PTR Param1, DWORD_PTR Param2, DWORD Routine)
Definition: simplecall.c:460
DWORD_PTR APIENTRY NtUserCallHwnd(HWND hWnd, DWORD Routine)
Definition: simplecall.c:737
HANDLE gpidLogon
Definition: simplecall.c:15
static void Exit(void)
Definition: sock.c:1330
#define TRACE(s)
Definition: solgame.cpp:4
Definition: window.c:28
Definition: winpos.h:4
LONG idChild
Definition: hook.h:39
DWORD flags
Definition: hook.h:40
LONG idObject
Definition: hook.h:38
DWORD event
Definition: hook.h:37
DWORD dwLayout
Definition: win32.h:280
Definition: region.h:8
Definition: winpos.h:21
PCVR acvr
Definition: winpos.h:27
INT ccvr
Definition: winpos.h:25
UINT bHandle
Definition: winpos.h:24
INT ccvrAlloc
Definition: winpos.h:26
BOOL bMouseBtnSwap
Definition: sysparams.h:82
POINT ptLast
Definition: win32.h:129
struct _DESKTOP * rpdesk
Definition: win32.h:92
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
Definition: object.h:4
Definition: ntuser.h:694
DWORD ExStyle
Definition: ntuser.h:704
THRDESKHEAD head
Definition: ntuser.h:695
DWORD fnid
Definition: ntuser.h:709
DWORD state
Definition: ntuser.h:701
PVOID DialogPointer
Definition: ntuser.h:766
ULONG cbwndExtra
Definition: ntuser.h:738
ULONG cyMenu
Definition: ntuser.h:423
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
ATOM atomContextHelpIdProp
Definition: ntuser.h:1067
DWORD dwSRVIFlags
Definition: ntuser.h:1051
#define DWORD_PTR
Definition: treelist.c:76
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
uint32_t DWORD_PTR
Definition: typedefs.h:65
void * PVOID
Definition: typedefs.h:50
int32_t INT
Definition: typedefs.h:58
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
#define WM_LOGONNOTIFY
Definition: undocuser.h:39
#define LN_MESSAGE_BEEP
Definition: undocuser.h:121
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
Definition: painting.c:897
VOID FASTCALL co_IntUpdateWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
Definition: painting.c:521
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:123
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
#define W32PF_NOWINDOWGHOSTING
Definition: win32.h:32
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:30
PREGION FASTCALL REGION_LockRgn(_In_ HRGN hrgn)
Definition: region.c:2358
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
Definition: region.c:2373
BOOL FASTCALL IntSetCaretBlinkTime(UINT uMSeconds)
Definition: caret.c:183
BOOL FASTCALL co_IntSetCaretPos(int X, int Y)
Definition: caret.c:192
BOOL FASTCALL co_IntDestroyCaret(PTHREADINFO Win32Thread)
Definition: caret.c:159
UINT APIENTRY UserEnumClipboardFormats(UINT fmt)
Definition: clipboard.c:443
HANDLE IntCreateCurIconHandle(BOOLEAN Animated)
Definition: cursoricon.c:285
BOOL UserSetCursorPos(INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook)
Definition: cursoricon.c:238
PDESKTOP FASTCALL IntGetActiveDesktop(VOID)
Definition: desktop.c:1285
HDC ScreenDeviceContext
Definition: desktop.c:53
BOOL IntDeRegisterShellHookWindow(HWND hWnd)
Definition: desktop.c:1801
BOOL IntRegisterShellHookWindow(HWND hWnd)
Definition: desktop.c:1769
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1707
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:178
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:995
DWORD FASTCALL UserGetKeyboardType(DWORD dwTypeFlag)
Definition: keyboard.c:1907
PMENU FASTCALL IntGetMenuObject(HMENU hMenu)
Definition: menu.c:192
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu)
Definition: menu.c:5058
DWORD APIENTRY IntGetQueueStatus(DWORD Changes)
Definition: message.c:2139
BOOL APIENTRY IntInitMessagePumpHook(VOID)
Definition: message.c:2160
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1395
BOOL APIENTRY IntUninitMessagePumpHook(VOID)
Definition: message.c:2173
BOOL FASTCALL UserIsIMMEnabled(VOID)
Definition: metric.c:22
VOID FASTCALL IntClearWindowState(PWND pWnd, UINT Flag)
Definition: misc.c:617
VOID FASTCALL IntSetWindowState(PWND pWnd, UINT Flag)
Definition: misc.c:596
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
Definition: object.c:716
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
Definition: object.c:568
HANDLE FASTCALL UserGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:46
HANDLE FASTCALL UserRemoveProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
SPIVALUES gspv
Definition: sysparams.c:17
#define USERTAG_SWP
Definition: tags.h:281
BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
Definition: timer.c:579
PWND FASTCALL IntGetParent(PWND Wnd)
Definition: window.c:205
BOOL FASTCALL IntEnableWindow(HWND hWnd, BOOL bEnable)
Definition: window.c:221
BOOL FASTCALL IntShowOwnedPopups(PWND OwnerWnd, BOOL fShow)
Definition: window.c:4654
BOOL FASTCALL IntIsWindow(HWND hWnd)
Definition: window.c:177
BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam)
Definition: window.c:40
_In_ POINTL * pptl
Definition: winddi.h:3741
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
struct _POINTL * PPOINTL
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define ERROR_INVALID_ACCESS
Definition: winerror.h:237
#define LAYOUT_ORIENTATIONMASK
Definition: wingdi.h:1374
struct _SMWP SMWP
struct _SMWP * PSMWP
#define DLGWINDOWEXTRA
Definition: winuser.h:2601
#define MAKEWPARAM(l, h)
Definition: winuser.h:4117
LRESULT(CALLBACK * HOOKPROC)(int, WPARAM, LPARAM)
Definition: winuser.h:3007
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define WM_SYSCOMMAND
Definition: winuser.h:1769
#define SWP_FRAMECHANGED
Definition: winuser.h:1251
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SWP_NOSIZE
Definition: winuser.h:1256
#define SWP_ASYNCWINDOWPOS
Definition: winuser.h:1264
#define HWND_DESKTOP
Definition: winuser.h:1220
#define RDW_ALLCHILDREN
Definition: winuser.h:1232
#define QS_POSTMESSAGE
Definition: winuser.h:888
#define SM_SWAPBUTTON
Definition: winuser.h:995
#define SWP_NOZORDER
Definition: winuser.h:1258
#define RDW_VALIDATE
Definition: winuser.h:1229
#define SC_RESTORE
Definition: winuser.h:2634
#define HWND_BOTTOM
Definition: winuser.h:1216
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
#define ObDereferenceObject
Definition: obfuncs.h:203
#define PsGetCurrentProcess
Definition: psfuncs.h:17