IDiscoverySession.UpdateWebReference Method
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)
Syntax
'Declaration
Function UpdateWebReference ( _
punkWebReferenceFolder As Object, _
bstrUrl As String, _
bstrDestinationPath As String _
) As Integer
int UpdateWebReference(
Object punkWebReferenceFolder,
string bstrUrl,
string bstrDestinationPath
)
int UpdateWebReference(
[InAttribute] Object^ punkWebReferenceFolder,
[InAttribute] String^ bstrUrl,
[InAttribute] String^ bstrDestinationPath
)
abstract UpdateWebReference :
punkWebReferenceFolder:Object *
bstrUrl:string *
bstrDestinationPath:string -> int
function UpdateWebReference(
punkWebReferenceFolder : Object,
bstrUrl : String,
bstrDestinationPath : String
) : int
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.
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.