FlamesTsui 发表于 2012-7-10 18:24:08

_WinHTTP_GetRespond的问题

本帖最后由 FlamesTsui 于 2012-7-10 18:25 编辑

我怎么使用_WinHTTP_GetRespond获取回来二进制只有4个字节??#include "WinHttp_GetRespond.au3"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 951, 546, 184, 116)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 945, 497)
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("Button1", 16, 512, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 104, 512, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $MyOpen = _WinHttpOpen()
                        ;Local $Request = ["$hRequest"]
                        $rContext = _WinHTTP_GetRespond($MyOpen, "http://www.baidu.com/")
                        MsgBox(0, "", BinaryLen($rContext))
                        GUICtrlSetData($Edit1, BinaryToString($rContext))
                        ;MsgBox(0,"Error",@error)
        EndSwitch
WEnd

不是像例子那样是HTML代码呢??
用的UDF是http://www.autoitx.com/thread-18528-1-1.html
页: [1]
查看完整版本: _WinHTTP_GetRespond的问题