Share via


IOCTL_DISK_GET_SECTOR_ADDR (Compact 2013)

3/26/2014

This I/O control message receives an array of logical sectors and returns an array of addresses. Each array of addresses corresponds to the statically mapped virtual address for a particular logical sector. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use IOCTL_DISK_GET_SECTOR_ADDR
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    The handle to the device.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_DISK_GET_SECTOR_ADDR for this operation.
  • lpInBuffer
    [in] Array of DWORD values, where each entry contains a logical sector to look up.
  • nInBufferSize
    [in] Size of the input buffer, in bytes.
  • lpOutBuffer
    [out] Array of DWORD values, where each entry contains a statically mapped virtual address. The buffer must be allocated by the caller in order to be the same size as the input buffer. If an entry contains 0xFFFFFFFF, then the logical sector provided is invalid.
  • nOutBufferSize
    [out] Size of the output buffer, in bytes. This value must be equal to nInBufferSize.
  • lpBytesReturned
    [out] Not used; set to NULL.
  • lpOverlapped

Return Values

Returns an array of addresses. If a logical sector is invalid, the corresponding entry in the output array contains 0xFFFFFFFF.

Requirements

Header

diskio.h

See Also

Reference

Block Driver IOCTLs