dd152672e0171f40dab2e99a2ce5db0c7c718db8
[reactos.git] / reactos / subsystems / win32 / win32k / ntuser / simplecall.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: NtUserCallXxx call stubs
5 * FILE: subsystem/win32/win32k/ntuser/simplecall.c
6 * PROGRAMER: Ge van Geldorp (ge@gse.nl)
7 * REVISION HISTORY:
8 * 2008/03/20 Split from misc.c
9 */
10
11 #include <win32k.h>
12
13 #define NDEBUG
14 #include <debug.h>
15
16
17 /* registered Logon process */
18 PPROCESSINFO LogonProcess = NULL;
19
20 BOOL FASTCALL
21 co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
22 {
23 PEPROCESS Process;
24 NTSTATUS Status;
25 CSR_API_MESSAGE Request;
26
27 Status = PsLookupProcessByProcessId(ProcessId,
28 &Process);
29 if (!NT_SUCCESS(Status))
30 {
31 EngSetLastError(RtlNtStatusToDosError(Status));
32 return FALSE;
33 }
34
35 if (Register)
36 {
37 /* Register the logon process */
38 if (LogonProcess != NULL)
39 {
40 ObDereferenceObject(Process);
41 return FALSE;
42 }
43
44 LogonProcess = (PPROCESSINFO)Process->Win32Process;
45 }
46 else
47 {
48 /* Deregister the logon process */
49 if (LogonProcess != (PPROCESSINFO)Process->Win32Process)
50 {
51 ObDereferenceObject(Process);
52 return FALSE;
53 }
54
55 LogonProcess = NULL;
56 }
57
58 ObDereferenceObject(Process);
59
60 Request.Type = MAKE_CSR_API(REGISTER_LOGON_PROCESS, CSR_GUI);
61 Request.Data.RegisterLogonProcessRequest.ProcessId = ProcessId;
62 Request.Data.RegisterLogonProcessRequest.Register = Register;
63
64 Status = co_CsrNotify(&Request);
65 if (! NT_SUCCESS(Status))
66 {
67 DPRINT1("Failed to register logon process with CSRSS\n");
68 return FALSE;
69 }
70
71 return TRUE;
72 }
73
74 /*
75 * @unimplemented
76 */
77 DWORD_PTR
78 APIENTRY
79 NtUserCallNoParam(DWORD Routine)
80 {
81 DWORD_PTR Result = 0;
82 DECLARE_RETURN(DWORD_PTR);
83
84 DPRINT("Enter NtUserCallNoParam\n");
85 UserEnterExclusive();
86
87 switch(Routine)
88 {
89 case NOPARAM_ROUTINE_CREATEMENU:
90 Result = (DWORD_PTR)UserCreateMenu(FALSE);
91 break;
92
93 case NOPARAM_ROUTINE_CREATEMENUPOPUP:
94 Result = (DWORD_PTR)UserCreateMenu(TRUE);
95 break;
96
97 case NOPARAM_ROUTINE_DESTROY_CARET:
98 Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
99 break;
100
101 case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP:
102 Result = (DWORD_PTR)IntInitMessagePumpHook();
103 break;
104
105 case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP:
106 Result = (DWORD_PTR)IntUninitMessagePumpHook();
107 break;
108
109 case NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO:
110 Result = (DWORD_PTR)MsqGetMessageExtraInfo();
111 break;
112
113 case NOPARAM_ROUTINE_MSQCLEARWAKEMASK:
114 RETURN( (DWORD_PTR)IntMsqClearWakeMask());
115
116 case NOPARAM_ROUTINE_GETMSESSAGEPOS:
117 {
118 PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
119 RETURN( (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y));
120 }
121
122 default:
123 DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
124 EngSetLastError(ERROR_INVALID_PARAMETER);
125 break;
126 }
127 RETURN(Result);
128
129 CLEANUP:
130 DPRINT("Leave NtUserCallNoParam, ret=%i\n",_ret_);
131 UserLeave();
132 END_CLEANUP;
133 }
134
135
136 /*
137 * @implemented
138 */
139 DWORD_PTR
140 APIENTRY
141 NtUserCallOneParam(
142 DWORD_PTR Param,
143 DWORD Routine)
144 {
145 DECLARE_RETURN(DWORD_PTR);
146
147 DPRINT("Enter NtUserCallOneParam\n");
148
149 UserEnterExclusive();
150
151 switch(Routine)
152 {
153 case ONEPARAM_ROUTINE_POSTQUITMESSAGE:
154 {
155 PTHREADINFO pti;
156 pti = PsGetCurrentThreadWin32Thread();
157 MsqPostQuitMessage(pti->MessageQueue, Param);
158 RETURN(TRUE);
159 }
160 case ONEPARAM_ROUTINE_SHOWCURSOR:
161 RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) );
162
163 case ONEPARAM_ROUTINE_GETDESKTOPMAPPING:
164 {
165 PTHREADINFO ti;
166 ti = GetW32ThreadInfo();
167 if (ti != NULL)
168 {
169 /* Try convert the pointer to a user mode pointer if the desktop is
170 mapped into the process */
171 RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param));
172 }
173 else
174 {
175 RETURN(0);
176 }
177 }
178
179 case ONEPARAM_ROUTINE_WINDOWFROMDC:
180 RETURN( (DWORD_PTR)IntWindowFromDC((HDC)Param));
181
182 case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
183 {
184 DWORD_PTR Result;
185
186 Result = gspv.bMouseBtnSwap;
187 gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
188 gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
189 RETURN(Result);
190 }
191
192 case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
193 RETURN( (DWORD_PTR)IntSwitchCaretShowing((PVOID)Param));
194
195 case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
196 RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param));
197
198 case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
199 RETURN( (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param));
200
201 case ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT:
202 {
203 PCURICON_OBJECT CurIcon;
204 DWORD_PTR Result ;
205
206 if (!(CurIcon = IntCreateCurIconHandle()))
207 {
208 EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
209 RETURN(0);
210 }
211
212 Result = (DWORD_PTR)CurIcon->Self;
213 UserDereferenceObject(CurIcon);
214 RETURN(Result);
215 }
216
217 case ONEPARAM_ROUTINE_GETCURSORPOSITION:
218 {
219 BOOL ret = TRUE;
220
221
222 _SEH2_TRY
223 {
224 ProbeForWrite((POINT*)Param,sizeof(POINT),1);
225 RtlCopyMemory((POINT*)Param,&gpsi->ptCursor,sizeof(POINT));
226 }
227 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
228 {
229 SetLastNtError(_SEH2_GetExceptionCode());
230 ret = FALSE;
231 }
232 _SEH2_END;
233
234 RETURN (ret);
235 }
236
237 case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
238 {
239 BOOL Enable;
240 PPROCESSINFO Process = PsGetCurrentProcessWin32Process();
241
242 if(Process != NULL)
243 {
244 Enable = (BOOL)(Param != 0);
245
246 if(Enable)
247 {
248 Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING;
249 }
250 else
251 {
252 Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING;
253 }
254
255 RETURN( TRUE);
256 }
257
258 RETURN( FALSE);
259 }
260
261 case ONEPARAM_ROUTINE_GETINPUTEVENT:
262 RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param));
263
264 case ONEPARAM_ROUTINE_GETKEYBOARDTYPE:
265 RETURN( UserGetKeyboardType(Param));
266
267 case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT:
268 RETURN( (DWORD_PTR)UserGetKeyboardLayout(Param));
269
270 case ONEPARAM_ROUTINE_RELEASEDC:
271 RETURN (UserReleaseDC(NULL, (HDC) Param, FALSE));
272
273 case ONEPARAM_ROUTINE_REALIZEPALETTE:
274 RETURN (UserRealizePalette((HDC) Param));
275
276 case ONEPARAM_ROUTINE_GETQUEUESTATUS:
277 {
278 RETURN (IntGetQueueStatus((DWORD)Param));
279 }
280 case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
281 /* FIXME: Should use UserEnterShared */
282 RETURN(IntEnumClipboardFormats(Param));
283
284 case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
285 IntUserManualGuiCheck(Param);
286 RETURN(TRUE);
287
288 case ONEPARAM_ROUTINE_GETCURSORPOS:
289 {
290 BOOL Ret = TRUE;
291 PPOINTL pptl;
292 PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
293 if (pti->hdesk != InputDesktopHandle) RETURN(FALSE);
294 _SEH2_TRY
295 {
296 pptl = (PPOINTL)Param;
297 *pptl = gpsi->ptCursor;
298 }
299 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
300 {
301 Ret = FALSE;
302 }
303 _SEH2_END;
304 RETURN(Ret);
305 }
306 case ONEPARAM_ROUTINE_SETPROCDEFLAYOUT:
307 {
308 PPROCESSINFO ppi;
309 if (Param & LAYOUT_ORIENTATIONMASK)
310 {
311 ppi = PsGetCurrentProcessWin32Process();
312 ppi->dwLayout = Param;
313 RETURN(TRUE);
314 }
315 EngSetLastError(ERROR_INVALID_PARAMETER);
316 RETURN(FALSE);
317 }
318 case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT:
319 {
320 BOOL Ret = TRUE;
321 PPROCESSINFO ppi;
322 PDWORD pdwLayout;
323 if ( PsGetCurrentProcess() == CsrProcess)
324 {
325 EngSetLastError(ERROR_INVALID_ACCESS);
326 RETURN(FALSE);
327 }
328 ppi = PsGetCurrentProcessWin32Process();
329 _SEH2_TRY
330 {
331 pdwLayout = (PDWORD)Param;
332 *pdwLayout = ppi->dwLayout;
333 }
334 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
335 {
336 SetLastNtError(_SEH2_GetExceptionCode());
337 Ret = FALSE;
338 }
339 _SEH2_END;
340 RETURN(Ret);
341 }
342 case ONEPARAM_ROUTINE_REPLYMESSAGE:
343 RETURN (co_MsqReplyMessage((LRESULT) Param));
344 case ONEPARAM_ROUTINE_MESSAGEBEEP:
345 RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
346 /* TODO: Implement sound sentry */
347 }
348 DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
349 Routine, Param);
350 EngSetLastError(ERROR_INVALID_PARAMETER);
351 RETURN( 0);
352
353 CLEANUP:
354 DPRINT("Leave NtUserCallOneParam, ret=%i\n",_ret_);
355 UserLeave();
356 END_CLEANUP;
357 }
358
359
360 /*
361 * @implemented
362 */
363 DWORD_PTR
364 APIENTRY
365 NtUserCallTwoParam(
366 DWORD_PTR Param1,
367 DWORD_PTR Param2,
368 DWORD Routine)
369 {
370 PWND Window;
371 DECLARE_RETURN(DWORD_PTR);
372
373 DPRINT("Enter NtUserCallTwoParam\n");
374 UserEnterExclusive();
375
376 switch(Routine)
377 {
378 case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
379 {
380 DWORD_PTR Ret;
381 PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1);
382 if(!MenuObject)
383 RETURN( 0);
384
385 if(Param2 > 0)
386 {
387 Ret = (MenuObject->MenuInfo.Height == (int)Param2);
388 MenuObject->MenuInfo.Height = (int)Param2;
389 }
390 else
391 Ret = (DWORD_PTR)MenuObject->MenuInfo.Height;
392 IntReleaseMenuObject(MenuObject);
393 RETURN( Ret);
394 }
395
396 case TWOPARAM_ROUTINE_SETGUITHRDHANDLE:
397 {
398 PUSER_MESSAGE_QUEUE MsgQueue = ((PTHREADINFO)PsGetCurrentThread()->Tcb.Win32Thread)->MessageQueue;
399
400 ASSERT(MsgQueue);
401 RETURN( (DWORD_PTR)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
402 }
403
404 case TWOPARAM_ROUTINE_ENABLEWINDOW:
405 UNIMPLEMENTED
406 RETURN( 0);
407
408 case TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS:
409 {
410 Window = UserGetWindowObject((HWND)Param1);
411 if (!Window) RETURN(0);
412
413 RETURN( (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL) Param2));
414 }
415
416 case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE:
417 {
418 WPARAM wParam;
419 Window = UserGetWindowObject((HWND)Param1);
420 if (!Window) RETURN(0);
421
422 /* Unpack wParam */
423 wParam = MAKEWPARAM((Param2 >> 3) & 0x3,
424 Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE));
425
426 RETURN( UserUpdateUiState(Window, wParam) );
427 }
428
429 case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW:
430 UNIMPLEMENTED
431 RETURN( 0);
432
433
434 case TWOPARAM_ROUTINE_SETCARETPOS:
435 RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2));
436
437 case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
438 RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
439
440 case TWOPARAM_ROUTINE_SETCURSORPOS:
441 RETURN( (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, FALSE));
442
443 case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
444 RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
445 }
446 DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
447 Routine, Param1, Param2);
448 EngSetLastError(ERROR_INVALID_PARAMETER);
449 RETURN( 0);
450
451 CLEANUP:
452 DPRINT("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
453 UserLeave();
454 END_CLEANUP;
455 }
456
457
458 /*
459 * @unimplemented
460 */
461 BOOL
462 APIENTRY
463 NtUserCallHwndLock(
464 HWND hWnd,
465 DWORD Routine)
466 {
467 BOOL Ret = 0;
468 PWND Window;
469 USER_REFERENCE_ENTRY Ref;
470 DECLARE_RETURN(BOOLEAN);
471
472 DPRINT("Enter NtUserCallHwndLock\n");
473 UserEnterExclusive();
474
475 if (!(Window = UserGetWindowObject(hWnd)))
476 {
477 RETURN( FALSE);
478 }
479 UserRefObjectCo(Window, &Ref);
480
481 /* FIXME: Routine can be 0x53 - 0x5E */
482 switch (Routine)
483 {
484 case HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS:
485 co_WinPosArrangeIconicWindows(Window);
486 break;
487
488 case HWNDLOCK_ROUTINE_DRAWMENUBAR:
489 {
490 DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
491 Ret = TRUE;
492 if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
493 co_WinPosSetWindowPos( Window,
494 HWND_DESKTOP,
495 0,0,0,0,
496 SWP_NOSIZE|
497 SWP_NOMOVE|
498 SWP_NOZORDER|
499 SWP_NOACTIVATE|
500 SWP_FRAMECHANGED );
501 break;
502 }
503
504 case HWNDLOCK_ROUTINE_REDRAWFRAME:
505 co_WinPosSetWindowPos( Window,
506 HWND_DESKTOP,
507 0,0,0,0,
508 SWP_NOSIZE|
509 SWP_NOMOVE|
510 SWP_NOZORDER|
511 SWP_NOACTIVATE|
512 SWP_FRAMECHANGED );
513 Ret = TRUE;
514 break;
515
516 case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK:
517 co_WinPosSetWindowPos( Window,
518 HWND_DESKTOP,
519 0,0,0,0,
520 SWP_NOSIZE|
521 SWP_NOMOVE|
522 SWP_NOZORDER|
523 SWP_NOACTIVATE|
524 SWP_FRAMECHANGED );
525 if (!Window->spwndOwner && !IntGetParent(Window))
526 {
527 co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) hWnd);
528 }
529 Ret = TRUE;
530 break;
531
532 case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW:
533 Ret = co_IntSetForegroundWindow(Window);
534 break;
535
536 case HWNDLOCK_ROUTINE_UPDATEWINDOW:
537 Ret = co_UserRedrawWindow( Window, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN);
538 break;
539 }
540
541 UserDerefObjectCo(Window);
542
543 RETURN( Ret);
544
545 CLEANUP:
546 DPRINT("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
547 UserLeave();
548 END_CLEANUP;
549 }
550
551 /*
552 * @unimplemented
553 */
554 HWND
555 APIENTRY
556 NtUserCallHwndOpt(
557 HWND hWnd,
558 DWORD Routine)
559 {
560 switch (Routine)
561 {
562 case HWNDOPT_ROUTINE_SETPROGMANWINDOW:
563 GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd;
564 break;
565
566 case HWNDOPT_ROUTINE_SETTASKMANWINDOW:
567 GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd;
568 break;
569 }
570
571 return hWnd;
572 }
573
574 DWORD
575 APIENTRY
576 NtUserCallHwnd(
577 HWND hWnd,
578 DWORD Routine)
579 {
580 switch (Routine)
581 {
582 case HWND_ROUTINE_GETWNDCONTEXTHLPID:
583 {
584 PWND Window;
585 PPROPERTY HelpId;
586 USER_REFERENCE_ENTRY Ref;
587
588 UserEnterExclusive();
589
590 if (!(Window = UserGetWindowObject(hWnd)))
591 {
592 UserLeave();
593 return 0;
594 }
595 UserRefObjectCo(Window, &Ref);
596
597 HelpId = IntGetProp(Window, gpsi->atomContextHelpIdProp);
598
599 UserDerefObjectCo(Window);
600 UserLeave();
601 return (DWORD)HelpId;
602 }
603 case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW:
604 if (IntIsWindow(hWnd))
605 return IntRegisterShellHookWindow(hWnd);
606 return FALSE;
607 break;
608 case HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW:
609 if (IntIsWindow(hWnd))
610 return IntDeRegisterShellHookWindow(hWnd);
611 return FALSE;
612 }
613 UNIMPLEMENTED;
614
615 return 0;
616 }
617
618 DWORD
619 APIENTRY
620 NtUserCallHwndParam(
621 HWND hWnd,
622 DWORD Param,
623 DWORD Routine)
624 {
625
626 switch (Routine)
627 {
628 case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER:
629 return IntKillTimer(hWnd, (UINT_PTR)Param, TRUE);
630
631 case HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID:
632 {
633 PWND Window;
634
635 UserEnterExclusive();
636 if(!(Window = UserGetWindowObject(hWnd)))
637 {
638 UserLeave();
639 return FALSE;
640 }
641
642 if ( Param )
643 IntSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param);
644 else
645 IntRemoveProp(Window, gpsi->atomContextHelpIdProp);
646
647 UserLeave();
648 return TRUE;
649 }
650
651 case HWNDPARAM_ROUTINE_SETDIALOGPOINTER:
652 {
653 PWND pWnd;
654 USER_REFERENCE_ENTRY Ref;
655
656 UserEnterExclusive();
657
658 if (!(pWnd = UserGetWindowObject(hWnd)))
659 {
660 UserLeave();
661 return 0;
662 }
663 UserRefObjectCo(pWnd, &Ref);
664
665 if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() &&
666 pWnd->cbwndExtra == DLGWINDOWEXTRA &&
667 !(pWnd->state & WNDS_SERVERSIDEWINDOWPROC))
668 {
669 if (Param)
670 {
671 if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG;
672 pWnd->state |= WNDS_DIALOGWINDOW;
673 }
674 else
675 {
676 pWnd->fnid |= FNID_DESTROY;
677 pWnd->state &= ~WNDS_DIALOGWINDOW;
678 }
679 }
680
681 UserDerefObjectCo(pWnd);
682 UserLeave();
683 return 0;
684 }
685
686 case HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT:
687 {
688 PWND pWnd;
689 PNOTIFYEVENT pne;
690 UserEnterExclusive();
691 pne = (PNOTIFYEVENT)Param;
692 if (hWnd)
693 pWnd = UserGetWindowObject(hWnd);
694 else
695 pWnd = NULL;
696 IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags);
697 UserLeave();
698 return 0;
699 }
700 }
701
702 UNIMPLEMENTED;
703
704 return 0;
705 }
706
707 DWORD
708 APIENTRY
709 NtUserCallHwndParamLock(
710 HWND hWnd,
711 DWORD Param,
712 DWORD Routine)
713 {
714 DWORD Ret = 0;
715 PWND Window;
716 USER_REFERENCE_ENTRY Ref;
717 DECLARE_RETURN(DWORD);
718
719 DPRINT1("Enter NtUserCallHwndParamLock\n");
720 UserEnterExclusive();
721
722 if (!(Window = UserGetWindowObject(hWnd)))
723 {
724 RETURN( FALSE);
725 }
726 UserRefObjectCo(Window, &Ref);
727
728 switch (Routine)
729 {
730 case TWOPARAM_ROUTINE_VALIDATERGN:
731 Ret = (DWORD)co_UserRedrawWindow( Window, NULL, (HRGN)Param, RDW_VALIDATE);
732 break;
733 }
734
735 UserDerefObjectCo(Window);
736
737 RETURN( Ret);
738
739 CLEANUP:
740 DPRINT1("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
741 UserLeave();
742 END_CLEANUP;
743
744 }
745
746 /* EOF */