[問題] InternetOpenUrl 回傳 NULL
看板C_and_CPP (C/C++)作者lovepedalman (ILovePedal)時間14年前 (2011/11/23 14:41)推噓0(0推 0噓 0→)留言0則, 0人參與討論串1/1
目前這個問題在特定的網路連線才會發生
呼叫 InternetOpenUrl 讀取指定的 URL 內容
該函式回傳了 NULL
若使用 GetLastError 去調出 error code
數值是 12017
MSDN 解釋該數值為 ERROR_WINHTTP_OPERATION_CANCELLED
The operation was canceled, usually because the handle on which the request
was operating was closed before the operation completed.
對於上述提到的 the handle on which the request was operating 不瞭解指的是甚麼
不過弱再一次呼叫 InternetOpenUrl 讀取指定的 URL 內容
此時就能夠正常地讀到期望的內容
若兩次之間間隔了一段時間
第二次的呼叫還是會回傳 NULL
因為對 internet 異常的問題還不是很了解
所以請教有經驗的高手能夠解惑
感激不盡:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.50.53.228
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章