추가된소스
BOOL CACE_MFCApp::InitInstance()
{
        .....

        /////////////////////////////////////////////////////////////////
        // 추가
        WORD                    wVersionRequested;
        WSADATA                 wsaData;
        int             err = 0;

        wVersionRequested = MAKEWORD( 2, 2 );
        if( WSAStartup( wVersionRequested, &wsaData ) != 0 )
                return FALSE;

        ACE::init();
        /////////////////////////////////////////////////////////////////

        CACE_MFCDlg dlg;
        m_pMainWnd = &dlg;
        INT_PTR nResponse = dlg.DoModal();
        if (nResponse == IDOK)
        {
                // TODO: Place code here to handle when the dialog is
                //  dismissed with OK
        }
        else if (nResponse == IDCANCEL)
        {
                // TODO: Place code here to handle when the dialog is
                //  dismissed with Cancel
        }

        /////////////////////////////////////////////////////////////////
        // 추가
        ACE::fini();
        WSACleanup( );
        /////////////////////////////////////////////////////////////////

        // Since the dialog has been closed, return FALSE so that we exit the
        //  application, rather than start the application's message pump.
        return FALSE;
}

+ Recent posts