SetVirtualDiskInformation

SetVirtualDiskInformation function

Sets information about a virtual hard disk (VHD).

Syntax


DWORD SetVirtualDiskInformation(
  _In_ HANDLE                 VirtualDiskHandle,
  _In_ PSET_VIRTUAL_DISK_INFO VirtualDiskInfo
);

Parameters

VirtualDiskHandle [in]

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.

VirtualDiskInfo [in]

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

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

VirtDisk.h (include Windows.h)

Library

VirtDisk.lib

DLL

VirtDisk.dll

See also

About VHD
VHD Reference

 

 

Show:
© 2016 Microsoft