CInternetException = 2 ???
От: CyberDemon Россия  
Дата: 28.02.14 15:50
Оценка:
Раз в тыщу лет у некоторых юзеров бывает косяк:
вылезает CInternetException со значением 2 (The system cannot find the file specified).
    static char hdrs[] ="Content-Type: application/x-www-form-urlencoded";

    CInternetSession inet;
    BOOL ok = TRUE;
    DWORD dwRet = 0;
    CHttpConnection *pConnection = NULL;
    CHttpFile *pFile = NULL;
    INTERNET_PORT port = use_https ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;

    try
    {
        pConnection = inet.GetHttpConnection(SERVER, port);
        if (!pConnection)
        {
            m_sErrMsg = L"Cannot establish connection";
            throw 0;
        }

        DWORD iflag;
        iflag = INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD;
        if (use_https)
            iflag |= INTERNET_FLAG_SECURE;    //  the ignore flag is actually ignored by wininet!

        pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET, path_params, NULL, 1, NULL, NULL, iflag);

        ok = pFile->SendRequest();
    }
    catch (CInternetException* pEx)
    {
        ok = FALSE; // set TRUE below if retry is OK
        dwRet = pEx->m_dwError;
        pEx->Delete();
        if (dwRet == ERROR_INTERNET_INVALID_CA || dwRet == ERROR_INTERNET_SEC_CERT_REV_FAILED)
        {
            // ....
        }
        else
            m_sErrMsg.Format("Unknown internet error %d\n", dwRet);

    }
    catch (CException*)
    {
    }


В может быть причина? Файрволы, прокси не мешаются, юзер клянется и божится, что все у него работает
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.