Share via


IVMVirtualServer::FindVirtualNetwork method

The FindVirtualNetwork method returns a virtual network object matching the requested name.

Syntax

HRESULT FindVirtualNetwork(
  [in]  BSTR              virtualNetworkName,
  [out] IVMVirtualNetwork **virtualNetwork
);

Parameters

virtualNetworkName [in]

The name of the virtual network to find.

virtualNetwork [out]

A pointer to a new IVMVirtualNetwork object which represents this virtual network.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
S_FALSE
The specified virtual network could not be found.
E_POINTER
The virtualNetwork parameter is NULL.
E_INVALIDARG
The virtualNetworkName parameter is not valid or is an empty string.
E_FILE_NOT_FOUND
The virtual network file could not be found.
DISP_E_EXCEPTION
An unexpected error has occurred.

Remarks

Virtual network names are case-insensitive, for example, "MyNetwork" and "mynetwork" refer to the same virtual network.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualServer