How to issue a READ CD command to a CD-ROM drive in Windows?
问题 I'm working on an application that needs to issue raw SCSI commands to a CD-ROM drive. Currently, I'm struggling with sending a READ CD ( 0xBE ) command to the drive and getting back the data from a given sector of the CD. Consider the following code : #include <windows.h> #include <winioctl.h> #include <ntddcdrm.h> #include <ntddscsi.h> #include <stddef.h> 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