Compartir a través de


IOCTL_CDROM_READ_SG (Compact 2013)

3/26/2014

This I/O control message reads scatter buffers from the CD-ROM and stores the information in the CDROM_READ structure. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use IOCTL_CDROM_READ_SG
    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
    [in] Handle to the device.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_CDROM_READ_SG for this operation.
  • lpInBuffer
    [in] Set to the address of an allocated SGX_BUF structure.
  • nInBufferSize
    [in] Set to sizeof(SGX_BUF).
  • lpOutBuffer
    [in][out] On input, set to the address of an allocated CDROM_READ structure. This is the memory needed for the structure and info storage. On output, a filled CDROM_READ structure.
  • lpBytesReturned
    [in][out] On input, address of a DWORD that receives the size in bytes of the data returned. On output, set to the number of bytes written to the supplied buffer.
  • lpOverlapped
    [in] Set to NULL.

Return Values

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.

Requirements

Header

cdioctl.h

See Also

Reference

Block Driver IOCTLs
CDROM_READ
DeviceIoControl
SGX_BUF