Skip to content

Latest commit

 

History

History
192 lines (154 loc) · 6.18 KB

nf-vdshwprv-ivdsdrive-queryextents.md

File metadata and controls

192 lines (154 loc) · 6.18 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:vdshwprv.IVdsDrive.QueryExtents
IVdsDrive::QueryExtents (vdshwprv.h)
The VdsDrive::QueryExtents (vdshwprv.h) method returns an array of the extents on a drive, including both allocated and unallocated extents.
IVdsDrive interface [VDS]
QueryExtents method
IVdsDrive.QueryExtents
IVdsDrive::QueryExtents
QueryExtents
QueryExtents method [VDS]
QueryExtents method [VDS]
IVdsDrive interface
base.ivdsdrive_queryextents
vds/IVdsDrive::QueryExtents
vdshwprv/IVdsDrive::QueryExtents
base\ivdsdrive_queryextents.htm
base
8ee3e085-ce69-457e-b652-bb9c45b7fdd8
08/08/2022
IVdsDrive interface [VDS],QueryExtents method, IVdsDrive.QueryExtents, IVdsDrive::QueryExtents, QueryExtents, QueryExtents method [VDS], QueryExtents method [VDS],IVdsDrive interface, base.ivdsdrive_queryextents, vds/IVdsDrive::QueryExtents, vdshwprv/IVdsDrive::QueryExtents
vdshwprv.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Uuid.lib
Windows
19H1
IVdsDrive::QueryExtents
vdshwprv/IVdsDrive::QueryExtents
c++
APIRef
kbSyntax
COM
Uuid.lib
Uuid.dll
IVdsDrive.QueryExtents

IVdsDrive::QueryExtents

-description

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Returns an array of the extents on a drive, including both allocated and unallocated extents.

-parameters

-param ppExtentArray [out]

A pointer to the array of VDS_DRIVE_EXTENT structures passed in by the caller. Callers must free this array by using the CoTaskMemFree function.

-param plNumberOfExtents [out]

A pointer to the number of drive extents returned in the VDS_DRIVE_EXTENT structure.

-returns

This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.

Return code/value Description
S_OK
The extents information was returned successfully. For a drive without extents, the array is empty, the value of plNumberOfExtents is set to 0, and the value of ppExtentArray is set to NULL.
VDS_E_PROVIDER_CACHE_CORRUPT
0x8004241FL
This return value signals a software or communication problem inside a provider that caches information about the array. Use the IVdsHwProvider::Reenumerate method followed by the IVdsHwProvider::Refresh method to restore the cache.
VDS_E_OBJECT_DELETED
0x8004240BL
The drive object no longer exists.
VDS_E_OBJECT_STATUS_FAILED
0x80042431L
The drive is in a failed state, and is unable to perform the requested operation.
VDS_E_ANOTHER_CALL_IN_PROGRESS
0x80042404L
Another operation is in progress; this operation cannot proceed until the previous operation or operations are complete.
VDS_E_NOT_SUPPORTED
0x80042400L
The subsystem does not support this method.

-remarks

A drive can contribute extents to any number of LUNs, and these LUNs can be unmasked to any number of different computers on the network. Use the IVdsLunPlex::QueryExtents method to see all the extents of a LUN plex.

The LunId member of each VDS_DRIVE_EXTENT structure specifies the GUID for the LUN to which each allocated extent contributes. Consequently, you can use the result of this method to determine the number of LUNs to which the drive contributes by counting the number of distinct LunId values returned in ppExtentArray.

-see-also

IVdsDrive

IVdsHwProvider::Reenumerate

IVdsHwProvider::Refresh

IVdsLunPlex::QueryExtents

VDS_DRIVE_EXTENT