如果porxy需要用户验证,那么如何实现?
用winnet api该如何实现呢?

解决方案 »

  1.   

    我说清楚些吧。。如果你的机器需要通过代理上网.而且你的代理服务器需要认证.
    那么在你打开ie后,输入url。。如www.sohu.com .那么就会谈出输入用户,密码和域名的窗口.认证通过后你才可以访问外网.那么在这种网络情况下.如何编程来下载文件呢。因为是需要认证的.
    比如如何变成来弹出刚才提到的窗口呢..有相应的api吗??
      

  2.   

    那不用API,那是HTTP协议的事。你可参考 RFC2616 及RFC2617要编程下载的话,你就得按HTTP协议去做
      

  3.   

    Authentication in WinHTTP (WinHTTP: Platform SDK)
    ... Authentication in WinHTTP. Some HTTP servers and proxies require authentication before allowing access to resources on the Internet. ... The Negotiate authentication scheme is sometimes called Integrated Windows authentication. Authentication in WinHTTP Applications. ... 
    msdn.microsoft.com/library/en-us/winhttp/http/http_authentication.asp - 30k -
      

  4.   

    楼上的Winhttp好象只支持在xp和2003下。。那98和2000怎么办
      

  5.   

    WinHTTP Versions
    Users of Microsoft Windows HTTP Services (WinHTTP) should use the latest version of the technology, version 5.1.Version 5.1WinHTTP 5.1 is a new version that offers improvements over version 5.0; see What's New in WinHTTP 5.1 for a review of the new features.With version 5.1, WinHTTP is now an operating-system component of the following systems:
    Microsoft Windows 2000, Service Pack 3 and later (except Datacenter Server) 
    Microsoft Windows XP, Service Pack 1 and later 
    Microsoft Windows Server 2003 family and later 
    For Windows Server 2003 family, WinHTTP is a system side-by-side assembly. See the Side-by-side Assemblies Reference topic for further information.Redistribution of WinHTTP 5.1 outside of these operating systems is not supported; for example, WinHTTP 5.1 is not supported on Windows NT 4.0.
    Version 5.0The WinHTTP 5.0 redistributable, winhttp5.dll, runs on Windows 2000 or later, or Microsoft Windows NT 4.0 with Microsoft Internet Explorer 5.01 or later.Important  With the release of WinHTTP Version 5.1, the WinHTTP 5.0 download is no longer available. Microsoft has removed the WinHTTP 5.0 SDK download from MSDN and shall terminate product support for the 5.0 release on Oct 1, 2004.