IVsWebProxy::PrepareWebProxy Method (String^, UInt32, UInt32, Int32)
Prepares the web proxy for a web call by attaching credentials to it.
Assembly: Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)
int PrepareWebProxy( String^ strWebCallUrl, unsigned int oldProxyState, [OutAttribute] unsigned int% newProxyState, int fOkToPrompt )
Parameters
- strWebCallUrl
-
Type:
System::String^
[in] The URL for the web call.
- oldProxyState
-
Type:
System::UInt32
[in] A __VsWebProxyState value specifying the current proxy state for the web call.
- newProxyState
-
Type:
System::UInt32
[out] A __VsWebProxyState value specifying the new proxy state for the web call.
- fOkToPrompt
-
Type:
System::Int32
[in] Prompt user for credentials if they are not available.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Since this service is implemented in managed code, a call to it from managed code will not go through COM interop (or COM proxy). Instead it will be a direct method call. It means that if one get the service object main thread, and make the call on the background thread, the call will happen on the background thread. It is the responsibility of the caller to call the method on main thread when calling with fOkToPrompt = TRUE.
From vsshell90.idl:
HRESULT PrepareWebProxy(
[in] BSTR strWebCallUrl,
[in] VsWebProxyState oldProxyState,
[out] VsWebProxyState* newProxyState,
[in] BOOL fOkToPrompt
);