Class CSocketThreadManager::
GetWindowHandle()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: GetMostAvailableThreadNext page: Initialize    Show member index
Public Function Declared in:
SocketThreadManager.h

'Declaration' icon -- Shortcut to top of page. Declaration

HWND GetWindowHandle(
    BOOL bTimeout=FALSE);

'Description' icon -- Shortcut to top of page. Description

Get the most available window handle

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Shared resource
    CCriticalAutoRelease aRelease(m_pCSection);

    //Get the freeiest index
    int iIndex;
    iIndex=GetMostAvailableThread();

    //Check it's valid
    if (!iIndex)
        //Quit
        return 0;

    //Check what to increase
    if (bTimeout)
        ++m_pThreadData[iIndex-1].iTimeoutCount;
    else
        //Increase the socket count
        ++m_pThreadData[iIndex-1].iSocketCount;

    //Done
    return m_pThreadData[iIndex-1].hWindowHandle;
}
ERROR_HANDLER_RETURN("GetWindowHandle",0)

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CErrorHandler  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.