IVMHardDisk::Merge method

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

Merges a differencing virtual hard disk with its parent disk image.

Syntax

HRESULT Merge(
  [out, retval] IVMTask **mergeTask
);

Parameters

mergeTask [out, retval]

An IVMTask object that is used to track the completion of the merging process.

Return value

This method can return one of these values.

Return code/value Description
S_OK
0
The operation was successful.
E_POINTER
0x80004003
The parameter is NULL.
HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION)
0x80070020
The virtual hard disk image referenced by this IVMHardDisk object is in use or the parent of this virtual hard disk image is in use. Or, these hard disk images could be part of a saved state.
VM_E_WRONG_HD_IMAGE_TYPE
0xA004067B
The virtual hard disk image referenced by this IVMHardDisk object must be a differencing disk image.
VM_E_FILE_READ_ONLY
0xA004067A
The parent of virtual hard disk image referenced by this IVMHardDisk object is marked as read only.
VM_E_PARENT_PATH_NOT_FOUND
0xA0040677
The parent of the virtual hard disk referenced by this IVMHardDisk object does not exist.
VM_E_APP_SHUTTING_DOWN
0xA0040209
The virtual hard disk image cannot be merged because the application is shutting down.
DISP_E_EXCEPTION
0x80020009
An unexpected error has occurred.

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_IVMHardDisk is defined as ffa14ae6-48f5-42a4-8a22-186f2e5c7db0

See also

IVMHardDisk