Ignore:
Timestamp:
Feb 26, 2002, 12:12:26 PM (23 years ago)
Author:
sandervl
Message:

GetWindowThreadProcessId changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/window.cpp

    r7890 r8016  
    1 /* $Id: window.cpp,v 1.120 2002-02-12 18:07:21 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.121 2002-02-26 11:12:26 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    16341634                    return hwnd;
    16351635                }
     1636                hwnd = GetWindow(hwnd, GW_HWNDNEXT);
     1637#if 0
    16361638                //try siblings
    16371639                HWND hwndSibling;
     
    16511653                }
    16521654                hwnd = hwndParent;
     1655#endif
    16531656        }
    16541657    }
     
    18711874//******************************************************************************
    18721875//******************************************************************************
    1873 DWORD WIN32API GetWindowThreadProcessId(HWND hwnd,  PDWORD lpdwProcessId)
    1874 {
    1875     DWORD dwThreadId;
    1876 
    1877     dwThreadId = O32_GetWindowThreadProcessId(Win32ToOS2Handle(hwnd), lpdwProcessId);
    1878     if(dwThreadId == 0) {
    1879         dprintf(("!WARNING! GetWindowThreadProcessId %x failed!!", hwnd));
    1880     }
     1876DWORD WIN32API GetWindowThreadProcessId(HWND hwnd, PDWORD lpdwProcessId)
     1877{
     1878  Win32BaseWindow *window;
     1879  DWORD dwThreadId;
     1880
     1881    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     1882    if(!window) {
     1883        dprintf(("GetWindowThreadProcessId, window %x not found", hwnd));
     1884        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     1885        return 0;
     1886    }
     1887    dwThreadId = window->getThreadId();
     1888    if(lpdwProcessId) {
     1889        *lpdwProcessId = window->getProcessId();
     1890    }
     1891    RELEASE_WNDOBJ(window);
     1892   
    18811893    return dwThreadId;
    18821894}
Note: See TracChangeset for help on using the changeset viewer.