SetVirtualDiskInformation function (virtdisk.h)

Sets information about a virtual hard disk (VHD).

Syntax

DWORD SetVirtualDiskInformation(
  [in] HANDLE                 VirtualDiskHandle,
  [in] PSET_VIRTUAL_DISK_INFO VirtualDiskInfo
);

Parameters

[in] VirtualDiskHandle

A handle to the open virtual disk, which must have been opened using the VIRTUAL_DISK_ACCESS_METAOPS flag. For information on how to open a virtual disk, see the OpenVirtualDisk function.

[in] VirtualDiskInfo

A pointer to a valid SET_VIRTUAL_DISK_INFO structure.

Return value

Status of the request.

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is an error code. For more information, see System Error Codes.

Remarks

The SetVirtualDiskInformation function will fail if the ParentFilePath member is requested to be set but the system cannot resolve the path provided.

Setting the parent information will also cause the child's parent GUID and Timestamp fields to be updated.

The virtual disk cannot be attached while this operation is in progress.

The caller must have READ|WRITE access to the backing store for the virtual disk.

Requirements

Requirement Value
Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header virtdisk.h
Library VirtDisk.lib
DLL VirtDisk.dll

See also

About VHD

VHD Reference