GetStorageDependencyInformation function (virtdisk.h)

Returns the relationships between virtual hard disks (VHDs) or CD or DVD image file (ISO) or the volumes contained within those disks and their parent disk or volume.

Syntax

DWORD GetStorageDependencyInformation(
  [in]                HANDLE                      ObjectHandle,
  [in]                GET_STORAGE_DEPENDENCY_FLAG Flags,
  [in]                ULONG                       StorageDependencyInfoSize,
  [in, out]           PSTORAGE_DEPENDENCY_INFO    StorageDependencyInfo,
  [in, out, optional] PULONG                      SizeUsed
);

Parameters

[in] ObjectHandle

A handle to a volume or root directory if the Flags parameter does not specify the GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE flag. For information on how to open a volume or root directory, see the CreateFile function.

If the Flags parameter specifies the GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE flag, this handle should be a handle to a disk.

[in] Flags

A valid combination of GET_STORAGE_DEPENDENCY_FLAG values.

[in] StorageDependencyInfoSize

Size, in bytes, of the buffer that the StorageDependencyInfo parameter refers to.

[in, out] StorageDependencyInfo

A pointer to a buffer to receive the populated STORAGE_DEPENDENCY_INFO structure, which is a variable-length structure.

[in, out, optional] SizeUsed

An optional pointer to a ULONG that receives the size used.

Return value

Status of the request.

If the function succeeds, the return value is ERROR_SUCCESS and the StorageDependencyInfo parameter contains the requested dependency information.

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

Remarks

CD and DVD image files (ISO) are not supported before Windows 8 and Windows Server 2012.

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