Author: jimtabor
Date: Wed May 20 06:20:48 2009
New Revision: 41010
URL:
http://svn.reactos.org/svn/reactos?rev=41010&view=rev
Log:
- GetMouseMovePointsEx is a direct call to kernel space. Move and sorted initial code.
Modified:
trunk/reactos/dll/win32/user32/misc/stubs.c
trunk/reactos/dll/win32/user32/user32.pspec
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
Modified: trunk/reactos/dll/win32/user32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/stub…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] Wed May 20 06:20:48 2009
@@ -14,37 +14,6 @@
#include <wine/debug.h>
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
Modified: trunk/reactos/dll/win32/user32/user32.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.ps…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.pspec [iso-8859-1] Wed May 20 06:20:48 2009
@@ -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
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Wed May 20
06:20:48 2009
@@ -305,25 +305,28 @@
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 @@
}
*/
UNIMPLEMENTED
-
- return 0;
+ UserLeave();
+ return -1;
}