Leaked source code of windows server 2003
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.

255 lines
11 KiB

  1. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  2. /****************************************************************************
  3. **
  4. ** Copyright 1999 Adaptec, Inc., All Rights Reserved.
  5. **
  6. ** This software contains the valuable trade secrets of Adaptec. The
  7. ** software is protected under copyright laws as an unpublished work of
  8. ** Adaptec. Notice is for informational purposes only and does not imply
  9. ** publication. The user of this software may make copies of the software
  10. ** for use with parts manufactured by Adaptec or under license from Adaptec
  11. ** and for no other use.
  12. **
  13. ****************************************************************************/
  14. /****************************************************************************
  15. **
  16. ** Module Name: IMAPI.idl
  17. **
  18. ** Description: IDL soruce for Image Mastering API (IMAPI). The file will
  19. ** be processed by the MIDL tool to produce the type library
  20. ** (IMAPI.tlb) and marshalling code.
  21. **
  22. ** Programmers: Daniel Evers (dle)
  23. ** Tom Halloran (tgh)
  24. ** Don Lilly (drl)
  25. ** Daniel Polfer (dap)
  26. **
  27. ** History: 8/18/99 (dap) Opened history and added header.
  28. **
  29. ** Notes: This file created using 4 spaces per tab.
  30. **
  31. ****************************************************************************/
  32. import "oaidl.idl";
  33. import "ocidl.idl";
  34. import "propidl.idl";
  35. // ---------------------------------------------------------------------------
  36. [
  37. object,
  38. uuid(85AC9776-CA88-4cf2-894E-09598C078A41),
  39. helpstring("IDiscRecorder Interface"),
  40. pointer_default(unique)
  41. ]
  42. interface IDiscRecorder : IUnknown
  43. {
  44. enum MEDIA_TYPES {
  45. // Media types
  46. MEDIA_CDDA_CDROM = 1,
  47. MEDIA_CD_ROM_XA,
  48. MEDIA_CD_I,
  49. MEDIA_CD_EXTRA,
  50. MEDIA_CD_OTHER,
  51. MEDIA_SPECIAL
  52. };
  53. enum MEDIA_FLAGS {
  54. // Media flags
  55. MEDIA_BLANK = 0x00000001,
  56. MEDIA_RW = 0x00000002,
  57. MEDIA_WRITABLE = 0x00000004,
  58. MEDIA_FORMAT_UNUSABLE_BY_IMAPI = 0x00000008
  59. };
  60. enum RECORDER_TYPES {
  61. // Recorder flags
  62. RECORDER_CDR = 0x00000001,
  63. RECORDER_CDRW = 0x00000002
  64. };
  65. const ULONG RECORDER_DOING_NOTHING = 0;
  66. const ULONG RECORDER_OPENED = 0x00000001;
  67. const ULONG RECORDER_BURNING = 0x00000002;
  68. [helpstring("method Init")] HRESULT Init([in,size_is(nulIDSize)] byte * pbyUniqueID, [in] ULONG nulIDSize, [in] ULONG nulDriveNumber);
  69. [helpstring("method GetRecorderGUID")] HRESULT GetRecorderGUID([in,out,unique,size_is(ulBufferSize)] byte * pbyUniqueID, [in] ULONG ulBufferSize, [out] ULONG *pulReturnSizeRequired );
  70. [helpstring("method GetRecorderType")] HRESULT GetRecorderType([out] long *fTypeCode);
  71. [helpstring("method GetDisplayNames")] HRESULT GetDisplayNames( [in,out,unique] BSTR *pbstrVendorID, [in,out,unique] BSTR *pbstrProductID, [in,out,unique] BSTR *pbstrRevision );
  72. [helpstring("method GetBasePnPID")] HRESULT GetBasePnPID([out] BSTR *pbstrBasePnPID);
  73. [helpstring("method GetPath")] HRESULT GetPath([out] BSTR *pbstrPath);
  74. [helpstring("method GetRecorderProperties")] HRESULT GetRecorderProperties([out] IPropertyStorage **ppPropStg);
  75. [helpstring("method SetRecorderProperties")] HRESULT SetRecorderProperties([in] IPropertyStorage *pPropStg);
  76. [helpstring("method GetRecorderState")] HRESULT GetRecorderState([out] ULONG *pulDevStateFlags);
  77. [helpstring("method OpenExclusive")] HRESULT OpenExclusive();
  78. [helpstring("method QueryMediaType")] HRESULT QueryMediaType([out] long *fMediaType, [out] long *fMediaFlags);
  79. [helpstring("method QueryMediaInfo")] HRESULT QueryMediaInfo([out] byte *pbSessions, [out] byte *pbLastTrack, [out] ULONG *ulStartAddress, [out] ULONG *ulNextWritable, [out] ULONG *ulFreeBlocks );
  80. [helpstring("method Eject")] HRESULT Eject();
  81. [helpstring("method Erase")] HRESULT Erase( [in] boolean bFullErase );
  82. [helpstring("method Close")] HRESULT Close();
  83. };
  84. // ---------------------------------------------------------------------------
  85. [
  86. object,
  87. uuid(9B1921E1-54AC-11d3-9144-00104BA11C5E),
  88. helpstring("IEnumDiscRecorders Interface"),
  89. pointer_default(unique)
  90. ]
  91. interface IEnumDiscRecorders : IUnknown
  92. {
  93. HRESULT Next( [in] ULONG cRecorders, [out,size_is(cRecorders),length_is(*pcFetched)] IDiscRecorder **ppRecorder, [out] ULONG *pcFetched );
  94. HRESULT Skip([in] ULONG cRecorders);
  95. HRESULT Reset();
  96. HRESULT Clone([out] IEnumDiscRecorders **ppEnum);
  97. }
  98. // ---------------------------------------------------------------------------
  99. [
  100. object,
  101. uuid(DDF445E1-54BA-11d3-9144-00104BA11C5E),
  102. helpstring("IEnumDiscMasterFormats Interface"),
  103. pointer_default(unique)
  104. ]
  105. interface IEnumDiscMasterFormats : IUnknown
  106. {
  107. HRESULT Next( [in] ULONG cFormats, [out,size_is(cFormats),length_is(*pcFetched)] LPIID lpiidFormatID, [out] ULONG *pcFetched );
  108. HRESULT Skip([in] ULONG cFormats);
  109. HRESULT Reset();
  110. HRESULT Clone([out] IEnumDiscMasterFormats **ppEnum);
  111. }
  112. // ---------------------------------------------------------------------------
  113. [
  114. object,
  115. uuid(E3BC42CD-4E5C-11D3-9144-00104BA11C5E),
  116. helpstring("IRedbookDiscMaster Interface"),
  117. pointer_default(unique)
  118. ]
  119. interface IRedbookDiscMaster : IUnknown
  120. {
  121. [helpstring("method GetTotalAudioTracks")] HRESULT GetTotalAudioTracks([out,retval] long *pnTracks);
  122. [helpstring("method GetTotalAudioBlocks")] HRESULT GetTotalAudioBlocks([out,retval] long *pnBlocks);
  123. [helpstring("method GetUsedAudioBlocks")] HRESULT GetUsedAudioBlocks([out,retval] long *pnBlocks);
  124. [helpstring("method GetAvailableAudioTrackBlocks")] HRESULT GetAvailableAudioTrackBlocks([out,retval] long *pnBlocks);
  125. [helpstring("method GetAudioBlockSize")] HRESULT GetAudioBlockSize([out,retval] long *pnBlockBytes);
  126. [helpstring("method CreateAudioTrack")] HRESULT CreateAudioTrack([in] long nBlocks);
  127. [helpstring("method AddAudioTrackBlocks")] HRESULT AddAudioTrackBlocks([in,size_is(cb)] byte *pby, [in] long cb);
  128. [helpstring("method CloseAudioTrack")] HRESULT CloseAudioTrack();
  129. }
  130. // ---------------------------------------------------------------------------
  131. [
  132. object,
  133. uuid(E3BC42CE-4E5C-11D3-9144-00104BA11C5E),
  134. helpstring("IJolietDiscMaster Interface"),
  135. pointer_default(unique)
  136. ]
  137. interface IJolietDiscMaster : IUnknown
  138. {
  139. [helpstring("method GetTotalDataBlocks")] HRESULT GetTotalDataBlocks([out,retval] long *pnBlocks);
  140. [helpstring("method GetUsedDataBlocks")] HRESULT GetUsedDataBlocks([out,retval] long *pnBlocks);
  141. [helpstring("method GetDataBlockSize")] HRESULT GetDataBlockSize([out,retval] long *pnBlockBytes);
  142. [helpstring("method AddData")] HRESULT AddData([in] IStorage * pStorage, long lFileOverwrite);
  143. [helpstring("method GetJolietProperties")] HRESULT GetJolietProperties([out] IPropertyStorage **ppPropStg);
  144. [helpstring("method SetJolietProperties")] HRESULT SetJolietProperties([in] IPropertyStorage *pPropStg);
  145. }
  146. // ---------------------------------------------------------------------------
  147. [
  148. object,
  149. uuid(EC9E51C1-4E5D-11D3-9144-00104BA11C5E),
  150. helpstring("IDiscMasterProgressEvents Interface"),
  151. pointer_default(unique)
  152. ]
  153. interface IDiscMasterProgressEvents : IUnknown
  154. {
  155. [helpstring("method QueryCancel")] HRESULT QueryCancel([out,retval] boolean *pbCancel);
  156. [helpstring("method NotifyPnPActivity")] HRESULT NotifyPnPActivity();
  157. [helpstring("method NotifyAddProgress")] HRESULT NotifyAddProgress([in] long nCompletedSteps, [in] long nTotalSteps);
  158. [helpstring("method NotifyBlockProgress")] HRESULT NotifyBlockProgress([in] long nCompleted, [in] long nTotal);
  159. [helpstring("method NotifyTrackProgress")] HRESULT NotifyTrackProgress([in] long nCurrentTrack, [in] long nTotalTracks);
  160. [helpstring("method NotifyPreparingBurn")] HRESULT NotifyPreparingBurn([in] long nEstimatedSeconds);
  161. [helpstring("method NotifyClosingDisc")] HRESULT NotifyClosingDisc([in] long nEstimatedSeconds);
  162. [helpstring("method NotifyBurnComplete")] HRESULT NotifyBurnComplete([in] HRESULT status);
  163. [helpstring("method NotifyEraseComplete")] HRESULT NotifyEraseComplete([in] HRESULT status);
  164. }
  165. // ---------------------------------------------------------------------------
  166. [
  167. object,
  168. uuid(520CCA62-51A5-11D3-9144-00104BA11C5E),
  169. helpstring("IDiscMaster Interface"),
  170. pointer_default(unique)
  171. ]
  172. interface IDiscMaster : IUnknown
  173. {
  174. [helpstring("method Open")] HRESULT Open();
  175. [helpstring("method EnumDiscMasterFormats")] HRESULT EnumDiscMasterFormats([out] IEnumDiscMasterFormats **ppEnum);
  176. [helpstring("method GetActiveDiscMasterFormat")] HRESULT GetActiveDiscMasterFormat([out] LPIID lpiid );
  177. [helpstring("method SetActiveDiscMasterFormat")] HRESULT SetActiveDiscMasterFormat([in] REFIID riid, [out,iid_is(riid)] void **ppUnk);
  178. [helpstring("method EnumDiscRecorders")] HRESULT EnumDiscRecorders([out] IEnumDiscRecorders ** ppEnum);
  179. [helpstring("method GetActiveDiscRecorder")] HRESULT GetActiveDiscRecorder([out] IDiscRecorder **ppRecorder);
  180. [helpstring("method SetActiveDiscRecorder")] HRESULT SetActiveDiscRecorder([in] IDiscRecorder *pRecorder);
  181. [helpstring("method ClearFormatContent")] HRESULT ClearFormatContent();
  182. [helpstring("method ProgressAdvise")] HRESULT ProgressAdvise([in] IDiscMasterProgressEvents *pEvents, [out,retval] UINT_PTR *pvCookie);
  183. [helpstring("method ProgressUnadvise")] HRESULT ProgressUnadvise([in] UINT_PTR vCookie);
  184. [helpstring("method RecordDisc")] HRESULT RecordDisc([in] boolean bSimulate, [in] boolean bEjectAfterBurn);
  185. [helpstring("method Close")] HRESULT Close();
  186. };
  187. // ---------------------------------------------------------------------------
  188. [
  189. uuid(C49F2184-50A7-11D3-9144-00104BA11C5E),
  190. version(1.0),
  191. helpstring("Microsoft IMAPI 1.0 Type Library")
  192. ]
  193. library IMAPILib
  194. {
  195. importlib("stdole2.tlb");
  196. enum MEDIA_TYPES;
  197. enum MEDIA_FLAGS;
  198. enum RECORDER_TYPES;
  199. //////////////////////////////////////////////////
  200. [
  201. uuid(520CCA61-51A5-11D3-9144-00104BA11C5E),
  202. helpstring("Microsoft IMAPI Disc Recorder")
  203. ]
  204. coclass MSDiscRecorderObj
  205. {
  206. [default] interface IDiscRecorder;
  207. };
  208. //////////////////////////////////////////////////
  209. [
  210. uuid(520CCA63-51A5-11D3-9144-00104BA11C5E),
  211. helpstring("Microsoft IMAPI Disc Master")
  212. ]
  213. coclass MSDiscMasterObj
  214. {
  215. [default] interface IDiscMaster;
  216. interface IRedbookDiscMaster;
  217. interface IJolietDiscMaster;
  218. };
  219. //////////////////////////////////////////////////
  220. [
  221. uuid(8A03567A-63CB-4BA8-BAF6-52119816D1EF),
  222. helpstring("Microsoft IMAPI Disc Recorder Enumerator")
  223. ]
  224. coclass MSEnumDiscRecordersObj
  225. {
  226. [default] interface IEnumDiscRecorders;
  227. };
  228. //////////////////////////////////////////////////
  229. };