Rediger

Del via


IVMVirtualPC::CreateFloppyDiskImage method

[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]

Creates a floppy disk image file.

Syntax

HRESULT CreateFloppyDiskImage(
  [in] BSTR                  imagePath,
  [in] VMFloppyDiskImageType imageType
);

Parameters

imagePath [in]

The full path to the new disk image file. The containing folder will be created if it does not exist.

imageType [in]

The type of floppy disk image to create. Only vmFloppyDiskImage_LowDensity (1) and vmFloppyDiskImage_HighDensity (2) are supported. See VMFloppyDiskImageType.

Return value

This method can return one of these values.

Return code/value Description
S_OK
The operation was successful.
E_POINTER
0x80004003
The imagePath parameter is NULL.
E_INVALIDARG
0x80000003
The imageType parameter is not vmFloppyDiskImage_LowDensity (1) or vmFloppyDiskImage_HighDensity (2).
HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)
0x80070003
The system cannot find the path specified by the imagePath parameter.
HRESULT_FROM_WIN32(ERROR_INVALID_NAME)
0x8007007b
The imagePath parameter contains an invalid character (one of "*?:<>/|"").
HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME)
0x800700a1
The imagePath parameter specifies an empty or relative path. An absolute path is required.
HRESULT_FROM_WIN32(ERROR_BUFFER_OVERFLOW)
0x8007006f
The path specified by the imagePath parameter is too long. The length of the path must be less than 260 characters.
HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)
0x800700b7
The file referenced by the parameter imagePath already exists.
HRESULT_FROM_WIN32(ERROR_DISK_FULL)
0x80070070
There is insufficient space on the host volume to create the virtual floppy disk image.
DISP_E_EXCEPTION
0x80020009
An unexpected error occurred.
VM_E_HARDWARE_VIRTUALIZATION_DISABLED
0xA0040951
The processor does not support Hardware Accelerated Virtualization (HAV) extensions.

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
None supported
End of client support
Windows 7
Product
Windows Virtual PC
Header
VPCCOMInterfaces.h
IID
IID_IVMVirtualPC is defined as 236ba0d9-a24a-4292-a132-27c1421dfd01

See also

IVMVirtualPC