Delen via


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
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
)
abstract AddWebReferenceDlg : 
        pDiscoverySession:IDiscoverySession * 
        pbstrWebReferenceUrl:string byref * 
        pbstrWebReferenceName:string byref * 
        ppIDiscoveryResult:IDiscoveryResult byref * 
        pfCancelled:int byref -> int
function AddWebReferenceDlg(
    pDiscoverySession : IDiscoverySession, 
    pbstrWebReferenceUrl : String, 
    pbstrWebReferenceName : String, 
    ppIDiscoveryResult : IDiscoveryResult, 
    pfCancelled : int
) : int

Parameters

  • pbstrWebReferenceUrl
    Type: String%

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

  • pbstrWebReferenceName
    Type: String%

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

  • pfCancelled
    Type: Int32%

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

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace