mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 20:47:21 +00:00
- Add query window for real process Id.
svn path=/trunk/; revision=43043
This commit is contained in:
parent
1977bb8a55
commit
848f926415
3 changed files with 9 additions and 1 deletions
|
@ -2301,6 +2301,7 @@ NtUserQueryUserCounters(
|
|||
#define QUERY_WINDOW_ACTIVE 0x02
|
||||
#define QUERY_WINDOW_FOCUS 0x03
|
||||
#define QUERY_WINDOW_ISHUNG 0x04
|
||||
#define QUERY_WINDOW_REAL_ID 0x05
|
||||
DWORD
|
||||
NTAPI
|
||||
NtUserQueryWindow(
|
||||
|
|
|
@ -276,6 +276,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
|
|||
}
|
||||
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
||||
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
|
||||
Win32Thread->pEThread = Thread;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -4161,17 +4161,20 @@ DWORD APIENTRY
|
|||
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)
|
||||
{
|
||||
case QUERY_WINDOW_UNIQUE_PROCESS_ID:
|
||||
|
@ -4194,6 +4197,9 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
|||
Result = (DWORD)MsqIsHung(Window->MessageQueue);
|
||||
break;
|
||||
|
||||
case QUERY_WINDOW_REAL_ID:
|
||||
Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
|
||||
|
||||
default:
|
||||
Result = (DWORD)NULL;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue