FSCTL_GET_RETRIEVAL_POINTERS IOCTL (winioctl.h)
Given a file handle, retrieves a data structure that describes the allocation and location on disk of a specific file, or, given a volume handle, the locations of bad clusters on a volume.
To perform this operation, call the DeviceIoControl function with the following parameters.
DeviceIoControl( (HANDLE) hDevice, // handle to file, directory, or volume FSCTL_GET_RETRIEVAL_POINTERS, // dwIoControlCode (LPVOID) lpInBuffer, // input buffer (DWORD) nInBufferSize, // size of input buffer (LPVOID) lpOutBuffer, // output buffer (DWORD) nOutBufferSize, // size of output buffer (LPDWORD) lpBytesReturned, // number of bytes returned (LPOVERLAPPED) lpOverlapped // OVERLAPPED structure );
The FSCTL_GET_RETRIEVAL_POINTERS operation retrieves a variably sized data structure that describes the allocation and location on disk of a specific file. The structure describes the mapping between virtual cluster numbers (VCN offsets within the file or stream space) and logical cluster numbers (LCN offsets within the volume space).
The FSCTL_GET_RETRIEVAL_POINTERS control code is supported for file or directory operations on NTFS, FAT, exFAT, and UDF file systems.
On supported file systems, the FSCTL_GET_RETRIEVAL_POINTERS operation returns the extent locations of nonresident data. Resident data never has extent locations.
The FSCTL_GET_RETRIEVAL_POINTERS control code also supports the alternate functionality of locating bad clusters. To query for the locations of bad clusters on a volume formatted with NTFS, FAT, or exFAT, use a volume handle as the hDevice parameter. This functionality is supported only on NTFS, FAT, and exFAT, and the caller must have MANAGE_VOLUME_ACCESS permission to the volume.
For the implications of overlapped I/O on this operation, see the Remarks section of the DeviceIoControl topic.
In Windows 8 and Windows Server 2012, this code is supported by the following technologies.
|Server Message Block (SMB) 3.0 protocol||No|
|SMB 3.0 Transparent Failover (TFO)||No|
|SMB 3.0 with Scale-out File Shares (SO)||No|
|Cluster Shared Volume File System (CsvFS)||Yes|
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winioctl.h (include Windows.h)|