mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Need shared pointer to user when comparing thread info.
svn path=/trunk/; revision=34381
This commit is contained in:
parent
5b7926d225
commit
d6ea9391da
1 changed files with 4 additions and 2 deletions
|
@ -1300,18 +1300,20 @@ GetWindowThreadProcessId(HWND hWnd,
|
|||
|
||||
if (!pWnd) return Ret;
|
||||
|
||||
ti = pWnd->ti;
|
||||
ti = SharedPtrToUser(pWnd->ti);
|
||||
|
||||
if ( ti )
|
||||
{
|
||||
if ( ti == GetW32ThreadInfo() )
|
||||
{ // We are current.
|
||||
//FIXME("Current!\n");
|
||||
if ( lpdwProcessId )
|
||||
*lpdwProcessId = (DWORD)NtCurrentTeb()->Cid.UniqueProcess;
|
||||
Ret = (DWORD)NtCurrentTeb()->Cid.UniqueThread;
|
||||
}
|
||||
else
|
||||
{ // Ask kernel for info.
|
||||
//FIXME("Kernel call!\n");
|
||||
if ( lpdwProcessId )
|
||||
*lpdwProcessId = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_PROCESS_ID);
|
||||
Ret = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_THREAD_ID);
|
||||
|
|
Loading…
Reference in a new issue