Platform SDK: Hardware

VOLUME_BITMAP_BUFFER

The VOLUME_BITMAP_BUFFER structure is the output for the DeviceIoControl FSCTL_GET_VOLUME_BITMAP operation.

typedef struct {
  LARGE_INTEGER StartingLcn;
  LARGE_INTEGER BitmapSize;
  BYTE  Buffer[1];
} VOLUME_BITMAP_BUFFER, *PVOLUME_BITMAP_BUFFER;

Members

StartingLcn
The starting LCN requested as an input to the DeviceIoControl FSCTL_GET_VOLUME_BITMAP operation.
BitmapSize
The number of clusters on the volume, starting from the starting LCN returned in the StartingLcn member of this structure. See the Remarks below for details.
Buffer
An array of bytes containing the bitmap that the operation returns. The bitmap is bitwise from bit zero of the bitmap to the end. Thus, starting at the requested cluster, the bitmap goes from bit 0 of byte 0, bit 1 of byte 0 ... bit 7 of byte 0, bit 0 of byte 1, and so on. The value 1 indicates that the cluster is allocated (in use). The value 0 indicates that the cluster is not allocated (free).

Remarks

The BitmapSize member is the number of clusters on the volume starting from the starting LCN returned in the StartingLcn member of this structure. For example, suppose there are 0xD3F7 clusters on the volume. If you start the bitmap query at LCN 0xA007, then both the FAT and NTFS file systems will round down the returned starting LCN to LCN 0xA000. The value returned in the BitmapSize member will be (0xD3F7 – 0xA000), or 0x33F7.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winioctl.h.

See Also

Device Input and Output Overview, Device Input and Output Structures, Defragmentation, DeviceIoControl, FSCTL_GET_VOLUME_BITMAP