本帖最后由 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[1] = ["$hRequest"]
$rContext = _WinHTTP_GetRespond($MyOpen, "http://www.baidu.com/")
MsgBox(0, "", BinaryLen($rContext[0]))
GUICtrlSetData($Edit1, BinaryToString($rContext[0]))
;MsgBox(0,"Error",@error)
EndSwitch
WEnd
不是像例子那样是HTML代码呢??
用的UDF是http://www.autoitx.com/thread-18528-1-1.html |