![]() |
SetHandlers() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: AsyncSocket.h |
Declarationstatic BOOL SetHandlers();
DescriptionCreate our handlers
Function Body
try
{
//First create the window class
if (!m_Window)
if (!RegisterWindow())
{
//Error
ReportStaticError(CAsyncSocket_Class,"SetHandlers","Error registering the window, please check API error!");
return FALSE;
}
else
//Check if we need to register a local window, or a thread manager ?
if (CSpoofBase::IsMultiThreaded())
//Initialize as multithreaded
m_pThreadManager=new CSocketThreadManager(CSpoofBase::GetNumberOfThreads(),m_Instance);
else
{
//Run on main thread
m_WindowHandle=CreateWindowEx(0,CAsyncSocket_Class,SOCKET_WINDOW_NAME,
WS_OVERLAPPED,0,0,0,0,0,NULL,GetInstance(),NULL);
//Check the value of the window
if (!m_WindowHandle)
{
//Error
ReportStaticError(CAsyncSocket_Class,"SetHandlers","Error creating the window, please check API error!");
return FALSE;
}
else
//We have a window
m_Window=TRUE;
}
//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 © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |