IVsWebProxy.PrepareWebProxy(String, UInt32, UInt32, Int32) Method

Definition

Prepares the web proxy for a web call by attaching credentials to it.

public:
 int PrepareWebProxy(System::String ^ strWebCallUrl, System::UInt32 oldProxyState, [Runtime::InteropServices::Out] System::UInt32 % newProxyState, int fOkToPrompt);
int PrepareWebProxy(std::wstring const & strWebCallUrl, unsigned int oldProxyState, [Runtime::InteropServices::Out] unsigned int & newProxyState, int fOkToPrompt);
public int PrepareWebProxy (string strWebCallUrl, uint oldProxyState, out uint newProxyState, int fOkToPrompt);
abstract member PrepareWebProxy : string * uint32 * uint32 * int -> int
Public Function PrepareWebProxy (strWebCallUrl As String, oldProxyState As UInteger, ByRef newProxyState As UInteger, fOkToPrompt As Integer) As Integer

Parameters

strWebCallUrl
String

[in] The URL for the web call.

oldProxyState
UInt32

[in] A __VsWebProxyState value specifying the current proxy state for the web call.

newProxyState
UInt32

[out] A __VsWebProxyState value specifying the new proxy state for the web call.

fOkToPrompt
Int32

[in] Prompt user for credentials if they are not available.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

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.

COM Signature

From vsshell90.idl:

HRESULT PrepareWebProxy(  
    [in] BSTR strWebCallUrl,  
    [in] VsWebProxyState oldProxyState,  
    [out] VsWebProxyState* newProxyState,  
    [in] BOOL fOkToPrompt  
);  

Applies to