Author: tkreuzer
Date: Sat Apr 12 18:22:58 2008
New Revision: 32935
URL:
http://svn.reactos.org/svn/reactos?rev=32935&view=rev
Log:
PatchPatch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserGetWindowRect, use GetWindowRect instead
- remove NtUserGetClientOrigin and NtUserGetClientRect (unused)
- remove NtUserManualGuiCheck, use NtUserCallOneParam like other private CSRSS functions
do
Modified:
trunk/reactos/dll/win32/user32/controls/scrollbar.c
trunk/reactos/dll/win32/user32/misc/misc.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/misc.h
trunk/reactos/subsystems/win32/win32k/ntuser/guicheck.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Sat Apr 12 18:22:58
2008
@@ -1193,7 +1193,7 @@
if (SB_CTL != SBType)
{
- NtUserGetWindowRect(Wnd, &WindowRect);
+ GetWindowRect(Wnd, &WindowRect);
Pt.x -= WindowRect.left;
Pt.y -= WindowRect.top;
Modified: trunk/reactos/dll/win32/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] Sat Apr 12 18:22:58 2008
@@ -55,7 +55,7 @@
STDCALL
PrivateCsrssManualGuiCheck(LONG Check)
{
- NtUserManualGuiCheck(Check);
+ NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK);
}
VOID
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sat Apr 12 18:22:58 2008
@@ -2503,6 +2503,7 @@
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
#define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
#define NOPARAM_ROUTINE_CSRSS_INITIALIZED 0xffff0007
+#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
#define ONEPARAM_ROUTINE_GETMENU 0xfffe0001 // usermode
#define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0xfffe0002
#define ONEPARAM_ROUTINE_GETCARETINFO 0xfffe0007
@@ -2562,16 +2563,6 @@
NTAPI
NtUserGetClassLong(HWND hWnd, INT Offset, BOOL Ansi);
-/* Should be done in usermode */
-BOOL
-NTAPI
-NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
-
-/* Should be done in usermode */
-BOOL
-NTAPI
-NtUserGetClientRect(HWND hWnd, LPRECT Rect);
-
UINT
NTAPI
NtUserGetMenuDefaultItem(
@@ -2626,20 +2617,9 @@
NTAPI
NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
-/* Should be done in usermode */
-BOOL
-NTAPI
-NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
-
DWORD
NTAPI
NtUserGetWindowThreadProcessId(HWND hWnd, LPDWORD UnsafePid);
-
-
-
-VOID
-NTAPI
-NtUserManualGuiCheck(LONG Check);
Modified: trunk/reactos/subsystems/win32/win32k/include/misc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/misc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/misc.h [iso-8859-1] Sat Apr 12 18:22:58
2008
@@ -8,5 +8,6 @@
ULONG FASTCALL IntSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT
fWinIni);
DWORD STDCALL IntGetQueueStatus(BOOL ClearChanges);
+VOID FASTCALL IntUserManualGuiCheck(LONG Check);
#endif /* __WIN32K_MISC_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/guicheck.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/guicheck.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/guicheck.c [iso-8859-1] Sat Apr 12
18:22:58 2008
@@ -98,13 +98,13 @@
return TRUE;
}
-VOID STDCALL
-NtUserManualGuiCheck(LONG Check)
+VOID
+FASTCALL
+IntUserManualGuiCheck(LONG Check)
{
PW32PROCESS W32Data;
- DPRINT("Enter NtUserManualGuiCheck\n");
- UserEnterExclusive();
+ DPRINT("Enter IntUserManualGuiCheck\n");
W32Data = PsGetCurrentProcessWin32Process();
if (0 == Check)
@@ -126,8 +126,7 @@
}
}
- DPRINT("Leave NtUserManualGuiCheck\n");
- UserLeave();
+ DPRINT("Leave IntUserManualGuiCheck\n");
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Sat Apr 12
18:22:58 2008
@@ -395,6 +395,10 @@
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
/* FIXME: Should use UserEnterShared */
RETURN(IntEnumClipboardFormats(Param));
+
+ case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
+ IntUserManualGuiCheck(Param);
+ RETURN(TRUE);
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(),
Param=0x%x\n",
Routine, Param);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sat Apr 12 18:22:58
2008
@@ -2887,45 +2887,6 @@
END_CLEANUP;
}
-/*!
- * Returns client window rectangle relative to the upper-left corner of client area.
- *
- * \param hWnd window handle.
- * \param Rect pointer to the buffer where the coordinates are returned.
- *
-*/
-/*
- * @implemented
- */
-BOOL STDCALL
-NtUserGetClientRect(HWND hWnd, LPRECT Rect)
-{
- PWINDOW_OBJECT Window;
- RECT SafeRect;
- DECLARE_RETURN(BOOL);
-
- DPRINT("Enter NtUserGetClientRect\n");
- UserEnterShared();
-
- if(!(Window = UserGetWindowObject(hWnd)))
- {
- RETURN( FALSE);
- }
-
- IntGetClientRect(Window, &SafeRect);
-
- if(!NT_SUCCESS(MmCopyToCaller(Rect, &SafeRect, sizeof(RECT))))
- {
- RETURN( FALSE);
- }
- RETURN( TRUE);
-
-CLEANUP:
- DPRINT("Leave NtUserGetClientRect, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
BOOL
STDCALL
@@ -3902,44 +3863,6 @@
CLEANUP:
DPRINT("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-
-/*!
- * Return the dimension of the window in the screen coordinates.
- * \param hWnd window handle.
- * \param Rect pointer to the buffer where the coordinates are returned.
-*/
-/*
- * @implemented
- */
-BOOL STDCALL
-NtUserGetWindowRect(HWND hWnd, LPRECT Rect)
-{
- PWINDOW_OBJECT Wnd;
- NTSTATUS Status;
- DECLARE_RETURN(BOOL);
-
- DPRINT("Enter NtUserGetWindowRect\n");
- UserEnterShared();
-
- if (!(Wnd = UserGetWindowObject(hWnd)))
- {
- RETURN(FALSE);
- }
- Status = MmCopyToCaller(Rect, &Wnd->Wnd->WindowRect, sizeof(RECT));
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- RETURN( FALSE);
- }
-
- RETURN( TRUE);
-
-CLEANUP:
- DPRINT("Leave NtUserGetWindowRect, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Sat Apr 12 18:22:58
2008
@@ -104,27 +104,6 @@
return Ret;
}
-
-
-BOOL STDCALL
-NtUserGetClientOrigin(HWND hWnd, LPPOINT Point)
-{
- DECLARE_RETURN(BOOL);
- PWINDOW_OBJECT Window;
-
- DPRINT("Enter NtUserGetClientOrigin\n");
- UserEnterShared();
-
- if (!(Window = UserGetWindowObject(hWnd)))
- RETURN(FALSE);
-
- RETURN(UserGetClientOrigin(Window, Point));
-
-CLEANUP:
- DPRINT("Leave NtUserGetClientOrigin, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
/*******************************************************************
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Apr 12 18:22:58
2008
@@ -682,8 +682,6 @@
NtUserBuildMenuItemList 4
NtUserCreateCursorIconHandle 2
NtUserGetClassLong 3
-NtUserGetClientOrigin 2
-NtUserGetClientRect 2
NtUserGetMenuDefaultItem 3
NtUserGetLastInputInfo 1
NtUserGetMinMaxInfo 3
@@ -694,9 +692,7 @@
NtUserGetSystemMetrics 1
NtUserGetWindow 2
NtUserGetWindowLong 3
-NtUserGetWindowRect 2
NtUserGetWindowThreadProcessId 2
-NtUserManualGuiCheck 1
NtUserMenuInfo 3
NtUserMenuItemInfo 5
NtUserMonitorFromPoint 3