SetVirtualDiskMetadata function (virtdisk.h)

Sets a metadata item for a virtual disk.

Syntax

DWORD SetVirtualDiskMetadata(
  [in] HANDLE     VirtualDiskHandle,
  [in] const GUID *Item,
  [in] ULONG      MetaDataSize,
  [in] const void *MetaData
);

Parameters

[in] VirtualDiskHandle

Handle to an open virtual disk.

[in] Item

Address of a GUID identifying the metadata to set. This cannot be the NULL GUID (a GUID of all zeroes).

[in] MetaDataSize

Address of a ULONG containing the size, in bytes, of the buffer pointed to by the MetaData parameter. Specific VHD file types have a maximum size per metadata element. Specific VHD files also have a maximum number of total metadata entries and total metadata size.

[in] MetaData

Address of the buffer containing the metadata to be stored.

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.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header virtdisk.h (include Windows.h)
Library VirtDisk.lib
DLL VirtDisk.dll

See also

VHD Functions