![]() |
SetHandlers() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: AsyncSocket.h |
static BOOL SetHandlers();
Create our handlers
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)
![]() |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |