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

‘선언
Function PrepareWebProxy ( _
    strWebCallUrl As String, _
    oldProxyState As UInteger, _
    <OutAttribute> ByRef newProxyState As UInteger, _
    fOkToPrompt As Integer _
) As Integer
‘사용 방법
Dim instance As IVsWebProxy
Dim strWebCallUrl As String
Dim oldProxyState As UInteger
Dim newProxyState As UInteger
Dim fOkToPrompt As Integer
Dim returnValue As Integer

returnValue = instance.PrepareWebProxy(strWebCallUrl, _
    oldProxyState, newProxyState, fOkToPrompt)
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: System.String
    [in] The URL for the web call.
  • oldProxyState
    Type: System.UInt32
    [in] A [Microsoft.VisualStudio.Shell.Interop.__VsWebProxyState] value specifying the current proxy state for the web call.
  • newProxyState
    Type: System.UInt32%
    [out] A [Microsoft.VisualStudio.Shell.Interop.__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.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

IVsWebProxy Members

Microsoft.VisualStudio.Shell.Interop Namespace