Partager via


IDiscoverySession.UpdateWebReference(Object, String, String) Method

Definition

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

public:
 int UpdateWebReference(System::Object ^ punkWebReferenceFolder, System::String ^ bstrUrl, System::String ^ bstrDestinationPath);
public:
 int UpdateWebReference(Platform::Object ^ punkWebReferenceFolder, Platform::String ^ bstrUrl, Platform::String ^ bstrDestinationPath);
int UpdateWebReference(winrt::Windows::Foundation::IInspectable const & punkWebReferenceFolder, std::wstring const & bstrUrl, std::wstring const & bstrDestinationPath);
public int UpdateWebReference (object punkWebReferenceFolder, string bstrUrl, string bstrDestinationPath);
abstract member UpdateWebReference : obj * string * string -> int
Public Function UpdateWebReference (punkWebReferenceFolder As Object, bstrUrl As String, bstrDestinationPath As String) As Integer

Parameters

punkWebReferenceFolder
Object

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

bstrUrl
String

[in] URL of the file being discovered.

bstrDestinationPath
String

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

Returns

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

Remarks

COM Signature

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.

Applies to