mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:36:07 +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_ACTIVE 0x02
|
||||||
#define QUERY_WINDOW_FOCUS 0x03
|
#define QUERY_WINDOW_FOCUS 0x03
|
||||||
#define QUERY_WINDOW_ISHUNG 0x04
|
#define QUERY_WINDOW_ISHUNG 0x04
|
||||||
|
#define QUERY_WINDOW_REAL_ID 0x05
|
||||||
DWORD
|
DWORD
|
||||||
NTAPI
|
NTAPI
|
||||||
NtUserQueryWindow(
|
NtUserQueryWindow(
|
||||||
|
|
|
@ -276,6 +276,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
|
||||||
}
|
}
|
||||||
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
||||||
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
|
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
|
||||||
|
Win32Thread->pEThread = Thread;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -4161,17 +4161,20 @@ DWORD APIENTRY
|
||||||
NtUserQueryWindow(HWND hWnd, DWORD Index)
|
NtUserQueryWindow(HWND hWnd, DWORD Index)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Window;
|
PWINDOW_OBJECT Window;
|
||||||
|
PWND pWnd;
|
||||||
DWORD Result;
|
DWORD Result;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserQueryWindow\n");
|
DPRINT("Enter NtUserQueryWindow\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)) || !Window->Wnd)
|
||||||
{
|
{
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pWnd = Window->Wnd;
|
||||||
|
|
||||||
switch(Index)
|
switch(Index)
|
||||||
{
|
{
|
||||||
case QUERY_WINDOW_UNIQUE_PROCESS_ID:
|
case QUERY_WINDOW_UNIQUE_PROCESS_ID:
|
||||||
|
@ -4194,6 +4197,9 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
||||||
Result = (DWORD)MsqIsHung(Window->MessageQueue);
|
Result = (DWORD)MsqIsHung(Window->MessageQueue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case QUERY_WINDOW_REAL_ID:
|
||||||
|
Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Result = (DWORD)NULL;
|
Result = (DWORD)NULL;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue