IVsAddWebReferenceDlg2::AddWebReferenceDlg Method (IDiscoverySession^, String^, String^, IDiscoveryResult^, Int32)

 

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)

int AddWebReferenceDlg(
	IDiscoverySession^ pDiscoverySession,
	[OutAttribute] String^% pbstrWebReferenceUrl,
	[OutAttribute] String^% pbstrWebReferenceName,
	[OutAttribute] IDiscoveryResult^% ppIDiscoveryResult,
	[OutAttribute] int% pfCancelled
)

Parameters

pDiscoverySession
Type: Microsoft.VisualStudio.Shell.Interop::IDiscoverySession^

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

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.

ppIDiscoveryResult
Type: Microsoft.VisualStudio.Shell.Interop::IDiscoveryResult^

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

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.

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.

Return to top
Show: