Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
2.7 KiB

  1. /*
  2. */
  3. #include <ntddcdrm.h>
  4. #include <ntddmmc.h>
  5. #include <ntddcdvd.h>
  6. typedef struct _CDVD_WRITE_PARAMETERS_PAGE {
  7. UCHAR PageCode : 6; // 0x05
  8. UCHAR Reserved : 1;
  9. UCHAR PSBit : 1;
  10. UCHAR PageLength; // 0x32
  11. UCHAR WriteType : 4;
  12. UCHAR TestWrite : 1;
  13. UCHAR LinkSizeValid : 1;
  14. UCHAR BufferUnderrunFree : 1;
  15. UCHAR Reserved2 : 1;
  16. UCHAR TrackMode : 4;
  17. UCHAR Copy : 1;
  18. UCHAR FixedPacket : 1;
  19. UCHAR MultiSession :2;
  20. UCHAR DataBlockType : 4;
  21. UCHAR Reserved3 : 4;
  22. UCHAR LinkSize;
  23. UCHAR Reserved4;
  24. UCHAR HostApplicationCode : 7;
  25. UCHAR Reserved5 : 1;
  26. UCHAR SessionFormat;
  27. UCHAR Reserved6;
  28. UCHAR PacketSize[4];
  29. UCHAR AudioPauseLength[2];
  30. UCHAR Reserved7 : 7;
  31. UCHAR MediaCatalogNumberValid : 1;
  32. UCHAR MediaCatalogNumber[13];
  33. UCHAR MediaCatalogNumberZero;
  34. UCHAR MediaCatalogNumberAFrame;
  35. UCHAR Reserved8 : 7;
  36. UCHAR ISRCValid : 1;
  37. UCHAR ISRCCountry[2];
  38. UCHAR ISRCOwner[3];
  39. UCHAR ISRCRecordingYear[2];
  40. UCHAR ISRCSerialNumber[5];
  41. UCHAR ISRCZero;
  42. UCHAR ISRCAFrame;
  43. UCHAR ISRCReserved;
  44. UCHAR SubHeaderData[4];
  45. UCHAR Data[0];
  46. } CDVD_WRITE_PARAMETERS_PAGE, *PCDVD_WRITE_PARAMETERS_PAGE;
  47. typedef struct _SEND_DVD_STRUCTURE_TIMESTAMP {
  48. UCHAR DataLength[2];
  49. UCHAR Reserved1[2];
  50. UCHAR Reserved2[4];
  51. UCHAR Year[4];
  52. UCHAR Month[2];
  53. UCHAR Day[2];
  54. UCHAR Hour[2];
  55. UCHAR Minute[2];
  56. UCHAR Second[2];
  57. } SEND_DVD_STRUCTURE_TIMESTAMP, *PSEND_DVD_STRUCTURE_TIMESTAMP;
  58. DWORD
  59. BurnCommand(
  60. IN HANDLE CdromHandle,
  61. IN HANDLE IsoImageHandle,
  62. IN BOOLEAN Erase
  63. );
  64. BOOLEAN
  65. BurnThisSession(
  66. IN HANDLE CdromHandle,
  67. IN HANDLE IsoImageHandle,
  68. IN DWORD NumberOfBlocks,
  69. IN DWORD FirstLba
  70. );
  71. VOID
  72. PrintBuffer(
  73. IN PVOID Buffer,
  74. IN DWORD Size
  75. );
  76. BOOLEAN
  77. ReserveRZone(
  78. IN HANDLE CdromHandle,
  79. IN DWORD numberOfBlocks
  80. );
  81. BOOLEAN
  82. SendStartStopUnit(
  83. IN HANDLE CdromHandle,
  84. IN BOOLEAN Start,
  85. IN BOOLEAN Eject
  86. );
  87. BOOLEAN
  88. SendTimeStamp(
  89. IN HANDLE CdromHandle,
  90. IN PUCHAR DateString
  91. );
  92. BOOLEAN
  93. SetWriteModePage(
  94. IN HANDLE CdromHandle,
  95. IN BOOLEAN TestBurn,
  96. IN UCHAR WriteType,
  97. IN UCHAR MultiSession,
  98. IN UCHAR DataBlockType,
  99. IN UCHAR SessionFormat
  100. );
  101. BOOLEAN
  102. VerifyBlankMedia(
  103. IN HANDLE CdromHandle
  104. );
  105. BOOLEAN
  106. VerifyIsoImage(
  107. IN HANDLE IsoImageHandle,
  108. OUT PDWORD NumberOfBlocks
  109. );
  110. BOOLEAN
  111. VerifyMediaCapacity(
  112. IN HANDLE CdromHandle,
  113. IN DWORD RequiredBlocks
  114. );
  115. BOOLEAN
  116. WaitForBurnToComplete(
  117. IN HANDLE CdromHandle
  118. );
  119. BOOLEAN
  120. SetWriteModePageDao(
  121. IN HANDLE CdromHandle
  122. );
  123. BOOLEAN
  124. EraseMedia(
  125. IN HANDLE CdromHandle
  126. );