Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2007 Dec : Error code: 12019

www.cryer.info
Managed Newsgroup Archive

Error code: 12019

Subject:Error code: 12019
Posted by:"Isold" (isold.wa..@gmail.com)
Date:Wed, 19 Dec 2007 23:09:16 -0800 (PST)

This error occured when i call HttpQueryInfo funcation.

code:

static void CALLBACK InternetStatusCallback(HINTERNET hInternet,
DWORD_PTR dwContext
    , DWORD dwInternetStatus, LPVOID lpvStatusInformation, DWORD
dwStatusInformationLength)
{
     if( INTERNET_STATUS_REQUEST_COMPLETE == dwInternetStatus )
    {
        RequestComplete(
            ((INTERNET_ASYNC_RESULT*)lpvStatusInformation)->dwResult,
            ((INTERNET_ASYNC_RESULT*)lpvStatusInformation)->dwError
            );
    }
}

void Open()
{
    hInet_ = InternetOpenA(agent.c_str(), dwAccessType, lpszProxyName,
lpszProxyBypass, dwFlag);
    if(hInet_ && dwFlag & INTERNET_FLAG_ASYNC)
    {
        InternetSetStatusCallbackA(hInet_, InternetStatusCallback);
    }
}

void Connect()
{
        hConn_ = InternetConnectA(ai.get(), uc.lpszHostName,
uc.nPort,
            uc.lpszUserName, uc.lpszPassword, INTERNET_SERVICE_HTTP,
            0, (DWORD_PTR)this);
    hRequest_ = HttpOpenRequestA(hConn_, "GET", p.c_str(),
        NULL, // Version
        referrer.empty() ? NULL : referrer.c_str(), // Referrer
        szAcceptType,
        flags,
        (DWORD_PTR)this);
}

void SendRequest()
{
ret = HttpSendRequestExA(hRequest_, &ib, NULL, HSR_INITIATE,
(DWORD_PTR)this);
}

void RequestComplete(DWORD dwResult, DWORD dwError)
{
        BOOL bRet = ::HttpQueryInfoA(hRequest_, HTTP_QUERY_STATUS_CODE
            | HTTP_QUERY_FLAG_NUMBER , &dwCode, &dwSize, NULL);
        int nerror = GetLastError();////////////////error code = 12019??????
}

Replies:

www.cryer.info
Managed Newsgroup Archive