moved SetShellWindowEx() implementation into kernel space

svn path=/trunk/; revision=5494
This commit is contained in:
Martin Fuchs 2003-08-09 18:22:11 +00:00
parent f3dec73013
commit 6d16724ea7
5 changed files with 61 additions and 40 deletions

View file

@ -1,6 +1,15 @@
2003-08-09 Martin Fuchs <martin-fuchs@gmx.net> 2003-08-09 Martin Fuchs <martin-fuchs@gmx.net>
* 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 <martin-fuchs@gmx.net>
* subsys/system/explorer implemented explorer and desktop window
using shell view.
2003-08-09 Casper S. Hornstrup <chorns@users.sourceforge.net> 2003-08-09 Casper S. Hornstrup <chorns@users.sourceforge.net>

View file

@ -557,3 +557,4 @@ NtUserGetQueueStatus 1
NtUserGetParent 1 NtUserGetParent 1
NtUserGetWindow 2 NtUserGetWindow 2
NtUserGetLastActivePopup 1 NtUserGetLastActivePopup 1
NtUserGetShellWindow 0

View file

@ -1437,8 +1437,12 @@ NtUserSetScrollInfo(
DWORD DWORD
STDCALL STDCALL
NtUserSetShellWindowEx( NtUserSetShellWindowEx(
DWORD Unknown0, HWND hwndShell,
DWORD Unknown1); HWND hwndShellListView);
HWND
STDCALL
NtUserGetShellWindow();
DWORD DWORD
STDCALL STDCALL

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * 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 * @implemented
*/ */
BOOL STDCALL BOOL STDCALL
SetShellWindowEx(HWND hwndShell, HWND hwndShellListView) SetShellWindowEx(HWND hwndShell, HWND hwndShellListView)
{ {
/* test if we are permitted to change the shell window */ return NtUserSetShellWindowEx(hwndShell, hwndShellListView);
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;
} }
@ -354,4 +326,15 @@ SetShellWindow(HWND hwndShell)
return SetShellWindowEx(hwndShell, hwndShell); return SetShellWindowEx(hwndShell, hwndShell);
} }
/*
* @implemented
*/
HWND STDCALL
GetShellWindow(VOID)
{
return NtUserGetShellWindow();
}
/* EOF */ /* EOF */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1673,15 +1673,39 @@ NtUserSetLogonNotifyWindow(DWORD Unknown0)
return 0; 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 DWORD STDCALL
NtUserSetWindowFNID(DWORD Unknown0, NtUserSetWindowFNID(DWORD Unknown0,
DWORD Unknown1) DWORD Unknown1)