diff --git a/reactos/dll/win32/user32/misc/stubs.c b/reactos/dll/win32/user32/misc/stubs.c index 3b1da347218..a7a3264aa9c 100644 --- a/reactos/dll/win32/user32/misc/stubs.c +++ b/reactos/dll/win32/user32/misc/stubs.c @@ -15,37 +15,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32); -/* - * @unimplemented - */ -int -WINAPI -GetMouseMovePointsEx( - UINT cbSize, - LPMOUSEMOVEPOINT lppt, - LPMOUSEMOVEPOINT lpptBuf, - int nBufPoints, - DWORD resolution) -{ - if((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return -1; - } - - if(!lppt || !lpptBuf) - { - SetLastError(ERROR_NOACCESS); - return -1; - } - - UNIMPLEMENTED; - - SetLastError(ERROR_POINT_NOT_FOUND); - return -1; -} - - /* * @unimplemented */ diff --git a/reactos/dll/win32/user32/user32.pspec b/reactos/dll/win32/user32/user32.pspec index edfc78eaf33..109507c75e8 100644 --- a/reactos/dll/win32/user32/user32.pspec +++ b/reactos/dll/win32/user32/user32.pspec @@ -331,7 +331,7 @@ @ stdcall GetMessageW(ptr long long long) @ stdcall GetMonitorInfoA(long ptr) @ stdcall GetMonitorInfoW(long ptr) -@ stdcall GetMouseMovePointsEx(long ptr ptr long long) # Direct call NtUserGetMouseMovePointsEx +@ stdcall GetMouseMovePointsEx(long ptr ptr long long) NtUserGetMouseMovePointsEx @ stdcall GetNextDlgGroupItem(long long long) @ stdcall GetNextDlgTabItem(long long long) ; @ stub GetNextQueueWindow diff --git a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c index 600c2785834..077d9bd7a79 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c @@ -305,25 +305,28 @@ NtUserGetMouseMovePointsEx( int nBufPoints, DWORD resolution) { + UserEnterExclusive(); + + if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64)) + { + SetLastWin32Error(ERROR_INVALID_PARAMETER); + return -1; + } + + _SEH2_TRY + { + ProbeForRead(lppt, cbSize, 1); + ProbeForWrite(lpptBuf, cbSize, 1); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastNtError(_SEH2_GetExceptionCode()); + SetLastWin32Error(ERROR_NOACCESS); + } + _SEH2_END; + /* - if (cbSize != sizeof (MOUSEMOVEPOINT) - { - SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND); - return GMMP_ERR_POINT_NOT_FOUND; - } - - if (!lppt) - { - SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND); - return GMMP_ERR_POINT_NOT_FOUND; - } - - if (!lpptBuf) - { - SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND); - return GMMP_ERR_POINT_NOT_FOUND; - } - + Call a subfunction of GetMouseMovePointsEx! switch(resolution) { case GMMP_USE_DISPLAY_POINTS: @@ -335,8 +338,8 @@ NtUserGetMouseMovePointsEx( } */ UNIMPLEMENTED - - return 0; + UserLeave(); + return -1; }