在Internetread文件(WinInet)中设置超时间隔 [英] set time out interval in internetread file(WinInet)
本文介绍了在Internetread文件(WinInet)中设置超时间隔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨...
我正在使用WinInet的Internet功能.当我使用Internet读取文件时,它会超时.因此,我想从我的程序中设置时间间隔.因此,任何一个PLZ都可以针对同一时间提供帮助...
hi...
i am using internet functions of WinInet. when i use internet read file then it is getting timed out.so i want to set the time interval from my program.so can any one plz help regarding the same......
推荐答案
调用InternetOpen()之后,
After the InternetOpen() call,
HINTERNET internet_session = InternetOpen(your.args.....);
DWORD rec_timeout = 300 * 1000; // override the 30 second timeout
InternetSetOption(internet_session, INTERNET_OPTION_RECEIVE_TIMEOUT, &rec_timeout, sizeof(rec_timeout));
这篇关于在Internetread文件(WinInet)中设置超时间隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文