18,356
社区成员
发帖
与我相关
我的任务
分享
m_hRequest = ::InternetOpenUrl(m_hInstance,
queryString,
NULL, //szHeader,
0, //lstrlen(szHeader),
INTERNET_FLAG_RELOAD |
INTERNET_FLAG_PRAGMA_NOCACHE |
INTERNET_FLAG_NO_CACHE_WRITE,
reinterpret_cast<unsigned long>(this));
switch (dwInternetStatus)
{
case INTERNET_STATUS_HANDLE_CREATED:
if(ERROR_SUCCESS == res->dwError)
cpContext->m_hRequest = (HINTERNET)(res->dwResult);
break;
case INTERNET_STATUS_REQUEST_COMPLETE:
fp = fopen(strFile.GetBuffer(),"a");
if (fp)
{
temp.Format(_T("%d"),res->dwError);
fputs("\r\n", fp);
fputs("+++++++++++++++++++++++++++++++++++", fp);
fputs("\r\n", fp);
fputs(temp.GetBuffer(), fp);
fclose(fp);
debug.ReleaseBuffer();
}
strFile.ReleaseBuffer();
if (ERROR_SUCCESS == res->dwError)
{
if (cpContext->m_hRequest == NULL)
{
cpContext->m_hRequest = (HINTERNET)(res->dwResult);
}
::SetEvent(cpContext->m_WaitEvent);
}
break;
}