Posted on 2010-05-06 17:24
S.l.e!ep.¢% 閱讀(1064)
評(píng)論(0) 編輯 收藏 引用 所屬分類:
VC
BUG:?? InternetSetOption?? Does?? Not?? Set?? Timeout?? Values??
???
?
http://support.microsoft.com/kb/q176420/??
???
???
? 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.????