IOCTL_VOLUME_PHYSICAL_TO_LOGICAL IOCTL (ntddvol.h)
Returns the logical offset corresponding to a physical disk number and a physical offset.
The volume manager supports this IOCTL as described for all types of basic and dynamic volumes.
Major code
Input buffer
Caller inserts the VOLUME_PHYSICAL_OFFSET structure, containing the physical offset and physical disk number, at the beginning of the buffer, at Irp->AssociatedIrp.SystemBuffer.
Input buffer length
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the input buffer, which must be greater than or equal to the value of sizeof(VOLUME_PHYSICAL_OFFSET).Output buffer
The volume manager returns the logical offset in the VOLUME_LOGICAL_OFFSET structure at the beginning of the buffer, at Irp->AssociatedIrp.SystemBuffer.
Output buffer length
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the output buffer, which must be greater than or equal to the value of sizeof(VOLUME_LOGICAL_OFFSET).Status block
If the operation is successful, the Status member is set to STATUS_SUCCESS.
If either the input or output buffer is too small, the volume manager sets the Status member to STATUS_BUFFER_TOO_SMALL. If data is returned in the output buffer but the buffer is too small to receive all of it, the volume manager sets the Status member to STATUS_BUFFER_OVERFLOW. The Information member is set to the size of the output buffer provided by the caller.
If the given physical disk number and physical offset do not belong to the volume or if they are taken from RAID parity data, this call will fail with STATUS_INVALID_PARAMETER.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows XP. |
Header | ntddvol.h (include Ntddvol.h) |