Tag: cd rom

如何在Windows中向CD-ROM驱动器发出READ CD命令?

我正在开发一个需要向CD-ROM驱动器发出原始SCSI命令的应用程序。 目前,我正在努力向驱动器发送READ CD( 0xBE )命令并从CD的给定扇区获取数据。 请考虑以下代码: #include #include #include #include #include int main(void) { HANDLE fh; DWORD ioctl_bytes; BOOL ioctl_rv; const UCHAR cdb[] = { 0xBE, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0 }; UCHAR buf[2352]; struct sptd_with_sense { SCSI_PASS_THROUGH_DIRECT s; UCHAR sense[128]; } sptd; fh = CreateFile(“\\\\.\\E:”, GENERIC_READ | GENERIC_WRITE, […]