Class CSocketThreadManager::
SpawnThreads()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: SocketThreadNext page: Custom Code in Header Before Includes    Show member index
Private Function Declared in:
SocketThreadManager.h

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

void SpawnThreads();

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

Spawn the threads

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

try
{
    //Start creating threads
    //Allocate the thread structure
    m_pThreadData=new ThreadData[m_iThreadCount];

    //And initialize it
    memset(m_pThreadData,0,sizeof(ThreadData)*m_iThreadCount);

    //Start spawning
    for (int iCounter=0;iCounter<m_iThreadCount;++iCounter)
    {
        //Set our instance
        m_pThreadData[iCounter].hInstance=m_hInstance;

        //And create it
        m_pThreadData[iCounter].hThreadHandle=CreateThread(NULL,
                                                           0,
                                                           SocketThread,
                                                           (LPVOID)(m_pThreadData+iCounter),
                                                           0,
                                                           &m_pThreadData[iCounter].dwThreadID);

        //Check the thread has been created
        if (!m_pThreadData[iCounter].hThreadHandle)
        {
            //Report the error
            ReportError("SpawnThreads","Failed to create thread!");
            return;
        }
    }
}
ERROR_HANDLER("SpawnThreads")

'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: 24 Apr 2001.