![]() |
SetHandlers() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: AsyncSocket.h |
Declarationstatic BOOL SetHandlers();
DescriptionCreate our handlers
Function Body
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)
See Also
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. |