GetStorageDependencyInformation function

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,
  _Inout_      PSTORAGE_DEPENDENCY_INFO StorageDependencyInfo,
  _Inout_opt_  PULONG SizeUsed
);

Parameters

ObjectHandle [in]

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.

Flags [in]

A valid combination of GET_STORAGE_DEPENDENCY_FLAG values.

StorageDependencyInfoSize [in]

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

StorageDependencyInfo [in, out]

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

SizeUsed [in, out, optional]

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

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

 

 

Build date: 10/26/2012

Community Additions

ADD
Show:
© 2014 Microsoft