Compartilhar via


IVMVirtualServer::FindVirtualMachine method

The FindVirtualMachine method returns a virtual machine object matching the requested configuration.

Syntax

HRESULT FindVirtualMachine(
  [in]  BSTR              configurationName,
  [out] IVMVirtualMachine **virtualMachine
);

Parameters

configurationName [in]

The name of the virtual machine to find.

virtualMachine [out]

A pointer to a new IVMVirtualMachine object which represents this virtual machine.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
S_FALSE
The specified configuration could not be found.
E_POINTER
configurationName is invalid, or virtualMachine is NULL.
DISP_E_EXCEPTION
An unexpected error has occurred.

Remarks

Virtual machine names are case-insensitive, for example, "MyVM" and "myvm" refer to the same virtual machine.

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