|
文件: |
Query.rar |
大小: |
24KB |
下载: |
下载 | |
CInternetSession session;
m_out += _T("Trying ") +URL + _T("\r\n");
UpdateData(FALSE);
CInternetFile *file = NULL;
try
{
file = (CInternetFile *)session.OpenURL(URL);
}
catch (CInternetException* pEx)
{
file = NULL;
pEx->Delete();
}
if (file)
{
m_out += _T(" Connectiong setalished.\r\n ");
CString line;
for(int i=0; file->ReadString(line); i++)
{
m_out += line + _T("\r\n");
}
file->Close();
delete file;
}
else
{
m_out+= _T("No server found there.\r\n");
}
m_out += _T("-------------------------------------------------\r\n");
UpdateData(FALSE);
阅读(651) | 评论(1) | 转发(0) |