newuser 发表于 2010-11-17 08:12:31

回复 13# republican
不行!

netegg 发表于 2010-11-17 10:32:59

回复 15# newuser

newuser 发表于 2010-11-17 10:54:24

回复 17# netegg
可怎么解决呢?

netegg 发表于 2010-11-17 11:46:20

回复 18# newuser
那个意思是说发送请求没成功呀,不是打开请求

republican 发表于 2010-11-17 12:03:35

检查winhttp单独的代理服务器设置。(非IE)

newuser 发表于 2010-11-19 12:02:24

回复 20# republican

该如何检查呢?我用了如下代码:#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#Include <WinHTTP.au3>

; 稍等
Global $sPACurl = _WinHttpDetectAutoProxyConfigUrl(BitOR($WINHTTP_AUTO_DETECT_TYPE_DHCP, $WINHTTP_AUTO_DETECT_TYPE_DNS_A))
MsgBox(64, "_WinHttpDetectAutoProxyConfigUrl", "The URL for the Proxy Auto-Configuration (PAC) file is: " & $sPACurl))获得结果为空?
以下函数没有例子:#Include <WinHTTP.au3>
_WinHttpSetDefaultProxyConfiguration( $iAccessType, $Proxy, $ProxyBypass )我该如何设置我的机器的WinHTTP的单独代理呢?请帮助给个具体例子,谢谢.

这个我所获得信息,我不知道在注册表中怎么用?
    WINHTTP_PROXY_INFO proxyInfo;

    // Allocate memory for string members.
    proxyInfo.lpszProxy = new WCHAR;
    proxyInfo.lpszProxyBypass = new WCHAR;
   
    // Set the members of the proxy info structure.
    proxyInfo.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
    swprintf_s(proxyInfo.lpszProxy, 25, L"proxy_server");
    swprintf_s(proxyInfo.lpszProxyBypass, 25, L"<local>");

    // Set the default proxy configuration.
    if (WinHttpSetDefaultProxyConfiguration( &proxyInfo ))
      printf("Proxy Configuration Set.\n");

    // Free memory allocated to the strings.
    delete [] proxyInfo.lpszProxy;
    delete [] proxyInfo.lpszProxyBypass;我的是局域网,OS是WIN SERVER 2003 R2版.

republican 发表于 2010-11-19 12:50:37

proxycfg.exe 看看。

newuser 发表于 2010-11-19 15:44:39

回复 22# republican

以下是信息:
当前 WinHTTP 代理设置在:
HKEY_LOCAL_MACHINE\
    SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\
      WinHttpSettings :

   直接访问(无代理服务器)。

我该如何设置它呢?我纳闷我的注册表没有 Connections\ WinHttpSettings :?proxycfg.exe是怎么访问的呢?regedit和regedt32.exe 我都看了.

youarezz 发表于 2010-11-21 22:01:29

来看看................

mybkc 发表于 2010-11-22 07:59:48

我怎么没这个函数呢?

newuser 发表于 2010-11-22 14:39:14

回复 22# republican
哎,Dos的东西动生锈了,proxycfg -u,就可以将自己的局域网的代理服务器的设置岛入到注册表了,WinHttp的proxy也得到了设置,不在是"直接访问",可是郁闷的是:
$rContext=_WinHTTP_GetRespond($MyOpen,"http://www.google.com")
还是执行错误,得到的代码是:  code0,
我比较坚持,也比较迟钝,还请多指教!#include <Array.au3>
#Include <ACN_HASH.au3>
#include <WinHttp_GetRespond.au3>
_Example1()
Func _Example1()                              ;单独返回 Header
      $MyOpen=_WinHttpOpen()
      
      $rContext=_WinHTTP_GetRespond($MyOpen,"http://www.google.com")
      If @error Then MsgBox(48,"Error Code:",$rContext)
      _ArrayDisplay($rContext,"Example 1 Header为:")

      _WinHttpCloseHandle($MyOpen)
EndFunc
页: 1 [2]
查看完整版本: Afan老大,_WinHttpReadData的问题?