![]() |
SetHandlers() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: AsyncSocket.h |
static BOOL SetHandlers();
Create our handlers
try { //First create the window class if (!m_bWindow) if (!RegisterWindow()) { //Report it ReportStaticError(CAsyncSocket_Class,"SetHandlers","Error registering the window, please check API error!"); //Exit return FALSE; } else //Window is OK m_bWindow=TRUE; //Do we have a manager ? if (!m_pThreadManager) { //How many threads we want int iThreads; if (CSpoofBase::IsMultiThreaded()) iThreads=CSpoofBase::GetNumberOfThreads(); else iThreads=1; //Initialize as multithreaded m_pThreadManager=new CSocketThreadManager(m_hInstance); if (!m_pThreadManager->Initialize(iThreads, CAsyncSocket_Class)) { //Report it ReportStaticError(CAsyncSocket_Class,"SetHandlers","Failed to initialize the thread manager!"); //Delete it delete m_pThreadManager; m_pThreadManager=NULL; //Exit return FALSE; } } //Created !! //Success return TRUE; } ERROR_HANDLER_STATIC_RETURN(CAsyncSocket_Class,"CAsyncSocket",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |