Author: tkreuzer
Date: Wed Apr 2 21:13:34 2008
New Revision: 32825
URL:
http://svn.reactos.org/svn/reactos?rev=32825&view=rev
Log:
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT
insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not
used in usermode anymore
tested with AbiWord and FF on VMWare
Modified:
trunk/reactos/dll/win32/user32/misc/timer.c
trunk/reactos/dll/win32/user32/user32.def
trunk/reactos/dll/win32/user32/windows/clipboard.c
trunk/reactos/dll/win32/user32/windows/input.c
trunk/reactos/dll/win32/user32/windows/menu.c
trunk/reactos/dll/win32/user32/windows/message.c
trunk/reactos/dll/win32/user32/windows/window.c
trunk/reactos/dll/win32/user32/windows/winpos.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/class.h
trunk/reactos/subsystems/win32/win32k/include/clipboard.h
trunk/reactos/subsystems/win32/win32k/include/focus.h
trunk/reactos/subsystems/win32/win32k/include/menu.h
trunk/reactos/subsystems/win32/win32k/include/misc.h
trunk/reactos/subsystems/win32/win32k/ntuser/callproc.c
trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
trunk/reactos/subsystems/win32/win32k/ntuser/focus.c
trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/user32/misc/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/time…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/timer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/timer.c [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -43,7 +43,7 @@
HWND hWnd,
UINT_PTR IDEvent)
{
- return NtUserKillSystemTimer(hWnd, IDEvent);
+ return NtUserCallHwndParam(hWnd, IDEvent, HWNDPARAM_ROUTINE_KILLSYSTEMTIMER);
}
@@ -89,3 +89,6 @@
return NtUserSetTimer(hWnd, IDEvent, Period, TimerFunc);
}
+
+
+
Modified: trunk/reactos/dll/win32/user32/user32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.de…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.def [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.def [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -521,7 +521,6 @@
PostThreadMessageA@16
PostThreadMessageW@16
PrintWindow@12
-PrivateCsrssRegisterPrimitive@0
PrivateCsrssManualGuiCheck@4
PrivateCsrssInitialized@0
PrivateExtractIconExA@20
Modified: trunk/reactos/dll/win32/user32/windows/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -69,7 +69,7 @@
UINT STDCALL
EnumClipboardFormats(UINT format)
{
- UINT ret = NtUserEnumClipboardFormats(format);
+ UINT ret = NtUserCallOneParam(format, ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS);
return ret;
}
@@ -248,7 +248,7 @@
ret = RtlCreateUnicodeStringFromAsciiz(&usFormat, lpszFormat);
if (ret)
{
- ret = NtUserRegisterClipboardFormat(&usFormat); //(LPCWSTR)
+ ret = NtUserRegisterWindowMessage(&usFormat); //(LPCWSTR)
RtlFreeUnicodeString(&usFormat);
}
@@ -278,7 +278,7 @@
}
RtlInitUnicodeString(&usFormat, lpszFormat);
- ret = NtUserRegisterClipboardFormat(&usFormat);
+ ret = NtUserRegisterWindowMessage(&usFormat);
return ret;
}
Modified: trunk/reactos/dll/win32/user32/windows/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -574,15 +574,6 @@
return NtUserSendInput(nInputs, pInputs, cbSize);
}
-/*
- * Private call for CSRSS
- */
-VOID
-STDCALL
-PrivateCsrssRegisterPrimitive(VOID)
-{
- NtUserCallNoParam(NOPARAM_ROUTINE_REGISTER_PRIMITIVE);
-}
/*
* @implemented
Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -4458,7 +4458,7 @@
mi.cch = MenuText.Length / sizeof(WCHAR);
CleanHeap = TRUE;
}
- res = NtUserInsertMenuItem(hMenu, uItem, fByPosition, &mi);
+ res = NtUserThunkedMenuItemInfo(hMenu, uItem, fByPosition, TRUE, &mi, NULL);
if ( CleanHeap ) RtlFreeUnicodeString ( &MenuText );
}
@@ -4504,7 +4504,7 @@
mi.dwTypeData = MenuText.Buffer;
mi.cch = MenuText.Length / sizeof(WCHAR);
}
- res = NtUserInsertMenuItem(hMenu, uItem, fByPosition, &mi);
+ res = NtUserThunkedMenuItemInfo(hMenu, uItem, fByPosition, TRUE, &mi, NULL);
}
return res;
}
@@ -5173,3 +5173,6 @@
}
+
+
+
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -2140,7 +2140,7 @@
HWND STDCALL
GetCapture(VOID)
{
- return(NtUserGetCapture());
+ return (HWND)NtUserGetThreadState(THREADSTATE_CAPTUREWINDOW);
}
/*
@@ -2171,7 +2171,7 @@
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
#endif
- ret = NtUserGetQueueStatus(TRUE /*ClearChanges*/);
+ ret = NtUserCallOneParam(TRUE, ONEPARAM_ROUTINE_GETQUEUESTATUS);
changed_bits = LOWORD(ret);
wake_bits = HIWORD(ret);
@@ -2195,7 +2195,7 @@
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
#endif
- ret = NtUserGetQueueStatus(FALSE /*ClearChanges*/);
+ ret = NtUserCallOneParam(FALSE, ONEPARAM_ROUTINE_GETQUEUESTATUS);
wake_bits = HIWORD(ret);
Modified: trunk/reactos/dll/win32/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -919,7 +919,8 @@
HWND STDCALL
GetLastActivePopup(HWND hWnd)
{
- return NtUserGetLastActivePopup(hWnd);
+ UNIMPLEMENTED;
+ return 0;
}
@@ -1987,3 +1988,6 @@
/* EOF */
+
+
+
Modified: trunk/reactos/dll/win32/user32/windows/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/winpos.c [iso-8859-1] Wed Apr 2 21:13:34 2008
@@ -99,7 +99,7 @@
HWND STDCALL
GetActiveWindow(VOID)
{
- return(NtUserGetActiveWindow());
+ return (HWND)NtUserGetThreadState(THREADSTATE_ACTIVEWINDOW);
}
/*
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] Wed Apr 2 21:13:34 2008
@@ -1424,11 +1424,18 @@
DWORD dwThreadId,
DWORD Unknown1);
-#define THREADSTATE_GETTHREADINFO (0)
-#define THREADSTATE_FOCUSWINDOW (1)
-#define THREADSTATE_INSENDMESSAGE (2)
-#define THREADSTATE_PROGMANWINDOW (3)
-#define THREADSTATE_TASKMANWINDOW (4)
+
+enum ThreadStateRoutines
+{
+ THREADSTATE_GETTHREADINFO,
+ THREADSTATE_INSENDMESSAGE,
+ THREADSTATE_FOCUSWINDOW,
+ THREADSTATE_ACTIVEWINDOW,
+ THREADSTATE_CAPTUREWINDOW,
+ THREADSTATE_PROGMANWINDOW,
+ THREADSTATE_TASKMANWINDOW
+};
+
DWORD
NTAPI
NtUserGetThreadState(
@@ -1773,10 +1780,6 @@
DWORD dwUnknown5,
DWORD dwUnknown6);
-UINT
-NTAPI
-NtUserRealizePalette(HDC hDC);
-
DWORD
NTAPI
NtUserRealChildWindowFromPoint(
@@ -1830,11 +1833,6 @@
int id,
UINT fsModifiers,
UINT vk);
-
-BOOL
-NTAPI
-NtUserGetLastInputInfo(
- PLASTINPUTINFO plii);
DWORD
NTAPI
@@ -2475,7 +2473,6 @@
* ReactOS-specific NtUser calls and their related structures, both which shouldn't
exist.
*/
-#define NOPARAM_ROUTINE_REGISTER_PRIMITIVE 0xffff0001
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
#define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
#define NOPARAM_ROUTINE_CSRSS_INITIALIZED 0xffff0007
@@ -2533,30 +2530,6 @@
BOOL Indirect);
-typedef struct _WNDPROC_INFO
-{
- WNDPROC WindowProc;
- BOOL IsUnicode;
-} WNDPROC_INFO, *PWNDPROC_INFO;
-
-BOOL
-NTAPI
-NtUserDereferenceWndProcHandle(IN HANDLE wpHandle, OUT PWNDPROC_INFO wpInfo);
-
-/* Use ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS */
-UINT
-NTAPI
-NtUserEnumClipboardFormats(
- UINT format);
-
-HWND
-NTAPI
-NtUserGetActiveWindow(VOID);
-
-HWND
-NTAPI
-NtUserGetCapture(VOID);
-
/* Should be done in usermode */
ULONG_PTR
NTAPI
@@ -2579,10 +2552,6 @@
UINT fByPos,
UINT gmdiFlags);
-HWND
-NTAPI
-NtUserGetLastActivePopup(HWND hWnd);
-
BOOL
NTAPI
NtUserGetLastInputInfo(
@@ -2606,10 +2575,6 @@
NTAPI
NtUserGetProp(HWND hWnd, ATOM Atom);
-DWORD
-NTAPI
-NtUserGetQueueStatus(BOOL ClearChanges);
-
BOOL
NTAPI
NtUserGetScrollInfo(
@@ -2643,17 +2608,7 @@
NTAPI
NtUserGetWindowThreadProcessId(HWND hWnd, LPDWORD UnsafePid);
-DWORD
-NTAPI
-NtUserInsertMenuItem(
- HMENU hMenu,
- UINT uItem,
- BOOL fByPosition,
- LPCMENUITEMINFOW lpmii);
-
-BOOL
-NTAPI
-NtUserKillSystemTimer(HWND hWnd, UINT_PTR uIDEvent);
+
VOID
NTAPI
@@ -2762,11 +2717,6 @@
HMENU hMenu);
-UINT
-NTAPI
-NtUserRegisterClipboardFormat(
- PUNICODE_STRING format);
-
typedef struct tagNTUSERSENDMESSAGEINFO
{
Modified: trunk/reactos/subsystems/win32/win32k/include/class.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/class.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/class.h [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -3,6 +3,12 @@
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
+
+typedef struct _WNDPROC_INFO
+{
+ WNDPROC WindowProc;
+ BOOL IsUnicode;
+} WNDPROC_INFO, *PWNDPROC_INFO;
static BOOL __inline
IsCallProcHandle(IN WNDPROC lpWndProc)
Modified: trunk/reactos/subsystems/win32/win32k/include/clipboard.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/clipboard.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/clipboard.h [iso-8859-1] Wed Apr 2
21:13:34 2008
@@ -43,6 +43,8 @@
VOID FASTCALL
IntClipboardFreeWindow(PWINDOW_OBJECT window);
+UINT STDCALL IntEnumClipboardFormats(UINT format);
+
/*
UINT FASTCALL
IntEnumClipboardFormats(UINT format);
Modified: trunk/reactos/subsystems/win32/win32k/include/focus.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/focus.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/focus.h [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -14,6 +14,8 @@
*/
HWND FASTCALL
IntGetThreadFocusWindow();
+HWND STDCALL IntGetCapture();
+HWND FASTCALL UserGetActiveWindow();
BOOL FASTCALL
co_IntMouseActivateWindow(PWINDOW_OBJECT Window);
Modified: trunk/reactos/subsystems/win32/win32k/include/menu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -98,6 +98,8 @@
BOOL FASTCALL
IntSetMenuItemRect(PMENU_OBJECT MenuObject, UINT Item, BOOL fByPos, RECT *rcRect);
+DWORD STDCALL UserInsertMenuItem(HMENU hMenu, UINT uItem, BOOL fByPosition,
LPCMENUITEMINFOW lpmii);
+
BOOL FASTCALL
IntCleanupMenus(struct _EPROCESS *Process, PW32PROCESS Win32Process);
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] Wed Apr 2 21:13:34
2008
@@ -7,5 +7,6 @@
#define W32PF_CREATEDWINORDC (0x0004)
ULONG FASTCALL IntSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT
fWinIni);
+DWORD STDCALL IntGetQueueStatus(BOOL ClearChanges);
#endif /* __WIN32K_MISC_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callproc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/callproc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/callproc.c [iso-8859-1] Wed Apr 2
21:13:34 2008
@@ -130,31 +130,3 @@
return TRUE;
}
-
-BOOL NTAPI
-NtUserDereferenceWndProcHandle(IN HANDLE wpHandle,
- OUT PWNDPROC_INFO wpInfo)
-{
- BOOL Ret = FALSE;
-
- UserEnterShared();
-
- _SEH_TRY
- {
- ProbeForWrite(wpInfo,
- sizeof(WNDPROC_INFO),
- sizeof(ULONG));
-
- Ret = UserGetCallProcInfo(wpHandle,
- wpInfo);
- }
- _SEH_HANDLE
- {
- SetLastWin32Error(_SEH_GetExceptionCode());
- }
- _SEH_END;
-
- UserLeave();
-
- return Ret;
-}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] Wed Apr 2
21:13:34 2008
@@ -746,48 +746,6 @@
return ret;
}
-UINT STDCALL
-NtUserRegisterClipboardFormat(PUNICODE_STRING FormatName)
-{
- UINT ret = 0;
- UNICODE_STRING cFormatName = {0};
-
- if (FormatName == NULL)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return ret;
- }
-
- UserEnterExclusive();
-
- _SEH_TRY
- {
- cFormatName = ProbeForReadUnicodeString(FormatName);
-
- if (cFormatName.Length > 0)
- {
- ret = (UINT)IntAddAtom(cFormatName.Buffer);
- //RtlFreeUnicodeString(&cFormatName);
- }
- else
- {
- SetLastWin32Error(ERROR_INVALID_NAME);
- _SEH_LEAVE;
- }
-
- }
- _SEH_HANDLE
- {
- SetLastNtError(_SEH_GetExceptionCode());
- }
- _SEH_END;
-
- UserLeave();
-
- return ret;
-}
-
-
HWND STDCALL
NtUserGetClipboardOwner(VOID)
{
@@ -1107,11 +1065,9 @@
}
UINT STDCALL
-NtUserEnumClipboardFormats(UINT uFormat)
+IntEnumClipboardFormats(UINT uFormat)
{
UINT ret = 0;
-
- UserEnterShared();
if (intIsClipboardOpenByMe())
{
@@ -1162,8 +1118,6 @@
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
}
- UserLeave();
-
return ret;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/focus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -386,88 +386,67 @@
}
+HWND STDCALL
+NtUserSetActiveWindow(HWND hWnd)
+{
+ USER_REFERENCE_ENTRY Ref;
+ DECLARE_RETURN(HWND);
+
+ DPRINT("Enter NtUserSetActiveWindow(%x)\n", hWnd);
+ UserEnterExclusive();
+
+ if (hWnd)
+ {
+ PWINDOW_OBJECT Window;
+ PUSER_MESSAGE_QUEUE ThreadQueue;
+ HWND hWndPrev;
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ RETURN( 0);
+ }
+
+ ThreadQueue =
(PUSER_MESSAGE_QUEUE)PsGetCurrentThreadWin32Thread()->MessageQueue;
+
+ if (Window->MessageQueue != ThreadQueue)
+ {
+ SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
+ RETURN( 0);
+ }
+
+ UserRefObjectCo(Window, &Ref);
+ hWndPrev = co_IntSetActiveWindow(Window);
+ UserDerefObjectCo(Window);
+
+ RETURN( hWndPrev);
+ }
+ else
+ {
+ RETURN( co_IntSetActiveWindow(0));
+ }
+
+CLEANUP:
+ DPRINT("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
/*
* @implemented
*/
HWND STDCALL
-NtUserGetActiveWindow(VOID)
-{
- DECLARE_RETURN(HWND);
-
- DPRINT("Enter NtUserGetActiveWindow\n");
- UserEnterShared();
-
- RETURN( UserGetActiveWindow());
-
-CLEANUP:
- DPRINT("Leave NtUserGetActiveWindow, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-HWND STDCALL
-NtUserSetActiveWindow(HWND hWnd)
-{
- USER_REFERENCE_ENTRY Ref;
- DECLARE_RETURN(HWND);
-
- DPRINT("Enter NtUserSetActiveWindow(%x)\n", hWnd);
- UserEnterExclusive();
-
- if (hWnd)
- {
- PWINDOW_OBJECT Window;
- PUSER_MESSAGE_QUEUE ThreadQueue;
- HWND hWndPrev;
-
- if (!(Window = UserGetWindowObject(hWnd)))
- {
- RETURN( 0);
- }
-
- ThreadQueue =
(PUSER_MESSAGE_QUEUE)PsGetCurrentThreadWin32Thread()->MessageQueue;
-
- if (Window->MessageQueue != ThreadQueue)
- {
- SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
- RETURN( 0);
- }
-
- UserRefObjectCo(Window, &Ref);
- hWndPrev = co_IntSetActiveWindow(Window);
- UserDerefObjectCo(Window);
-
- RETURN( hWndPrev);
- }
- else
- {
- RETURN( co_IntSetActiveWindow(0));
- }
-
-CLEANUP:
- DPRINT("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-/*
- * @implemented
- */
-HWND STDCALL
-NtUserGetCapture(VOID)
+IntGetCapture(VOID)
{
PUSER_MESSAGE_QUEUE ThreadQueue;
DECLARE_RETURN(HWND);
- DPRINT("Enter NtUserGetCapture\n");
- UserEnterShared();
+ DPRINT("Enter IntGetCapture\n");
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetCurrentThreadWin32Thread()->MessageQueue;
RETURN( ThreadQueue ? ThreadQueue->CaptureWindow : 0);
CLEANUP:
- DPRINT("Leave NtUserGetCapture, ret=%i\n",_ret_);
- UserLeave();
+ DPRINT("Leave IntGetCapture, ret=%i\n",_ret_);
END_CLEANUP;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -1613,7 +1613,7 @@
* @implemented
*/
DWORD STDCALL
-NtUserInsertMenuItem(
+UserInsertMenuItem(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
@@ -1624,7 +1624,7 @@
ROSMENUITEMINFO ItemInfo;
DECLARE_RETURN(DWORD);
- DPRINT("Enter NtUserInsertMenuItem\n");
+ DPRINT("Enter UserInsertMenuItem\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@@ -1662,7 +1662,7 @@
RETURN( FALSE);
CLEANUP:
- DPRINT("Leave NtUserInsertMenuItem, ret=%i\n",_ret_);
+ DPRINT("Leave UserInsertMenuItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@@ -2444,10 +2444,13 @@
LPMENUITEMINFOW lpmii,
PUNICODE_STRING lpszCaption)
{
+
+ /* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
+ if bInsert == TRUE call NtUserInsertMenuItem() else NtUserSetMenuItemInfo() */
+
+ if (bInsert) return UserInsertMenuItem(hMenu, uItem, fByPosition, lpmii);
+
UNIMPLEMENTED
- /* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
- if bInsert == TRUE call NtUserInsertMenuItem() else NtUserSetMenuItemInfo()
- */
return 0;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed Apr 2
21:13:34 2008
@@ -1797,14 +1797,13 @@
}
DWORD STDCALL
-NtUserGetQueueStatus(BOOL ClearChanges)
+IntGetQueueStatus(BOOL ClearChanges)
{
PUSER_MESSAGE_QUEUE Queue;
DWORD Result;
DECLARE_RETURN(DWORD);
- DPRINT("Enter NtUserGetQueueStatus\n");
- UserEnterExclusive();
+ DPRINT("Enter IntGetQueueStatus\n");
Queue = PsGetCurrentThreadWin32Thread()->MessageQueue;
@@ -1814,11 +1813,10 @@
Queue->ChangedBits = 0;
}
- RETURN( Result);
+ RETURN(Result);
CLEANUP:
- DPRINT("Leave NtUserGetQueueStatus, ret=%i\n",_ret_);
- UserLeave();
+ DPRINT("Leave IntGetQueueStatus, ret=%i\n",_ret_);
END_CLEANUP;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -41,10 +41,15 @@
case THREADSTATE_FOCUSWINDOW:
RETURN( (DWORD)IntGetThreadFocusWindow());
+ case THREADSTATE_CAPTUREWINDOW:
+ /* FIXME should use UserEnterShared */
+ RETURN( (DWORD)IntGetCapture());
case THREADSTATE_PROGMANWINDOW:
RETURN( (DWORD)GetW32ThreadInfo()->Desktop->hProgmanWindow);
case THREADSTATE_TASKMANWINDOW:
RETURN( (DWORD)GetW32ThreadInfo()->Desktop->hTaskManWindow);
+ case THREADSTATE_ACTIVEWINDOW:
+ RETURN ( (DWORD)UserGetActiveWindow());
}
RETURN( 0);
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] Wed Apr 2
21:13:34 2008
@@ -245,10 +245,7 @@
case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
RETURN( (DWORD)IntSetCaretBlinkTime((UINT)Param));
-/*
- case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
- RETURN( (DWORD)NtUserEnumClipboardFormats((UINT)Param));
-*/
+
case ONEPARAM_ROUTINE_GETWINDOWINSTANCE:
{
PWINDOW_OBJECT Window;
@@ -391,6 +388,13 @@
case ONEPARAM_ROUTINE_REALIZEPALETTE:
RETURN (UserRealizePalette((HDC) Param));
+
+ case ONEPARAM_ROUTINE_GETQUEUESTATUS:
+ RETURN (IntGetQueueStatus((BOOL) Param));
+
+ case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
+ /* FIXME: Should use UserEnterShared */
+ RETURN(IntEnumClipboardFormats(Param));
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(),
Param=0x%x\n",
Routine, Param);
@@ -870,6 +874,13 @@
DWORD Param,
DWORD Routine)
{
+
+ switch (Routine)
+ {
+ case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER:
+ return IntKillTimer(hWnd, (UINT_PTR)Param, TRUE);
+ }
+
UNIMPLEMENTED;
return 0;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Wed Apr 2 21:13:34
2008
@@ -268,24 +268,4 @@
}
-BOOL
-STDCALL
-NtUserKillSystemTimer(
- HWND hWnd,
- UINT_PTR uIDEvent
-)
-{
- DECLARE_RETURN(BOOL);
-
- DPRINT("Enter NtUserKillSystemTimer\n");
- UserEnterExclusive();
-
- RETURN(IntKillTimer(hWnd, uIDEvent, TRUE));
-
-CLEANUP:
- DPRINT("Leave NtUserKillSystemTimer, ret=%i\n", _ret_);
- UserLeave();
- END_CLEANUP;
-}
-
/* EOF */
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] Wed Apr 2 21:13:34
2008
@@ -2978,37 +2978,6 @@
return 0;
}
-
-
-/*
- * @unimplemented
- */
-HWND STDCALL
-NtUserGetLastActivePopup(HWND hWnd)
-{
- /*
- * This code can't work, because hWndLastPopup member of WINDOW_OBJECT is
- * not changed anywhere.
- * -- Filip, 01/nov/2003
- */
-#if 0
- PWINDOW_OBJECT Wnd;
- HWND hWndLastPopup;
-
- if (!(Wnd = UserGetWindowObject(hWnd)))
- {
- return NULL;
- }
-
- hWndLastPopup = Wnd->hWndLastPopup;
-
- return hWndLastPopup;
-#else
-
- return NULL;
-#endif
-}
-
DWORD
STDCALL
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] Wed Apr 2 21:13:34
2008
@@ -681,20 +681,14 @@
NtGdiSetWindowOrgEx 4
NtUserBuildMenuItemList 4
NtUserCreateCursorIconHandle 2
-NtUserDereferenceWndProcHandle 2
-NtUserEnumClipboardFormats 1
-NtUserGetActiveWindow 0
-NtUserGetCapture 0
NtUserGetClassLong 3
NtUserGetClientOrigin 2
NtUserGetClientRect 2
NtUserGetMenuDefaultItem 3
-NtUserGetLastActivePopup 1
NtUserGetLastInputInfo 1
NtUserGetMinMaxInfo 3
NtUserGetMonitorInfo 2
NtUserGetProp 2
-NtUserGetQueueStatus 1
NtUserGetScrollInfo 3
NtUserGetShellWindow 0
NtUserGetSystemMetrics 1
@@ -702,8 +696,6 @@
NtUserGetWindowLong 3
NtUserGetWindowRect 2
NtUserGetWindowThreadProcessId 2
-NtUserInsertMenuItem 4
-NtUserKillSystemTimer 2
NtUserManualGuiCheck 1
NtUserMenuInfo 3
NtUserMenuItemInfo 5
@@ -711,7 +703,6 @@
NtUserMonitorFromRect 2
NtUserMonitorFromWindow 2
NtUserRegisterClassEx 6
-NtUserRegisterClipboardFormat 1
NtUserSendMessage 5
NtUserSendMessageTimeout 8
NtUserSendNotifyMessage 4