Share via


IVsWebProxy.PrepareWebProxy Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)

Syntax

'Declaration
Function PrepareWebProxy ( _
    strWebCallUrl As String, _
    oldProxyState As UInteger, _
    <OutAttribute> ByRef newProxyState As UInteger, _
    fOkToPrompt As Integer _
) As Integer
int PrepareWebProxy(
    string strWebCallUrl,
    uint oldProxyState,
    out uint newProxyState,
    int fOkToPrompt
)
int PrepareWebProxy(
    [InAttribute] String^ strWebCallUrl, 
    [InAttribute] unsigned int oldProxyState, 
    [OutAttribute] unsigned int% newProxyState, 
    [InAttribute] int fOkToPrompt
)
abstract PrepareWebProxy : 
        strWebCallUrl:string * 
        oldProxyState:uint32 * 
        newProxyState:uint32 byref * 
        fOkToPrompt:int -> int
function PrepareWebProxy(
    strWebCallUrl : String, 
    oldProxyState : uint, 
    newProxyState : uint, 
    fOkToPrompt : int
) : int

Parameters

  • strWebCallUrl
    Type: String

    [in] The URL for the web call.

  • oldProxyState
    Type: UInt32

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

  • newProxyState
    Type: UInt32%

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

  • fOkToPrompt
    Type: Int32

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

Return Value

Type: Int32
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
);

.NET Framework Security

See Also

Reference

IVsWebProxy Interface

Microsoft.VisualStudio.Shell.Interop Namespace