&Process);
if (!NT_SUCCESS(Status))
{
- SetLastWin32Error(RtlNtStatusToDosError(Status));
+ EngSetLastError(RtlNtStatusToDosError(Status));
return FALSE;
}
case NOPARAM_ROUTINE_MSQCLEARWAKEMASK:
RETURN( (DWORD_PTR)IntMsqClearWakeMask());
+ case NOPARAM_ROUTINE_GETMSESSAGEPOS:
+ {
+ PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
+ RETURN( (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y));
+ }
+
default:
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
break;
}
RETURN(Result);
MsqPostQuitMessage(pti->MessageQueue, Param);
RETURN(TRUE);
}
+
+ case ONEPARAM_ROUTINE_BEGINDEFERWNDPOS:
+ {
+ PSMWP psmwp;
+ HDWP hDwp = NULL;
+ INT count = (INT)Param;
+
+ if (count < 0)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN(0);
+ }
+ /* Windows allows zero count, in which case it allocates context for 8 moves */
+ if (count == 0) count = 8;
+
+ psmwp = (PSMWP) UserCreateObject( gHandleTable,
+ NULL,
+ (PHANDLE)&hDwp,
+ otSMWP,
+ sizeof(SMWP));
+ if (!psmwp) RETURN(0);
+ psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP);
+ if (!psmwp->acvr)
+ {
+ UserDeleteObject(hDwp, otSMWP);
+ RETURN(0);
+ }
+ RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
+ psmwp->bHandle = TRUE;
+ psmwp->ccvr = 0; // actualCount
+ psmwp->ccvrAlloc = count; // suggestedCount
+ RETURN((DWORD_PTR)hDwp);
+ }
+
case ONEPARAM_ROUTINE_SHOWCURSOR:
RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) );
if (!(CurIcon = IntCreateCurIconHandle()))
{
- SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
RETURN(0);
}
RETURN (ret);
}
- case ONEPARAM_ROUTINE_ISWINDOWINDESTROY:
- {
- PWND Window;
- DWORD_PTR Result;
-
- if(!(Window = UserGetWindowObject((HWND)Param)))
- {
- RETURN( FALSE);
- }
-
- Result = (DWORD_PTR)IntIsWindowInDestroy(Window);
-
- RETURN( Result);
- }
-
case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
{
BOOL Enable;
RETURN( FALSE);
}
- case ONEPARAM_ROUTINE_MSQSETWAKEMASK:
+ case ONEPARAM_ROUTINE_GETINPUTEVENT:
RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param));
case ONEPARAM_ROUTINE_GETKEYBOARDTYPE:
case ONEPARAM_ROUTINE_GETQUEUESTATUS:
{
- DWORD Ret;
- WORD changed_bits, wake_bits;
- Ret = IntGetQueueStatus(FALSE);
- changed_bits = LOWORD(Ret);
- wake_bits = HIWORD(Ret);
- RETURN( MAKELONG(changed_bits & Param, wake_bits & Param));
+ RETURN (IntGetQueueStatus((DWORD)Param));
}
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
/* FIXME: Should use UserEnterShared */
ppi->dwLayout = Param;
RETURN(TRUE);
}
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN(FALSE);
}
case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT:
PDWORD pdwLayout;
if ( PsGetCurrentProcess() == CsrProcess)
{
- SetLastWin32Error(ERROR_INVALID_ACCESS);
+ EngSetLastError(ERROR_INVALID_ACCESS);
RETURN(FALSE);
}
ppi = PsGetCurrentProcessWin32Process();
_SEH2_END;
RETURN(Ret);
}
+ case ONEPARAM_ROUTINE_REPLYMESSAGE:
+ RETURN (co_MsqReplyMessage((LRESULT) Param));
+ case ONEPARAM_ROUTINE_MESSAGEBEEP:
+ RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
+ /* TODO: Implement sound sentry */
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
Routine, Param);
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN( 0);
CLEANUP:
DWORD_PTR Param2,
DWORD Routine)
{
- NTSTATUS Status;
PWND Window;
DECLARE_RETURN(DWORD_PTR);
switch(Routine)
{
- case TWOPARAM_ROUTINE_GETWINDOWRGNBOX:
- {
- DWORD_PTR Ret;
- RECTL rcRect;
- Window = UserGetWindowObject((HWND)Param1);
- if (!Window) RETURN(ERROR);
-
- Ret = (DWORD_PTR)IntGetWindowRgnBox(Window, &rcRect);
- Status = MmCopyToCaller((PVOID)Param2, &rcRect, sizeof(RECT));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- RETURN( ERROR);
- }
- RETURN( Ret);
- }
- case TWOPARAM_ROUTINE_GETWINDOWRGN:
- {
- Window = UserGetWindowObject((HWND)Param1);
- if (!Window) RETURN(ERROR);
-
- RETURN( (DWORD_PTR)IntGetWindowRgn(Window, (HRGN)Param2));
- }
case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
{
DWORD_PTR Ret;
case TWOPARAM_ROUTINE_SETCURSORPOS:
RETURN( (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, FALSE));
+ case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
+ RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
Routine, Param1, Param2);
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN( 0);
CLEANUP:
UserLeave();
return 0;
}
+
+ case HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT:
+ {
+ PWND pWnd;
+ PNOTIFYEVENT pne;
+ UserEnterExclusive();
+ pne = (PNOTIFYEVENT)Param;
+ if (hWnd)
+ pWnd = UserGetWindowObject(hWnd);
+ else
+ pWnd = NULL;
+ IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags);
+ UserLeave();
+ return 0;
+ }
}
UNIMPLEMENTED;
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(DWORD);
- DPRINT1("Enter NtUserCallHwndParamLock\n");
+ DPRINT("Enter NtUserCallHwndParamLock\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
RETURN( Ret);
CLEANUP:
- DPRINT1("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
+ DPRINT("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;