CInternetSession * session;//如何才能设置超时时间?
//CInternetSession类提供的设置超时的方法好像不起作用。session.OpenURL(myurl);
//CInternetSession类提供的设置超时的方法好像不起作用。session.OpenURL(myurl);
解决方案 »
- 自绘的标题栏问题?
- h264码流---如何计算总帧数
- 除了gethostbyname()之外,还有什么可以获得服务器信息
- 为什么我做的ActiveX在本地网页上显示正常,放到服务器上就不能使用啊?
- Select、Printf、Cout 十分困惑
- 请问为什么我DoModal()显示一个窗体它不调用窗体的OnInitDialog()
- 请教:网页里的ActiveX能不能用SOCKET发送UDP包?
- 求救,再线等待,50分
- 如何用API实现工具栏?
- 我只是想通过BHO捕获用户对IE的“另存为”操作,有没有方法?
- 奇怪!internetsession 为什么一直在callback 我设置了enablestatuscallback,但也设置了timeout
- 急,在线求教,用ChangeDisplaySettings将1024*768改为800*600后,怎么任务栏不见了,怎样不让任务栏消失
SYMPTOMS
Calling InternetSetOption (or MFC CHttpFile::SetOption) with INTERNET_OPTION_SEND_TIMEOUT or INTERNET_OPTION_CONNECT_TIMEOUT does not set the specified timeout values.
RESOLUTION
To work around the problem you can use asynchronous WinInet mode, which prevents the WinInet function call from blocking while waiting for a connection. Please see the Internet Client SDK documentation for more information about using WinInet asynchronously. Another solution may be to create a second thread that would call blocking WinInet API. Closing the handle from within the original thread will cancel blocking API in the second thread. Please see documentation for InternetCloseHandle for more details.