다음을 통해 공유


IVsAddWebReferenceDlg2.AddWebReferenceDlg Method

Definition

Similar to AddWebReferenceDlg(String, Int32) 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.

public:
 int AddWebReferenceDlg(Microsoft::VisualStudio::Shell::Interop::IDiscoverySession ^ pDiscoverySession, [Runtime::InteropServices::Out] System::String ^ % pbstrWebReferenceUrl, [Runtime::InteropServices::Out] System::String ^ % pbstrWebReferenceName, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IDiscoveryResult ^ % ppIDiscoveryResult, [Runtime::InteropServices::Out] int % pfCancelled);
int AddWebReferenceDlg(Microsoft::VisualStudio::Shell::Interop::IDiscoverySession const & pDiscoverySession, [Runtime::InteropServices::Out] std::wstring const & & pbstrWebReferenceUrl, [Runtime::InteropServices::Out] std::wstring const & & pbstrWebReferenceName, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IDiscoveryResult const & & ppIDiscoveryResult, [Runtime::InteropServices::Out] int & pfCancelled);
public int AddWebReferenceDlg (Microsoft.VisualStudio.Shell.Interop.IDiscoverySession pDiscoverySession, out string pbstrWebReferenceUrl, out string pbstrWebReferenceName, out Microsoft.VisualStudio.Shell.Interop.IDiscoveryResult ppIDiscoveryResult, out int pfCancelled);
abstract member AddWebReferenceDlg : Microsoft.VisualStudio.Shell.Interop.IDiscoverySession * string * string * IDiscoveryResult * int -> int
Public Function AddWebReferenceDlg (pDiscoverySession As IDiscoverySession, ByRef pbstrWebReferenceUrl As String, ByRef pbstrWebReferenceName As String, ByRef ppIDiscoveryResult As IDiscoveryResult, ByRef pfCancelled As Integer) As Integer

Parameters

pDiscoverySession
IDiscoverySession

[in] Session to use to add the Web service. Can be null.

pbstrWebReferenceUrl
String

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

pbstrWebReferenceName
String

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

ppIDiscoveryResult
IDiscoveryResult

[out] pointer to IDiscoveryResult from which you can call the .AddWebReference(Object, String) Method. You can pass null if you don't need this pointer.

pfCancelled
Int32

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

Returns

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 null, the environment will create a discovery session for you. For more information, see the IDiscoverySession Interface.

Applies to