Author: jimtabor
Date: Sat Jul 12 19:21:51 2008
New Revision: 34442
URL:
http://svn.reactos.org/svn/reactos?rev=34442&view=rev
Log:
- Started NtUserRegisterClassExWOW and now using the fnIDs. Nothing is used but the IDs. I
tested with these changes for over 60 days.
- Implemented NtUserMessageCall, moved our first victim over to use it. This is for bug
2451.
Modified:
trunk/reactos/dll/win32/user32/controls/regcontrol.c
trunk/reactos/dll/win32/user32/windows/class.c
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/winpos.h
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/user32/controls/regcontrol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] Sat Jul 12 19:21:51
2008
@@ -19,21 +19,21 @@
UINT ClsId;
} g_SysClasses[] =
{
- { &DIALOG_builtin_class, CLASS_DIALOG },
- { &POPUPMENU_builtin_class, CLASS_POPUPMENU },
- { &COMBO_builtin_class, CLASS_COMBO },
- { &COMBOLBOX_builtin_class, CLASS_COMBOLBOX },
- { &DESKTOP_builtin_class, CLASS_DESKTOP },
- { &MDICLIENT_builtin_class, CLASS_MDICLIENT },
+ { &DIALOG_builtin_class, FNID_DIALOG },
+ { &POPUPMENU_builtin_class, FNID_MENU },
+ { &COMBO_builtin_class, FNID_COMBOBOX },
+ { &COMBOLBOX_builtin_class, FNID_COMBOLBOX },
+ { &DESKTOP_builtin_class, FNID_DESKTOP },
+ { &MDICLIENT_builtin_class, FNID_MDICLIENT },
#if 0
- { &MENU_builtin_class, CLASS_MENU },
+ { &MENU_builtin_class, FNID_MENU },
#endif
- { &SCROLL_builtin_class, CLASS_SCROLL },
- { &BUTTON_builtin_class, CLASS_BUTTON },
- { &LISTBOX_builtin_class, CLASS_LISTBOX },
- { &EDIT_builtin_class, CLASS_EDIT },
- { &ICONTITLE_builtin_class, CLASS_ICONTITLE },
- { &STATIC_builtin_class, CLASS_STATIC },
+ { &SCROLL_builtin_class, FNID_SCROLLBAR },
+ { &BUTTON_builtin_class, FNID_BUTTON },
+ { &LISTBOX_builtin_class, FNID_LISTBOX },
+ { &EDIT_builtin_class, FNID_EDIT },
+ { &ICONTITLE_builtin_class, FNID_ICONTITLE },
+ { &STATIC_builtin_class, FNID_STATIC },
};
BOOL WINAPI RegisterSystemControls(VOID)
Modified: trunk/reactos/dll/win32/user32/windows/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Sat Jul 12 19:21:51 2008
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* COPYRIGHT: GPL - See COPYING in the top level directory
* FILE: dll/win32/user32/windows/class.c
@@ -816,6 +815,17 @@
return SmallIcon;
}
+
+ATOM STDCALL
+RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
+ LPDWORD pdwWowData,
+ WORD fnID,
+ DWORD dwFlags)
+{
+ RTL_ATOM Atom = 0;
+ return (ATOM)Atom;
+}
+
/*
* @implemented
*/
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Sat Jul 12 19:21:51 2008
@@ -1410,21 +1410,7 @@
case WM_SHOWWINDOW:
{
- LONG Style;
- INT Ret = 0;
-
- if (!lParam) return 0;
- Style = GetWindowLongW(hWnd, GWL_STYLE);
- if ((Style & WS_VISIBLE) && wParam) return 0;
- if (!(Style & WS_VISIBLE) && !wParam) return 0;
- if (!GetWindow(hWnd, GW_OWNER)) return 0;
- Ret = NtUserCallTwoParam((DWORD) hWnd, (DWORD) wParam,
TWOPARAM_ROUTINE_ROS_SHOWWINDOW);
- if(Ret)
- {
- if( Ret == -1) return 0;
- return Ret;
- }
- ShowWindow(hWnd, wParam ? SW_SHOWNOACTIVATE : SW_HIDE);
+ NtUserMessageCall( hWnd, Msg, wParam, lParam, 0, NUMC_DEFWINDOWPROC, FALSE);
break;
}
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 Jul 12 19:21:51 2008
@@ -22,6 +22,13 @@
UINT ClassId;
} REGISTER_SYSCLASS, *PREGISTER_SYSCLASS;
+typedef struct _CLSMENUNAME
+{
+ LPSTR pszClientAnsiMenuName;
+ LPWSTR pwszClientUnicodeMenuName;
+ PUNICODE_STRING pusMenuName;
+} CLSMENUNAME, *PCLSMENUNAME;
+
typedef struct _USER_OBJHDR
{
/* This is the common header for all user handle objects */
@@ -78,7 +85,7 @@
INT ClsExtra;
INT WndExtra;
PVOID Dce;
- DWORD fnID;
+ DWORD fnID; // New ClassId
HINSTANCE hInstance;
HANDLE hIcon; /* FIXME - Use pointer! */
HANDLE hIconSm; /* FIXME - Use pointer! */
@@ -93,23 +100,7 @@
UINT System : 1;
UINT Global : 1;
UINT MenuNameIsString : 1;
-
-#define CLASS_DEFAULT 0x0
-#define CLASS_DESKTOP 0x1
-#define CLASS_DIALOG 0x2
-#define CLASS_POPUPMENU 0x3
-#define CLASS_COMBO 0x4
-#define CLASS_COMBOLBOX 0x5
-#define CLASS_MDICLIENT 0x6
-#define CLASS_MENU 0x7
-#define CLASS_SCROLL 0x8
-#define CLASS_BUTTON 0x9
-#define CLASS_LISTBOX 0xA
-#define CLASS_EDIT 0xB
-#define CLASS_ICONTITLE 0xC
-#define CLASS_STATIC 0xD
- UINT ClassId : 4;
-
+ UINT NotUsed : 27;
} WINDOWCLASS, *PWINDOWCLASS;
typedef struct _WINDOW
@@ -1734,7 +1725,8 @@
UINT transType,
DWORD keyboardId,
HKL dwhkl );
-
+// Look like fnID's
+#define NUMC_DEFWINDOWPROC 0x029E
#define NUMC_SENDMESSAGE 0x02B0
// Kernel has option to use TO or normal msg send, based on type of msg.
#define NUMC_SENDMESSAGEWTOOPTION 0x02B1
@@ -1963,16 +1955,16 @@
UINT flags
);
-HWINSTA
+RTL_ATOM
NTAPI
NtUserRegisterClassExWOW(
- CONST WNDCLASSEXW* lpwcx,
- BOOL bUnicodeClass,
- WNDPROC wpExtra,
- DWORD dwUnknown4,
+ WNDCLASSEXW* lpwcx,
+ PUNICODE_STRING pustrClassName,
+ PUNICODE_STRING pustrCNVersion,
+ PCLSMENUNAME pClassMenuName,
DWORD fnID,
- DWORD dwUnknown6,
- DWORD dwUnknown7);
+ DWORD Flags,
+ LPDWORD pWow);
BOOL
NTAPI
@@ -2490,7 +2482,7 @@
NtUserUnregisterClass(
PUNICODE_STRING ClassNameOrAtom,
HINSTANCE hInstance,
- DWORD Unknown);
+ PCLSMENUNAME pClassMenuName);
BOOL
NTAPI
@@ -2668,7 +2660,6 @@
#define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0xfffd0063
#define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0xfffd0064
#define TWOPARAM_ROUTINE_GETSYSCOLORS 0xfffd0065
-#define TWOPARAM_ROUTINE_ROS_SHOWWINDOW 0x1000
#define TWOPARAM_ROUTINE_ROS_ISACTIVEICON 0x1001
#define TWOPARAM_ROUTINE_ROS_NCDESTROY 0x1002
#define TWOPARAM_ROUTINE_ROS_REGSYSCLASSES 0x1003
Modified: trunk/reactos/subsystems/win32/win32k/include/winpos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] Sat Jul 12
19:21:51 2008
@@ -4,6 +4,8 @@
/* Undocumented flags. */
#define SWP_NOCLIENTMOVE 0x0800
#define SWP_NOCLIENTSIZE 0x1000
+
+#define WIN_NEEDS_SHOW_OWNEDPOPUP (0x00000140)
#define IntPtInWindow(WndObject,x,y) \
((x) >= (WndObject)->Wnd->WindowRect.left && \
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 Jul 12 19:21:51
2008
@@ -697,8 +697,8 @@
NtUserMenuItemInfo 5
NtUserMonitorFromPoint 3
NtUserMonitorFromRect 2
+NtUserRegisterClassEx 6
NtUserMonitorFromWindow 2
-NtUserRegisterClassEx 6
NtUserSendMessage 5
NtUserSendMessageTimeout 8
NtUserSendNotifyMessage 4