S.l.e!ep.¢%

像打了激速一样,以四倍的速度运转,开心的工作
简单、开放、平等的公司文化;尊重个性、自由与个人价值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

BUG: InternetSetOption Does Not Set Timeout Values

Posted on 2010-05-06 17:24 S.l.e!ep.¢% 阅读(1039) 评论(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.    

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理