Author: jimtabor
Date: Mon Sep 14 00:06:58 2009
New Revision: 43043
URL:
http://svn.reactos.org/svn/reactos?rev=43043&view=rev
Log:
- Add query window for real process Id.
Modified:
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/main/dllmain.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
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] Mon Sep 14 00:06:58 2009
@@ -2301,6 +2301,7 @@
#define QUERY_WINDOW_ACTIVE 0x02
#define QUERY_WINDOW_FOCUS 0x03
#define QUERY_WINDOW_ISHUNG 0x04
+#define QUERY_WINDOW_REAL_ID 0x05
DWORD
NTAPI
NtUserQueryWindow(
Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Mon Sep 14 00:06:58
2009
@@ -276,6 +276,7 @@
}
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
+ Win32Thread->pEThread = Thread;
}
else
{
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] Mon Sep 14 00:06:58
2009
@@ -4161,16 +4161,19 @@
NtUserQueryWindow(HWND hWnd, DWORD Index)
{
PWINDOW_OBJECT Window;
+ PWND pWnd;
DWORD Result;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserQueryWindow\n");
UserEnterShared();
- if (!(Window = UserGetWindowObject(hWnd)))
+ if (!(Window = UserGetWindowObject(hWnd)) || !Window->Wnd)
{
RETURN( 0);
}
+
+ pWnd = Window->Wnd;
switch(Index)
{
@@ -4193,6 +4196,9 @@
case QUERY_WINDOW_ISHUNG:
Result = (DWORD)MsqIsHung(Window->MessageQueue);
break;
+
+ case QUERY_WINDOW_REAL_ID:
+ Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
default:
Result = (DWORD)NULL;