![]() |
InitProc() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: SpoofBase.h |
static DWORD InitProc( CGenericEvent* pExitEvent, LPVOID lpData);
Our thread proc
try { //Our data std::auto_ptr<ThreadData> pThreadData((ThreadData*)lpData); //Try to initialize the sockets BOOL bResult; bResult=InitializeSockets(pThreadData->bMultiThreaded, pThreadData->ulNumberOfThreads); //Signal the event pThreadData->pEvent->Set(); //Do we need to run a loop? if (bResult) { //Yes run a message loop MSG msg; //Set the message map to zeros memset(&msg, 0, sizeof(msg)); //Stop flag BOOL bRun; bRun=TRUE; //Start the loop while (bRun && pExitEvent->Wait(0)) { while ((bRun=pExitEvent->Wait(0)) && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } //Do we need to sleep? if (bRun) //No messages bRun=pExitEvent->Wait(1); } } //Done return TRUE; } ERROR_HANDLER_STATIC_RETURN(CSpoofBase_Class,"InitProc",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |