为什么单步调试到 session->OpenURL 就会出现unhandled exception in **.exe(wininet.dll):0xc0000005 access violation
UINT MAXBUF=5024;
CStdioFile *pf;
CInternetSession *session=new CInternetSession();
int charCnt;
char buf[5024];
try
{
pf = session->OpenURL("http://www.163.com/find/find.asp"); //单步调试到这里就出错;无法进行下去 }
catch(CInternetException *e)
{
MessageBox("11");
}
charCnt = pf->Read(buf,MAXBUF);
buf[charCnt] = '\0';
CStdioFile *pf;
CInternetSession *session=new CInternetSession();
int charCnt;
char buf[5024];
try
{
pf = session->OpenURL("http://www.163.com/find/find.asp"); //单步调试到这里就出错;无法进行下去 }
catch(CInternetException *e)
{
MessageBox("11");
}
charCnt = pf->Read(buf,MAXBUF);
buf[charCnt] = '\0';
比如http://www.163.com/index.html
或者是你的网络不稳定吧。这句肯定没问题的