Discussion:
Error code: 12019
(too old to reply)
Isold
2007-12-20 07:09:16 UTC
Permalink
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??????
}
Volodymyr Shcherbyna
2007-12-20 08:51:06 UTC
Permalink
What happens if you query status when INTERNET_STATUS_RESPONSE_RECEIVED
arrives ? (change INTERNET_STATUS_REQUEST_COMPLETE to
INTERNET_STATUS_RESPONSE_RECEIVED)
--
Volodymyr
Post by Isold
This error occured when i call HttpQueryInfo funcation.
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??????
}
Volodymyr Shcherbyna
2007-12-28 07:30:00 UTC
Permalink
Isold,

Did this suggestion helped?
--
Volodymyr
NG tips:
http://msmvps.com/blogs/v_scherbina/pages/microsoft-newsgroups-tips.aspx
Post by Volodymyr Shcherbyna
What happens if you query status when INTERNET_STATUS_RESPONSE_RECEIVED
arrives ? (change INTERNET_STATUS_REQUEST_COMPLETE to
INTERNET_STATUS_RESPONSE_RECEIVED)
--
Volodymyr
Post by Isold
This error occured when i call HttpQueryInfo funcation.
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??????
}
Continue reading on narkive:
Loading...