IDiscoverySession::UpdateWebReference Method (Object^, String^, String^)

 

Discovers an XML Web service and then adds a reference to it.

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

int UpdateWebReference(
	Object^ punkWebReferenceFolder,
	String^ bstrUrl,
	String^ bstrDestinationPath
)

Parameters

punkWebReferenceFolder
Type: System::Object^

[in] Project Item of the folder containing web reference.

bstrUrl
Type: System::String^

[in] URL of the file being discovered.

bstrDestinationPath
Type: System::String^

[in] Destination path to updates to the web reference.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From discoveryservice.idl:

HRESULT IDiscoverySession::UpdateWebReference(
   [in] IUnknown* punkWebReferenceFolder,
   [in] BSTR bstrUrl,
   [in] BSTR bstrDestinationPath)

UpdateWebReference is similar to AddWebReference. However, UpdateWebReference discards the result of DiscoverUrlAsync, does a web discovery itself, and then adds a web reference. In short, UpdateWebReference = DiscoverUrlAsync + AddWebReference.

Return to top
Show: