我用微软提供的windows update agent 接口来获取本地机器中的补丁信息,需要通过代理向外WSUS服务器进行访问。他提供了一个IWebProxy的接口,网址:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wua_sdk/wua/iwebproxy.asp
我是这么做的:IUpdateSessionPtr pISession( "Microsoft.Update.Session" );
IWebProxyPtr pIWebProxy;
pISession->get_WebPorxy( &pIWebProxy );pIWebProxy->put_AutoDetect( VARIANT_FALSE ); // disable proxy auto detect
pIWebProxy->put_Address( bstrProxyServer );  // put proxy address:port
pIWebProxy->put_UserName( bstrProxyUser );   // put proxy authentication username
pIWebProxy->SetPassword( bstrProxyPaswd );   // put proxy authentication passwordpISession->put_WebProxy( pIWebProxy );       // put I/F to current session这样做后,如果我指定的代理是匿名的话,可以正常运行,但如果需要用户身份认证就会出错返回,研究了半天msdn,实在看不出来有什么门道,希望大伙能帮我分析分析问题出在哪了?