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

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

BOOL Initialize(
    unsigned long ulThreadCount,
    LPCSTR lpClassName);

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

Initialize the thread manager

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

try
{
    //Are we initialized?
    if (m_bInitialized)
    {
        //Report it
        ReportError("Initialize","Already initialized!");

        //Exit
        return FALSE;
    }

    //Check the number of threads
    if (ulThreadCount>MAX_THREADS)
    {
        //Report it
        ReportError("Initialize","Too many threads to spawn!");

        //Exit
        return FALSE;
    }

    //Check the number of threads
    if (!ulThreadCount)
    {
        //Report it
        ReportError("Initialize","Can't have zero threads!");

        //Exit
        return FALSE;
    }

    //Save the count
    m_ulThreadCount=ulThreadCount;

    //Try to spawn the threads
    return SpawnThreads(lpClassName);
}
ERROR_HANDLER_RETURN("Initialize",FALSE)

'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.