开发者

VB6 - WinHttpRequest Timouts Problem

I'm using a WebRequest in VB6 and I开发者_开发知识库 have the timeouts set at "5000" (5 seconds), but even after 5 seconds it is not timing out, any help is appreciated.

x:
Dim objWinHTTP
Set objWinHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")


    objWinHTTP.Open "POST", "http://twitter.com/" & TwitterUSERNAME
    objWinHTTP.SetTimeouts 5000, 5000, 5000, 5000


    Call objWinHTTP.Send(psData)
    MsgBox (objWinHTTP.Status)
    If objWinHTTP.Status <> 200 Then
    Timer.Enabled = False
    MsgBox ("D:")
    GoTo x
    End If


you should set objWinHTTP.SetTimeouts before objWinHTTP.Open

and the four parameters you set for objWinHTTP.SetTimeouts are

Resolve, Connect, Send and Receive

So each value should be set according to that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜