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

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

HWND GetWindowHandle();

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

Get the window handle

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

try
{
    //Shared resource
    m_pCSection->Enter();

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

        //Check it's valid
        if (!iIndex)
        {
            //Leave the critical section
            m_pCSection->Exit();

            //Quit
            return 0;
        }

        //Increase the socket count
        ++m_pThreadData[iIndex-1].iSocketCount;

    //Leave the critical section
    m_pCSection->Exit();

    return m_pThreadData[iIndex-1].hWindowHandle;
}
ERROR_HANDLER("GetWindowHandle")

//Quit from the critical section
m_pCSection->Exit();

return 0;

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

Class Overview Class Overview  |  Public base class CSpoofBase  |  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 © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.