vs_integration/src/SocketConnection.cpp
//-----------------------------------------------------------------------------
// This private function will start windows socket support and will create 
// invisible window which will receve all socket messages.
//-----------------------------------------------------------------------------
This private function will start windows socket support and will create
invisible window which will receve all socket messages.
This private function will start windows socket support and will create invisible window which will receve all socket messages .
void SocketConnection::InitializeWindowsSocketSupport(void) {
    WORD wVersionRequested;  
    WSADATA wsaData; 
    int err; 
    m_ProxyHwnd       = NULL;
    wVersionRequested = MAKEWORD(1, 1); 
    err               = WSAStartup(wVersionRequested, &wsaData); 
    if (err != 0) {
      return;
    }
    WNDCLASS socket_window;
    socket_window.style         = 0;
    socket_window.lpfnWndProc   = SocketWindowProc;
    socket_window.cbClsExtra    = 0;
    socket_window.cbWndExtra    = 0;
    socket_window.hInstance     = GetModuleHandle(NULL);
    socket_window.hIcon         = NULL;
    socket_window.hCursor       = NULL;
    socket_window.hbrBackground = NULL;
    socket_window.lpszMenuName  = NULL;
    socket_window.lpszClassName = "_MSDEV_SOCKET_WIN";
    ATOM cl   = RegisterClass(&socket_window);
    m_ProxyHwnd = CreateWindow("_MSDEV_SOCKET_WIN", "_MSDEV_SOCKET_WIN", 0, 0, 0, 0, 0,
			      NULL, NULL, GetModuleHandle(NULL), NULL);
}
void SocketConnection :: InitializeWindowsSocketSupport ( void ) { WORD wVersionRequested ; WSADATA wsaData ; int err ; m_ProxyHwnd = NULL ; wVersionRequested = MAKEWORD ( 1 , 1 ) ; err = WSAStartup ( wVersionRequested , & wsaData ) ; if ( err != 0 ) { return ; } WNDCLASS socket_window ; socket_window . style = 0 ; socket_window . lpfnWndProc = SocketWindowProc ; socket_window . cbClsExtra = 0 ; socket_window . cbWndExtra = 0 ; socket_window . hInstance = GetModuleHandle ( NULL ) ; socket_window . hIcon = NULL ; socket_window . hCursor = NULL ; socket_window . hbrBackground = NULL ; socket_window . lpszMenuName = NULL ; socket_window . lpszClassName = " " ; ATOM cl = RegisterClass ( & socket_window ) ; m_ProxyHwnd = CreateWindow ( " " , " " , 0 , 0 , 0 , 0 , 0 , NULL , NULL , GetModuleHandle ( NULL ) , NULL ) ; }
This private function will start windows socket support and will create
invisible window which will receve all socket messages.
This private function will start windows socket support and will create invisible window which will receve all socket messages .