1 /* DDK information for CD ROM */
6 #define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
7 #define IOCTL_CDROM_UNLOAD_DRIVER CTL_CODE(IOCTL_CDROM_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
8 #define IOCTL_CDROM_READ_TOC CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
9 #define IOCTL_CDROM_GET_CONTROL CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS)
10 #define IOCTL_CDROM_PLAY_AUDIO_MSF CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
11 #define IOCTL_CDROM_SEEK_AUDIO_MSF CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
12 #define IOCTL_CDROM_STOP_AUDIO CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
13 #define IOCTL_CDROM_PAUSE_AUDIO CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
14 #define IOCTL_CDROM_RESUME_AUDIO CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
15 #define IOCTL_CDROM_GET_VOLUME CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
16 #define IOCTL_CDROM_SET_VOLUME CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
17 #define IOCTL_CDROM_READ_Q_CHANNEL CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
18 #define IOCTL_CDROM_GET_LAST_SESSION CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
19 #define IOCTL_CDROM_RAW_READ CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
20 #define IOCTL_CDROM_DISK_TYPE CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
21 #define IOCTL_CDROM_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
23 #define IOCTL_CDROM_CHECK_VERIFY CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
24 #define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
25 #define IOCTL_CDROM_EJECT_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
26 #define IOCTL_CDROM_LOAD_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
27 #define IOCTL_CDROM_RESERVE CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
28 #define IOCTL_CDROM_RELEASE CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
29 #define IOCTL_CDROM_FIND_NEW_DEVICES CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
33 #define MAXIMUM_NUMBER_TRACKS 100
34 #define MAXIMUM_CDROM_SIZE 804
36 typedef struct _TRACK_DATA {
43 } TRACK_DATA, *PTRACK_DATA;
45 typedef struct _CDROM_TOC {
49 TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
50 } CDROM_TOC, *PCDROM_TOC;
52 #define CDROM_TOC_SIZE sizeof(CDROM_TOC)
54 typedef struct _CDROM_PLAY_AUDIO_MSF {
61 } CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF;
63 typedef struct _CDROM_SEEK_AUDIO_MSF {
67 } CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF;
69 typedef struct _CDROM_DISK_DATA {
71 } CDROM_DISK_DATA, *PCDROM_DISK_DATA;
73 #define CDROM_DISK_AUDIO_TRACK (0x00000001)
74 #define CDROM_DISK_DATA_TRACK (0x00000002)
76 #define IOCTL_CDROM_SUB_Q_CHANNEL 0x00
77 #define IOCTL_CDROM_CURRENT_POSITION 0x01
78 #define IOCTL_CDROM_MEDIA_CATALOG 0x02
79 #define IOCTL_CDROM_TRACK_ISRC 0x03
81 typedef struct _CDROM_SUB_Q_DATA_FORMAT {
84 } CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
86 typedef struct _SUB_Q_HEADER {
90 } SUB_Q_HEADER, *PSUB_Q_HEADER;
92 typedef struct _SUB_Q_CURRENT_POSITION {
99 UCHAR AbsoluteAddress[4];
100 UCHAR TrackRelativeAddress[4];
101 } SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION;
103 typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
109 UCHAR MediaCatalog[15];
110 } SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
112 typedef struct _SUB_Q_TRACK_ISRC {
121 } SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC;
123 typedef union _SUB_Q_CHANNEL_DATA {
124 SUB_Q_CURRENT_POSITION CurrentPosition;
125 SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog;
126 SUB_Q_TRACK_ISRC TrackIsrc;
127 } SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA;
129 #define AUDIO_STATUS_NOT_SUPPORTED 0x00
130 #define AUDIO_STATUS_IN_PROGRESS 0x11
131 #define AUDIO_STATUS_PAUSED 0x12
132 #define AUDIO_STATUS_PLAY_COMPLETE 0x13
133 #define AUDIO_STATUS_PLAY_ERROR 0x14
134 #define AUDIO_STATUS_NO_STATUS 0x15
136 #define ADR_NO_MODE_INFORMATION 0x0
137 #define ADR_ENCODES_CURRENT_POSITION 0x1
138 #define ADR_ENCODES_MEDIA_CATALOG 0x2
139 #define ADR_ENCODES_ISRC 0x3
141 #define AUDIO_WITH_PREEMPHASIS 0x0
142 #define DIGITAL_COPY_PERMITTED 0x2
143 #define AUDIO_DATA_TRACK 0x4
144 #define TWO_FOUR_CHANNEL_AUDIO 0x8
146 typedef struct _CDROM_AUDIO_CONTROL {
148 USHORT LogicalBlocksPerSecond;
149 } CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL;
151 typedef struct _VOLUME_CONTROL {
153 } VOLUME_CONTROL, *PVOLUME_CONTROL;
155 typedef enum _TRACK_MODE_TYPE {
159 } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
161 typedef struct __RAW_READ_INFO {
162 LARGE_INTEGER DiskOffset;
164 TRACK_MODE_TYPE TrackMode;
165 } RAW_READ_INFO, *PRAW_READ_INFO;
167 #endif /* __NTDDCDRM_H */