xref: /reactos/sdk/include/psdk/ntddcdrm.h (revision 7af229f5)
1 /*
2  * ntddcdrm.h
3  *
4  * CDROM IOCTL interface.
5  *
6  * This file is part of the w32api package.
7  *
8  * Contributors:
9  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #ifndef _NTDDCDRM_
24 #define _NTDDCDRM_
25 
26 #include "ntddstor.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define IOCTL_CDROM_BASE                  FILE_DEVICE_CD_ROM
33 
34 #define IOCTL_CDROM_READ_TOC \
35   CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
36 
37 #define IOCTL_CDROM_SEEK_AUDIO_MSF \
38   CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
39 
40 #define IOCTL_CDROM_STOP_AUDIO \
41   CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
42 
43 #define IOCTL_CDROM_PAUSE_AUDIO \
44   CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
45 
46 #define IOCTL_CDROM_RESUME_AUDIO \
47   CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
48 
49 #define IOCTL_CDROM_GET_VOLUME \
50   CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
51 
52 #define IOCTL_CDROM_PLAY_AUDIO_MSF \
53   CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
54 
55 #define IOCTL_CDROM_SET_VOLUME \
56   CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
57 
58 #define IOCTL_CDROM_READ_Q_CHANNEL \
59   CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
60 
61 #define IOCTL_CDROM_GET_CONTROL \
62   CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS)
63 
64 #define IOCTL_CDROM_GET_LAST_SESSION \
65   CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
66 
67 #define IOCTL_CDROM_RAW_READ \
68   CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT,  FILE_READ_ACCESS)
69 
70 #define IOCTL_CDROM_DISK_TYPE \
71   CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
72 
73 #define IOCTL_CDROM_GET_DRIVE_GEOMETRY \
74   CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
75 
76 #define IOCTL_CDROM_GET_DRIVE_GEOMETRY_EX \
77   CTL_CODE(IOCTL_CDROM_BASE, 0x0014, METHOD_BUFFERED, FILE_READ_ACCESS)
78 
79 #define IOCTL_CDROM_READ_TOC_EX \
80   CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS)
81 
82 #define IOCTL_CDROM_GET_CONFIGURATION \
83   CTL_CODE(IOCTL_CDROM_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS)
84 
85 #define IOCTL_CDROM_EXCLUSIVE_ACCESS \
86   CTL_CODE(IOCTL_CDROM_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
87 
88 #define IOCTL_CDROM_SET_SPEED \
89   CTL_CODE(IOCTL_CDROM_BASE, 0x0018, METHOD_BUFFERED, FILE_READ_ACCESS)
90 
91 #define IOCTL_CDROM_GET_INQUIRY_DATA \
92   CTL_CODE(IOCTL_CDROM_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS)
93 
94 #define IOCTL_CDROM_ENABLE_STREAMING \
95   CTL_CODE(IOCTL_CDROM_BASE, 0x001A, METHOD_BUFFERED, FILE_READ_ACCESS)
96 
97 #define IOCTL_CDROM_SEND_OPC_INFORMATION \
98   CTL_CODE(IOCTL_CDROM_BASE, 0x001B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
99 
100 #define IOCTL_CDROM_GET_PERFORMANCE \
101   CTL_CODE(IOCTL_CDROM_BASE, 0x001C, METHOD_BUFFERED, FILE_READ_ACCESS)
102 
103 #define IOCTL_CDROM_CHECK_VERIFY \
104   CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
105 
106 #define IOCTL_CDROM_MEDIA_REMOVAL \
107   CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
108 
109 #define IOCTL_CDROM_EJECT_MEDIA \
110   CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
111 
112 #define IOCTL_CDROM_LOAD_MEDIA \
113   CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
114 
115 #define IOCTL_CDROM_RESERVE \
116   CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
117 
118 #define IOCTL_CDROM_RELEASE \
119   CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
120 
121 #define IOCTL_CDROM_FIND_NEW_DEVICES \
122   CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
123 
124 #define IOCTL_CDROM_SIMBAD \
125   CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS)
126 
127 
128 #define MINIMUM_CDROM_INQUIRY_SIZE  36 // RTL_SIZEOF_THROUGH_FIELD(INQUIRYDATA, ProductRevisionLevel)
129 #define MAXIMUM_CDROM_INQUIRY_SIZE 260 // MAXUCHAR + RTL_SIZEOF_THROUGH_FIELD(INQUIRYDATA, AdditionalLength)
130 
131 #define MAXIMUM_NUMBER_TRACKS             100
132 #define MAXIMUM_CDROM_SIZE                804
133 #define MINIMUM_CDROM_READ_TOC_EX_SIZE    2
134 
135 typedef struct _TRACK_DATA {
136   UCHAR  Reserved;
137   UCHAR  Control : 4;
138   UCHAR  Adr : 4;
139   UCHAR  TrackNumber;
140   UCHAR  Reserved1;
141   UCHAR  Address[4];
142 } TRACK_DATA, *PTRACK_DATA;
143 
144 /* CDROM_DISK_DATA.DiskData flags */
145 #define CDROM_DISK_AUDIO_TRACK            0x00000001
146 #define CDROM_DISK_DATA_TRACK             0x00000002
147 
148 typedef struct _CDROM_DISK_DATA {
149   ULONG  DiskData;
150 } CDROM_DISK_DATA, *PCDROM_DISK_DATA;
151 
152 typedef struct _CDROM_PLAY_AUDIO_MSF {
153   UCHAR  StartingM;
154   UCHAR  StartingS;
155   UCHAR  StartingF;
156   UCHAR  EndingM;
157   UCHAR  EndingS;
158   UCHAR  EndingF;
159 } CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF;
160 
161 /* CDROM_READ_TOC_EX.Format constants */
162 #define CDROM_READ_TOC_EX_FORMAT_TOC      0x00
163 #define CDROM_READ_TOC_EX_FORMAT_SESSION  0x01
164 #define CDROM_READ_TOC_EX_FORMAT_FULL_TOC 0x02
165 #define CDROM_READ_TOC_EX_FORMAT_PMA      0x03
166 #define CDROM_READ_TOC_EX_FORMAT_ATIP     0x04
167 #define CDROM_READ_TOC_EX_FORMAT_CDTEXT   0x05
168 
169 typedef struct _CDROM_READ_TOC_EX {
170   UCHAR  Format : 4;
171   UCHAR  Reserved1 : 3;
172   UCHAR  Msf : 1;
173   UCHAR  SessionTrack;
174   UCHAR  Reserved2;
175   UCHAR  Reserved3;
176 } CDROM_READ_TOC_EX, *PCDROM_READ_TOC_EX;
177 
178 typedef struct _CDROM_SEEK_AUDIO_MSF {
179   UCHAR  M;
180   UCHAR  S;
181   UCHAR  F;
182 } CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF;
183 
184 /* CDROM_SUB_Q_DATA_FORMAT.Format constants */
185 #define IOCTL_CDROM_SUB_Q_CHANNEL         0x00
186 #define IOCTL_CDROM_CURRENT_POSITION      0x01
187 #define IOCTL_CDROM_MEDIA_CATALOG         0x02
188 #define IOCTL_CDROM_TRACK_ISRC            0x03
189 
190 typedef struct _CDROM_SUB_Q_DATA_FORMAT {
191   UCHAR Format;
192   UCHAR Track;
193 } CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
194 
195 typedef struct _CDROM_TOC {
196   UCHAR  Length[2];
197   UCHAR  FirstTrack;
198   UCHAR  LastTrack;
199   TRACK_DATA  TrackData[MAXIMUM_NUMBER_TRACKS];
200 } CDROM_TOC, *PCDROM_TOC;
201 
202 #define CDROM_TOC_SIZE sizeof(CDROM_TOC)
203 
204 typedef struct _CDROM_TOC_SESSION_DATA {
205   UCHAR Length[2];
206   UCHAR FirstCompleteSession;
207   UCHAR LastCompleteSession;
208   TRACK_DATA TrackData[1];
209 } CDROM_TOC_SESSION_DATA, *PCDROM_TOC_SESSION_DATA;
210 
211 typedef struct _CDROM_TOC_ATIP_DATA_BLOCK {
212   UCHAR  CdrwReferenceSpeed : 3;
213   UCHAR  Reserved3 : 1;
214   UCHAR  WritePower : 3;
215   UCHAR  True1 : 1;
216   UCHAR  Reserved4 : 6;
217   UCHAR  UnrestrictedUse : 1;
218   UCHAR  Reserved5 : 1;
219   UCHAR  A3Valid : 1;
220   UCHAR  A2Valid : 1;
221   UCHAR  A1Valid : 1;
222   UCHAR  Reserved6 : 3;
223   UCHAR  IsCdrw : 1;
224   UCHAR  True2 : 1;
225   UCHAR  Reserved7;
226   UCHAR  LeadInMsf[3];
227   UCHAR  Reserved8;
228   UCHAR  LeadOutMsf[3];
229   UCHAR  Reserved9;
230   UCHAR  A1Values[3];
231   UCHAR  Reserved10;
232   UCHAR  A2Values[3];
233   UCHAR  Reserved11;
234   UCHAR  A3Values[3];
235   UCHAR  Reserved12;
236 } CDROM_TOC_ATIP_DATA_BLOCK, *PCDROM_TOC_ATIP_DATA_BLOCK;
237 
238 typedef struct _CDROM_TOC_ATIP_DATA {
239   UCHAR  Length[2];
240   UCHAR  Reserved1;
241   UCHAR  Reserved2;
242   CDROM_TOC_ATIP_DATA_BLOCK  Descriptors[0];
243 } CDROM_TOC_ATIP_DATA, *PCDROM_TOC_ATIP_DATA;
244 
245 /* CDROM_TOC_CD_TEXT_DATA_BLOCK.PackType constants */
246 #define CDROM_CD_TEXT_PACK_ALBUM_NAME 0x80
247 #define CDROM_CD_TEXT_PACK_PERFORMER  0x81
248 #define CDROM_CD_TEXT_PACK_SONGWRITER 0x82
249 #define CDROM_CD_TEXT_PACK_COMPOSER   0x83
250 #define CDROM_CD_TEXT_PACK_ARRANGER   0x84
251 #define CDROM_CD_TEXT_PACK_MESSAGES   0x85
252 #define CDROM_CD_TEXT_PACK_DISC_ID    0x86
253 #define CDROM_CD_TEXT_PACK_GENRE      0x87
254 #define CDROM_CD_TEXT_PACK_TOC_INFO   0x88
255 #define CDROM_CD_TEXT_PACK_TOC_INFO2  0x89
256 #define CDROM_CD_TEXT_PACK_UPC_EAN    0x8e
257 #define CDROM_CD_TEXT_PACK_SIZE_INFO  0x8f
258 
259 typedef struct _CDROM_TOC_CD_TEXT_DATA_BLOCK {
260   UCHAR  PackType;
261   UCHAR  TrackNumber : 7;
262   UCHAR  ExtensionFlag : 1;
263   UCHAR  SequenceNumber;
264   UCHAR  CharacterPosition : 4;
265   UCHAR  BlockNumber : 3;
266   UCHAR  Unicode : 1;
267   _ANONYMOUS_UNION union {
268     UCHAR  Text[12];
269     WCHAR  WText[6];
270   } DUMMYUNIONNAME;
271   UCHAR  CRC[2];
272 } CDROM_TOC_CD_TEXT_DATA_BLOCK, *PCDROM_TOC_CD_TEXT_DATA_BLOCK;
273 
274 typedef struct _CDROM_TOC_CD_TEXT_DATA {
275   UCHAR  Length[2];
276   UCHAR  Reserved1;
277   UCHAR  Reserved2;
278   CDROM_TOC_CD_TEXT_DATA_BLOCK  Descriptors[0];
279 } CDROM_TOC_CD_TEXT_DATA, *PCDROM_TOC_CD_TEXT_DATA;
280 
281 /* CDROM_TOC_FULL_TOC_DATA_BLOCK.Adr constants */
282 #define ADR_NO_MODE_INFORMATION           0x0
283 #define ADR_ENCODES_CURRENT_POSITION      0x1
284 #define ADR_ENCODES_MEDIA_CATALOG         0x2
285 #define ADR_ENCODES_ISRC                  0x3
286 
287 typedef struct _CDROM_TOC_FULL_TOC_DATA_BLOCK {
288   UCHAR  SessionNumber;
289   UCHAR  Control : 4;
290   UCHAR  Adr : 4;
291   UCHAR  Reserved1;
292   UCHAR  Point;
293   UCHAR  MsfExtra[3];
294   UCHAR  Zero;
295   UCHAR  Msf[3];
296 } CDROM_TOC_FULL_TOC_DATA_BLOCK, *PCDROM_TOC_FULL_TOC_DATA_BLOCK;
297 
298 typedef struct _CDROM_TOC_FULL_TOC_DATA {
299   UCHAR  Length[2];
300   UCHAR  FirstCompleteSession;
301   UCHAR  LastCompleteSession;
302   CDROM_TOC_FULL_TOC_DATA_BLOCK  Descriptors[0];
303 } CDROM_TOC_FULL_TOC_DATA, *PCDROM_TOC_FULL_TOC_DATA;
304 
305 typedef struct _CDROM_TOC_PMA_DATA {
306   UCHAR  Length[2];
307   UCHAR  Reserved1;
308   UCHAR  Reserved2;
309   CDROM_TOC_FULL_TOC_DATA_BLOCK  Descriptors[0];
310 } CDROM_TOC_PMA_DATA, *PCDROM_TOC_PMA_DATA;
311 
312 /* SUB_Q_HEADER.AudioStatus constants */
313 #define AUDIO_STATUS_NOT_SUPPORTED  0x00
314 #define AUDIO_STATUS_IN_PROGRESS    0x11
315 #define AUDIO_STATUS_PAUSED         0x12
316 #define AUDIO_STATUS_PLAY_COMPLETE  0x13
317 #define AUDIO_STATUS_PLAY_ERROR     0x14
318 #define AUDIO_STATUS_NO_STATUS      0x15
319 
320 typedef struct _SUB_Q_HEADER {
321   UCHAR  Reserved;
322   UCHAR  AudioStatus;
323   UCHAR  DataLength[2];
324 } SUB_Q_HEADER, *PSUB_Q_HEADER;
325 
326 typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
327   SUB_Q_HEADER  Header;
328   UCHAR  FormatCode;
329   UCHAR  Reserved[3];
330   UCHAR  Reserved1 : 7;
331   UCHAR  Mcval :1;
332   UCHAR  MediaCatalog[15];
333 } SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
334 
335 typedef struct _SUB_Q_TRACK_ISRC {
336   SUB_Q_HEADER  Header;
337   UCHAR  FormatCode;
338   UCHAR  Reserved0;
339   UCHAR  Track;
340   UCHAR  Reserved1;
341   UCHAR  Reserved2 : 7;
342   UCHAR  Tcval : 1;
343   UCHAR  TrackIsrc[15];
344 } SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC;
345 
346 typedef struct _SUB_Q_CURRENT_POSITION {
347   SUB_Q_HEADER  Header;
348   UCHAR  FormatCode;
349   UCHAR  Control : 4;
350   UCHAR  ADR : 4;
351   UCHAR  TrackNumber;
352   UCHAR  IndexNumber;
353   UCHAR  AbsoluteAddress[4];
354   UCHAR  TrackRelativeAddress[4];
355 } SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION;
356 
357 typedef union _SUB_Q_CHANNEL_DATA {
358   SUB_Q_CURRENT_POSITION  CurrentPosition;
359   SUB_Q_MEDIA_CATALOG_NUMBER  MediaCatalog;
360   SUB_Q_TRACK_ISRC  TrackIsrc;
361 } SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA;
362 
363 /* CDROM_AUDIO_CONTROL.LbaFormat constants */
364 #define AUDIO_WITH_PREEMPHASIS            0x1
365 #define DIGITAL_COPY_PERMITTED            0x2
366 #define AUDIO_DATA_TRACK                  0x4
367 #define TWO_FOUR_CHANNEL_AUDIO            0x8
368 
369 typedef struct _CDROM_AUDIO_CONTROL {
370   UCHAR  LbaFormat;
371   USHORT  LogicalBlocksPerSecond;
372 } CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL;
373 
374 typedef struct _VOLUME_CONTROL {
375   UCHAR  PortVolume[4];
376 } VOLUME_CONTROL, *PVOLUME_CONTROL;
377 
378 typedef enum _TRACK_MODE_TYPE {
379   YellowMode2,
380   XAForm2,
381   CDDA,
382   RawWithC2AndSubCode,
383   RawWithC2,
384   RawWithSubCode
385 } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
386 
387 #define CD_RAW_READ_C2_SIZE                    (     296   )
388 #define CD_RAW_READ_SUBCODE_SIZE               (         96)
389 #define CD_RAW_SECTOR_WITH_C2_SIZE             (2352+296   )
390 #define CD_RAW_SECTOR_WITH_SUBCODE_SIZE        (2352    +96)
391 #define CD_RAW_SECTOR_WITH_C2_AND_SUBCODE_SIZE (2352+296+96)
392 
393 typedef struct __RAW_READ_INFO {
394   LARGE_INTEGER  DiskOffset;
395   ULONG  SectorCount;
396   TRACK_MODE_TYPE  TrackMode;
397 } RAW_READ_INFO, *PRAW_READ_INFO;
398 
399 
400 // for IOCTL_CDROM_EXCLUSIVE_ACCESS
401 
402 #define CDROM_EXCLUSIVE_CALLER_LENGTH   64
403 
404 #define CDROM_LOCK_IGNORE_VOLUME        (1 << 0)
405 #define CDROM_NO_MEDIA_NOTIFICATIONS    (1 << 1)
406 
407 #define CDROM_NOT_IN_EXCLUSIVE_MODE     0
408 #define CDROM_IN_EXCLUSIVE_MODE         1
409 
410 typedef enum _EXCLUSIVE_ACCESS_REQUEST_TYPE
411 {
412   ExclusiveAccessQueryState,
413   ExclusiveAccessLockDevice,
414   ExclusiveAccessUnlockDevice
415 } EXCLUSIVE_ACCESS_REQUEST_TYPE, *PEXCLUSIVE_ACCESS_REQUEST_TYPE;
416 
417 typedef struct _CDROM_EXCLUSIVE_ACCESS
418 {
419   EXCLUSIVE_ACCESS_REQUEST_TYPE RequestType;
420   ULONG Flags;
421 } CDROM_EXCLUSIVE_ACCESS, *PCDROM_EXCLUSIVE_ACCESS;
422 
423 typedef struct _CDROM_EXCLUSIVE_LOCK
424 {
425   CDROM_EXCLUSIVE_ACCESS  Access;
426   UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH];
427 } CDROM_EXCLUSIVE_LOCK, *PCDROM_EXCLUSIVE_LOCK;
428 
429 typedef struct _CDROM_EXCLUSIVE_LOCK_STATE
430 {
431   BOOLEAN LockState;
432   UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH];
433 } CDROM_EXCLUSIVE_LOCK_STATE, *PCDROM_EXCLUSIVE_LOCK_STATE;
434 
435 
436 // for IOCTL_CDROM_SET_SPEED
437 
438 typedef enum _CDROM_SPEED_REQUEST
439 {
440   CdromSetSpeed,
441   CdromSetStreaming
442 } CDROM_SPEED_REQUEST, *PCDROM_SPEED_REQUEST;
443 
444 typedef enum _WRITE_ROTATION
445 {
446   CdromDefaultRotation,
447   CdromCAVRotation
448 } WRITE_ROTATION, *PWRITE_ROTATION;
449 
450 typedef struct _CDROM_SET_SPEED
451 {
452   CDROM_SPEED_REQUEST RequestType;
453   USHORT ReadSpeed;
454   USHORT WriteSpeed;
455   WRITE_ROTATION RotationControl;
456 } CDROM_SET_SPEED, *PCDROM_SET_SPEED;
457 
458 typedef struct _CDROM_SET_STREAMING
459 {
460   CDROM_SPEED_REQUEST RequestType;
461   ULONG ReadSize;
462   ULONG ReadTime;
463   ULONG WriteSize;
464   ULONG WriteTime;
465   ULONG StartLba;
466   ULONG EndLba;
467   WRITE_ROTATION RotationControl;
468   BOOLEAN RestoreDefaults;
469   BOOLEAN SetExact;
470   BOOLEAN RandomAccess;
471   BOOLEAN Persistent;
472 } CDROM_SET_STREAMING, *PCDROM_SET_STREAMING;
473 
474 
475 // for IOCTL_CDROM_ENABLE_STREAMING
476 
477 typedef enum _STREAMING_CONTROL_REQUEST_TYPE
478 {
479   CdromStreamingDisable = 1,
480   CdromStreamingEnableForReadOnly = 2,
481   CdromStreamingEnableForWriteOnly = 3,
482   CdromStreamingEnableForReadWrite = 4
483 } STREAMING_CONTROL_REQUEST_TYPE, *PSTREAMING_CONTROL_REQUEST_TYPE;
484 
485 typedef struct _CDROM_STREAMING_CONTROL {
486   STREAMING_CONTROL_REQUEST_TYPE   RequestType;
487 } CDROM_STREAMING_CONTROL, *PCDROM_STREAMING_CONTROL;
488 
489 
490 // for IOCTL_CDROM_SEND_OPC_INFORMATION
491 
492 typedef enum _CDROM_OPC_INFO_TYPE
493 {
494   SimpleOpcInfo = 1
495 } CDROM_OPC_INFO_TYPE, *PCDROM_OPC_INFO_TYPE;
496 
497 typedef struct _CDROM_SIMPLE_OPC_INFO
498 {
499   CDROM_OPC_INFO_TYPE RequestType;
500   BOOLEAN Exclude0;
501   BOOLEAN Exclude1;
502 } CDROM_SIMPLE_OPC_INFO, *PCDROM_SIMPLE_OPC_INFO;
503 
504 
505 // for IOCTL_CDROM_GET_PERFORMANCE
506 
507 typedef enum _CDROM_PERFORMANCE_REQUEST_TYPE
508 {
509   CdromPerformanceRequest = 1,
510   CdromWriteSpeedRequest = 2
511 } CDROM_PERFORMANCE_REQUEST_TYPE, *PCDROM_PERFORMANCE_REQUEST_TYPE;
512 
513 typedef enum _CDROM_PERFORMANCE_TYPE
514 {
515   CdromReadPerformance = 1,
516   CdromWritePerformance = 2
517 } CDROM_PERFORMANCE_TYPE, *PCDROM_PERFORMANCE_TYPE;
518 
519 typedef enum _CDROM_PERFORMANCE_EXCEPTION_TYPE
520 {
521   CdromNominalPerformance = 1,
522   CdromEntirePerformanceList = 2,
523   CdromPerformanceExceptionsOnly = 3
524 } CDROM_PERFORMANCE_EXCEPTION_TYPE, *PCDROM_PERFORMANCE_EXCEPTION_TYPE;
525 
526 typedef enum _CDROM_PERFORMANCE_TOLERANCE_TYPE
527 {
528   Cdrom10Nominal20Exceptions = 1
529 } CDROM_PERFORMANCE_TOLERANCE_TYPE, *PCDROM_PERFORMANCE_TOLERANCE_TYPE;
530 
531 typedef struct _CDROM_PERFORMANCE_REQUEST
532 {
533   CDROM_PERFORMANCE_REQUEST_TYPE RequestType;
534   CDROM_PERFORMANCE_TYPE PerformanceType;
535   CDROM_PERFORMANCE_EXCEPTION_TYPE Exceptions;
536   CDROM_PERFORMANCE_TOLERANCE_TYPE Tolerance;
537   ULONG StaringLba;
538 } CDROM_PERFORMANCE_REQUEST, *PCDROM_PERFORMANCE_REQUEST;
539 
540 typedef struct _CDROM_WRITE_SPEED_REQUEST
541 {
542   CDROM_PERFORMANCE_REQUEST_TYPE   RequestType;
543 } CDROM_WRITE_SPEED_REQUEST, *PCDROM_WRITE_SPEED_REQUEST;
544 
545 typedef struct _CDROM_PERFORMANCE_HEADER
546 {
547   UCHAR DataLength[4];
548   UCHAR Except:1;
549   UCHAR Write:1;
550   UCHAR Reserved1:6;
551   UCHAR Reserved2[3];
552   UCHAR Data[0];
553 } CDROM_PERFORMANCE_HEADER, *PCDROM_PERFORMANCE_HEADER;
554 
555 typedef struct _CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR
556 {
557   UCHAR StartLba[4];
558   UCHAR StartPerformance[4];
559   UCHAR EndLba[4];
560   UCHAR EndPerformance[4];
561 } CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR, *PCDROM_NOMINAL_PERFORMANCE_DESCRIPTOR;
562 
563 typedef struct _CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR
564 {
565   UCHAR Lba[4];
566   UCHAR Time[2];
567 } CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR, *PCDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR;
568 
569 typedef struct _CDROM_WRITE_SPEED_DESCRIPTOR
570 {
571   UCHAR MixedReadWrite:1;
572   UCHAR Exact:1;
573   UCHAR Reserved1:1;
574   UCHAR WriteRotationControl:2;
575   UCHAR Reserved2:3;
576   UCHAR Reserved3[3];
577   UCHAR EndLba[4];
578   UCHAR ReadSpeed[4];
579   UCHAR WriteSpeed[4];
580 } CDROM_WRITE_SPEED_DESCRIPTOR, *PCDROM_WRITE_SPEED_DESCRIPTOR;
581 
582 #ifdef __cplusplus
583 }
584 #endif
585 
586 #endif /* _NTDDCDRM_ */
587