IVsAddWebReferenceDlg2.AddWebReferenceDlg Method

Similar to AddWebReferenceDlg Method, but allows you to enter a default name for the Web Service, as well as use the Discovery Process to get a Discovery Session.

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

Syntax

'Declaration
Function AddWebReferenceDlg ( _
    pDiscoverySession As IDiscoverySession, _
    <OutAttribute> ByRef pbstrWebReferenceUrl As String, _
    <OutAttribute> ByRef pbstrWebReferenceName As String, _
    <OutAttribute> ByRef ppIDiscoveryResult As IDiscoveryResult, _
    <OutAttribute> ByRef pfCancelled As Integer _
) As Integer
'Usage
Dim instance As IVsAddWebReferenceDlg2 
Dim pDiscoverySession As IDiscoverySession 
Dim pbstrWebReferenceUrl As String 
Dim pbstrWebReferenceName As String 
Dim ppIDiscoveryResult As IDiscoveryResult 
Dim pfCancelled As Integer 
Dim returnValue As Integer 

returnValue = instance.AddWebReferenceDlg(pDiscoverySession, _
    pbstrWebReferenceUrl, pbstrWebReferenceName, _
    ppIDiscoveryResult, pfCancelled)
int AddWebReferenceDlg(
    IDiscoverySession pDiscoverySession,
    out string pbstrWebReferenceUrl,
    out string pbstrWebReferenceName,
    out IDiscoveryResult ppIDiscoveryResult,
    out int pfCancelled
)
int AddWebReferenceDlg(
    [InAttribute] IDiscoverySession^ pDiscoverySession, 
    [OutAttribute] String^% pbstrWebReferenceUrl, 
    [OutAttribute] String^% pbstrWebReferenceName, 
    [OutAttribute] IDiscoveryResult^% ppIDiscoveryResult, 
    [OutAttribute] int% pfCancelled
)
function AddWebReferenceDlg(
    pDiscoverySession : IDiscoverySession, 
    pbstrWebReferenceUrl : String, 
    pbstrWebReferenceName : String, 
    ppIDiscoveryResult : IDiscoveryResult, 
    pfCancelled : int
) : int

Parameters

  • pbstrWebReferenceUrl
    Type: System.String%

    [out] Pointer to a string containing the Web reference URL.

  • pbstrWebReferenceName
    Type: System.String%

    [out] Pointer to a string containing the Web reference name.

  • pfCancelled
    Type: System.Int32%

    [out] Pointer to a flag, true indicating cancelled.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From compsvcspkg.idl:

HRESULT IVsAddWebReferenceDlg2::AddWebReferenceDlg(
   [in] IDiscoverySession* pDiscoverySession,
   [out] BSTR* pbstrWebReferenceUrl,
   [out] BSTR* pbstrWebReferenceName,
   [out] IDiscoveryResult** ppIDiscoveryResult,
   [out] BOOL* pfCancelled
);

If you set pDiscoverySession to nulla null reference (Nothing in Visual Basic), the environment will create a discovery session for you. For more information, see the IDiscoverySession Interface.

.NET Framework Security

See Also

Reference

IVsAddWebReferenceDlg2 Interface

IVsAddWebReferenceDlg2 Members

Microsoft.VisualStudio.Shell.Interop Namespace