Changes based on Gunnar Andr Dalsnes Thread & Process Id patch

svn path=/trunk/; revision=5296
This commit is contained in:
James Tabor 2003-07-28 01:22:28 +00:00
parent 3b66543ecb
commit d3b4f0a838

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.69 2003/07/27 11:54:42 dwelch Exp $ /* $Id: window.c,v 1.70 2003/07/28 01:22:28 jimtabor Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1475,12 +1475,7 @@ NtUserMoveWindow(
DWORD STDCALL DWORD STDCALL
NtUserQueryWindow(HWND hWnd, DWORD Index) NtUserQueryWindow(HWND hWnd, DWORD Index)
{ {
/*
W32kGetWndObj uses PsGetWin32Process() which came from
PsGetCurrentProcess() made from PsGetCurrentThread().
What would happen if hWnd was under a different EThread
all togeather?
*/
PWINDOW_OBJECT Window = W32kGetWindowObject(hWnd); PWINDOW_OBJECT Window = W32kGetWindowObject(hWnd);
if(Window == NULL) return((DWORD)NULL); if(Window == NULL) return((DWORD)NULL);
@ -1490,10 +1485,10 @@ PWINDOW_OBJECT Window = W32kGetWindowObject(hWnd);
switch(Index) switch(Index)
{ {
case 0x00: case 0x00:
return((DWORD)PsGetCurrentProcessId()); return((DWORD)Window->OwnerThread->ThreadsProcess->UniqueProcessId);
case 0x01: case 0x01:
return((DWORD)PsGetCurrentThreadId()); return((DWORD)Window->OwnerThread->Cid.UniqueThread);
default: default:
return((DWORD)NULL); return((DWORD)NULL);