diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 9a329e5c495..2b743a28f9f 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,6 +1,15 @@ 2003-08-09 Martin Fuchs - * subsys/system/explorer implemented explorer and desktop window using shell view + * win32k/ntuser/window.c implemented NtUserSetShellWindowEx() and + introduced NtUserGetShellWindow(). + * iface/addsys/w32ksvc.db added new syscall for NtUserGetShellWindow(). + * lib/user32/misc/desktop.c: moved SetShellWindowEx() implementation + in kernal space, see NtUserSetShellWindowEx(). + +2003-08-09 Martin Fuchs + + * subsys/system/explorer implemented explorer and desktop window + using shell view. 2003-08-09 Casper S. Hornstrup diff --git a/reactos/iface/addsys/w32ksvc.db b/reactos/iface/addsys/w32ksvc.db index e86c2bba3ad..36b3f6f26fa 100644 --- a/reactos/iface/addsys/w32ksvc.db +++ b/reactos/iface/addsys/w32ksvc.db @@ -557,3 +557,4 @@ NtUserGetQueueStatus 1 NtUserGetParent 1 NtUserGetWindow 2 NtUserGetLastActivePopup 1 +NtUserGetShellWindow 0 diff --git a/reactos/include/win32k/ntuser.h b/reactos/include/win32k/ntuser.h index c399934b824..bae4a1c1444 100644 --- a/reactos/include/win32k/ntuser.h +++ b/reactos/include/win32k/ntuser.h @@ -1437,8 +1437,12 @@ NtUserSetScrollInfo( DWORD STDCALL NtUserSetShellWindowEx( - DWORD Unknown0, - DWORD Unknown1); + HWND hwndShell, + HWND hwndShellListView); + +HWND +STDCALL +NtUserGetShellWindow(); DWORD STDCALL diff --git a/reactos/lib/user32/misc/desktop.c b/reactos/lib/user32/misc/desktop.c index 0b89b937395..c941f4b32ea 100644 --- a/reactos/lib/user32/misc/desktop.c +++ b/reactos/lib/user32/misc/desktop.c @@ -1,4 +1,4 @@ -/* $Id: desktop.c,v 1.21 2003/08/09 17:08:14 mf Exp $ +/* $Id: desktop.c,v 1.22 2003/08/09 18:22:11 mf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -307,41 +307,13 @@ SwitchDesktop( } - /* globally stored handles to the shell windows */ -HWND hwndShellWindow = 0; -HWND hwndShellListView = 0; -DWORD pidShellWindow = 0; - - -/* - * @implemented - */ -HWND STDCALL -GetShellWindow(VOID) -{ - return hwndShellWindow; -} - - /* * @implemented */ BOOL STDCALL SetShellWindowEx(HWND hwndShell, HWND hwndShellListView) { - /* test if we are permitted to change the shell window */ - if (pidShellWindow && GetCurrentProcessId()!=pidShellWindow) - return FALSE; - - hwndShellWindow = hwndShell; - hwndShellListView = hwndShellListView; - - if (hwndShell) - pidShellWindow = GetCurrentProcessId(); /* request shell window for the calling process */ - else - pidShellWindow = 0; /* shell window is now free for other processes. */ - - return TRUE; + return NtUserSetShellWindowEx(hwndShell, hwndShellListView); } @@ -354,4 +326,15 @@ SetShellWindow(HWND hwndShell) return SetShellWindowEx(hwndShell, hwndShell); } + +/* + * @implemented + */ +HWND STDCALL +GetShellWindow(VOID) +{ + return NtUserGetShellWindow(); +} + + /* EOF */ diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 3cac8ae8313..1a24014b109 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.82 2003/08/09 07:09:57 jimtabor Exp $ +/* $Id: window.c,v 1.83 2003/08/09 18:22:11 mf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1673,15 +1673,39 @@ NtUserSetLogonNotifyWindow(DWORD Unknown0) return 0; } -DWORD STDCALL -NtUserSetShellWindowEx(DWORD Unknown0, - DWORD Unknown1) -{ - UNIMPLEMENTED - return 0; + /* globally stored handles to the shell windows */ +HWND hwndShellWindow = 0; +HWND hwndShellListView = 0; +DWORD pidShellWindow = 0; + +DWORD STDCALL +NtUserSetShellWindowEx(HWND hwndShell, HWND hwndShellListView) +{ + PEPROCESS my_current = IoGetCurrentProcess(); + + /* test if we are permitted to change the shell window */ + if (pidShellWindow && my_current->UniqueProcessId!=pidShellWindow) + return FALSE; + + hwndShellWindow = hwndShell; + hwndShellListView = hwndShellListView; + + if (hwndShell) + pidShellWindow = my_current->UniqueProcessId; /* request shell window for the calling process */ + else + pidShellWindow = 0; /* shell window is now free for other processes. */ + + return TRUE; } +HWND STDCALL +NtUserGetShellWindow() +{ + return hwndShellWindow; +} + + DWORD STDCALL NtUserSetWindowFNID(DWORD Unknown0, DWORD Unknown1)