mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +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;
|
if (!pWnd) return Ret;
|
||||||
|
|
||||||
ti = pWnd->ti;
|
ti = SharedPtrToUser(pWnd->ti);
|
||||||
|
|
||||||
if ( ti )
|
if ( ti )
|
||||||
{
|
{
|
||||||
if ( ti == GetW32ThreadInfo() )
|
if ( ti == GetW32ThreadInfo() )
|
||||||
{ // We are current.
|
{ // We are current.
|
||||||
|
//FIXME("Current!\n");
|
||||||
if ( lpdwProcessId )
|
if ( lpdwProcessId )
|
||||||
*lpdwProcessId = (DWORD)NtCurrentTeb()->Cid.UniqueProcess;
|
*lpdwProcessId = (DWORD)NtCurrentTeb()->Cid.UniqueProcess;
|
||||||
Ret = (DWORD)NtCurrentTeb()->Cid.UniqueThread;
|
Ret = (DWORD)NtCurrentTeb()->Cid.UniqueThread;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Ask kernel for info.
|
{ // Ask kernel for info.
|
||||||
|
//FIXME("Kernel call!\n");
|
||||||
if ( lpdwProcessId )
|
if ( lpdwProcessId )
|
||||||
*lpdwProcessId = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_PROCESS_ID);
|
*lpdwProcessId = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_PROCESS_ID);
|
||||||
Ret = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_THREAD_ID);
|
Ret = NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_THREAD_ID);
|
||||||
|
|
Loading…
Reference in a new issue