共用方式為


IVMDVDDrive::AttachImage method

The AttachImage method attaches an ISO image to the DVD drive within the virtual machine.

Syntax

HRESULT AttachImage(
  [in] BSTR imagePath
);

Parameters

imagePath [in]

The full path to the ISO image that is to be attached.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
E_POINTER
The imagePath parameter is NULL.
VM_E_VM_UNKNOWN
The virtual machine could not be found.
VM_E_DRIVE_IN_USE
A host DVD drive or ISO image is already attached to this drive.
VM_E_DRIVE_INVALID
The bus location for this drive is invalid, or the drive does not appear to be a valid DVD drive.
DISP_E_EXCEPTION
An unexpected error occurred.

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

IVMDVDDrive