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.

325 lines
14 KiB

  1. /****************************************************************************
  2. **
  3. ** Copyright 1999 Adaptec, Inc., All Rights Reserved.
  4. **
  5. ** This software contains the valuable trade secrets of Adaptec. The
  6. ** software is protected under copyright laws as an unpublished work of
  7. ** Adaptec. Notice is for informational purposes only and does not imply
  8. ** publication. The user of this software may make copies of the software
  9. ** for use with parts manufactured by Adaptec or under license from Adaptec
  10. ** and for no other use.
  11. **
  12. ****************************************************************************/
  13. /****************************************************************************
  14. **
  15. ** Module Name: IMAPI.idl
  16. **
  17. ** Description: IDL soruce for Image Mastering API (IMAPI). The file will
  18. ** be processed by the MIDL tool to produce the type library
  19. ** (IMAPI.tlb) and marshalling code.
  20. **
  21. ** Programmers: Daniel Evers (dle)
  22. ** Tom Halloran (tgh)
  23. ** Don Lilly (drl)
  24. ** Daniel Polfer (dap)
  25. **
  26. ** History: 8/18/99 (dap) Opened history and added header.
  27. **
  28. ** Notes: This file created using 4 spaces per tab.
  29. **
  30. ****************************************************************************/
  31. import "oaidl.idl";
  32. import "ocidl.idl";
  33. import "propidl.idl";
  34. // ---------------------------------------------------------------------------
  35. [
  36. object,
  37. uuid(85AC9776-CA88-4cf2-894E-09598C078A41),
  38. helpstring("IDiscRecorder Interface"),
  39. pointer_default(unique)
  40. ]
  41. interface IDiscRecorder : IUnknown
  42. {
  43. enum MEDIA_TYPES {
  44. // Media types
  45. MEDIA_CDDA_CDROM = 1,
  46. MEDIA_CD_ROM_XA,
  47. MEDIA_CD_I,
  48. MEDIA_CD_EXTRA,
  49. MEDIA_CD_OTHER,
  50. MEDIA_SPECIAL };
  51. enum MEDIA_FLAGS {
  52. // Media flags
  53. MEDIA_BLANK = 0x00000001,
  54. MEDIA_RW = 0x00000002,
  55. MEDIA_WRITABLE = 0x00000004,
  56. MEDIA_FORMAT_UNUSABLE_BY_IMAPI = 0x00000008 };
  57. enum RECORDER_TYPES {
  58. // Recorder flags
  59. RECORDER_CDR = 0x00000001,
  60. RECORDER_CDRW = 0x00000002 };
  61. const ULONG RECORDER_DOING_NOTHING = 0;
  62. const ULONG RECORDER_OPENED = 0x00000001;
  63. const ULONG RECORDER_BURNING = 0x00000002;
  64. [helpstring("method Init")] HRESULT Init([in,size_is(nulIDSize)] byte * pbyUniqueID, [in] ULONG nulIDSize, [in] ULONG nulDriveNumber);
  65. [helpstring("method GetRecorderGUID")] HRESULT GetRecorderGUID([in,out,unique,size_is(ulBufferSize)] byte * pbyUniqueID, [in] ULONG ulBufferSize, [out] ULONG *pulReturnSizeRequired );
  66. [helpstring("method GetRecorderType")] HRESULT GetRecorderType([out] long *fTypeCode);
  67. [helpstring("method GetDisplayNames")] HRESULT GetDisplayNames( [in,out,unique] BSTR *pbstrVendorID, [in,out,unique] BSTR *pbstrProductID, [in,out,unique] BSTR *pbstrRevision );
  68. [helpstring("method GetBasePnPID")] HRESULT GetBasePnPID([out] BSTR *pbstrBasePnPID);
  69. [helpstring("method GetPath")] HRESULT GetPath([out] BSTR *pbstrPath);
  70. [helpstring("method GetRecorderProperties")] HRESULT GetRecorderProperties([out] IPropertyStorage **ppPropStg);
  71. [helpstring("method SetRecorderProperties")] HRESULT SetRecorderProperties([in] IPropertyStorage *pPropStg);
  72. [helpstring("method GetRecorderState")] HRESULT GetRecorderState([out] ULONG *pulDevStateFlags);
  73. [helpstring("method OpenExclusive")] HRESULT OpenExclusive();
  74. [helpstring("method QueryMediaType")] HRESULT QueryMediaType([out] long *fMediaType, [out] long *fMediaFlags);
  75. [helpstring("method QueryMediaInfo")] HRESULT QueryMediaInfo([out] byte *pbSessions, [out] byte *pbLastTrack, [out] ULONG *ulStartAddress, [out] ULONG *ulNextWritable, [out] ULONG *ulFreeBlocks );
  76. [helpstring("method Eject")] HRESULT Eject();
  77. [helpstring("method Erase")] HRESULT Erase( [in] boolean bFullErase );
  78. [helpstring("method Close")] HRESULT Close();
  79. };
  80. // ---------------------------------------------------------------------------
  81. [
  82. object,
  83. uuid(9B1921E1-54AC-11d3-9144-00104BA11C5E),
  84. helpstring("IEnumDiscRecorders Interface"),
  85. pointer_default(unique)
  86. ]
  87. interface IEnumDiscRecorders : IUnknown
  88. {
  89. HRESULT Next( [in] ULONG cRecorders, [out,size_is(cRecorders),length_is(*pcFetched)] IDiscRecorder **ppRecorder, [out] ULONG *pcFetched );
  90. HRESULT Skip([in] ULONG cRecorders);
  91. HRESULT Reset();
  92. HRESULT Clone([out] IEnumDiscRecorders **ppEnum);
  93. }
  94. // ---------------------------------------------------------------------------
  95. [
  96. object,
  97. uuid(DDF445E1-54BA-11d3-9144-00104BA11C5E),
  98. helpstring("IEnumDiscMasterFormats Interface"),
  99. pointer_default(unique)
  100. ]
  101. interface IEnumDiscMasterFormats : IUnknown
  102. {
  103. HRESULT Next( [in] ULONG cFormats, [out,size_is(cFormats),length_is(*pcFetched)] LPIID lpiidFormatID, [out] ULONG *pcFetched );
  104. HRESULT Skip([in] ULONG cFormats);
  105. HRESULT Reset();
  106. HRESULT Clone([out] IEnumDiscMasterFormats **ppEnum);
  107. }
  108. // ---------------------------------------------------------------------------
  109. [
  110. object,
  111. uuid(E3BC42CD-4E5C-11D3-9144-00104BA11C5E),
  112. helpstring("IRedbookDiscMaster Interface"),
  113. pointer_default(unique)
  114. ]
  115. interface IRedbookDiscMaster : IUnknown
  116. {
  117. [helpstring("method GetTotalAudioTracks")] HRESULT GetTotalAudioTracks([out,retval] long *pnTracks);
  118. [helpstring("method GetTotalAudioBlocks")] HRESULT GetTotalAudioBlocks([out,retval] long *pnBlocks);
  119. [helpstring("method GetUsedAudioBlocks")] HRESULT GetUsedAudioBlocks([out,retval] long *pnBlocks);
  120. [helpstring("method GetAvailableAudioTrackBlocks")] HRESULT GetAvailableAudioTrackBlocks([out,retval] long *pnBlocks);
  121. [helpstring("method GetAudioBlockSize")] HRESULT GetAudioBlockSize([out,retval] long *pnBlockBytes);
  122. [helpstring("method CreateAudioTrack")] HRESULT CreateAudioTrack([in] long nBlocks);
  123. [helpstring("method AddAudioTrackBlocks")] HRESULT AddAudioTrackBlocks([in,size_is(cb)] byte *pby, [in] long cb);
  124. [helpstring("method CloseAudioTrack")] HRESULT CloseAudioTrack();
  125. }
  126. // ---------------------------------------------------------------------------
  127. [
  128. object,
  129. uuid(E3BC42CE-4E5C-11D3-9144-00104BA11C5E),
  130. helpstring("IJolietDiscMaster Interface"),
  131. pointer_default(unique)
  132. ]
  133. interface IJolietDiscMaster : IUnknown
  134. {
  135. [helpstring("method GetTotalDataBlocks")] HRESULT GetTotalDataBlocks([out,retval] long *pnBlocks);
  136. [helpstring("method GetUsedDataBlocks")] HRESULT GetUsedDataBlocks([out,retval] long *pnBlocks);
  137. [helpstring("method GetDataBlockSize")] HRESULT GetDataBlockSize([out,retval] long *pnBlockBytes);
  138. [helpstring("method AddData")] HRESULT AddData([in] IStorage * pStorage, long lFileOverwrite);
  139. [helpstring("method GetJolietProperties")] HRESULT GetJolietProperties([out] IPropertyStorage **ppPropStg);
  140. [helpstring("method SetJolietProperties")] HRESULT SetJolietProperties([in] IPropertyStorage *pPropStg);
  141. }
  142. // ---------------------------------------------------------------------------
  143. [
  144. object,
  145. uuid(EC9E51C1-4E5D-11D3-9144-00104BA11C5E),
  146. helpstring("IDiscMasterProgressEvents Interface"),
  147. pointer_default(unique)
  148. ]
  149. interface IDiscMasterProgressEvents : IUnknown
  150. {
  151. [helpstring("method QueryCancel")] HRESULT QueryCancel([out,retval] boolean *pbCancel);
  152. [helpstring("method NotifyPnPActivity")] HRESULT NotifyPnPActivity();
  153. [helpstring("method NotifyAddProgress")] HRESULT NotifyAddProgress([in] long nCompletedSteps, [in] long nTotalSteps);
  154. [helpstring("method NotifyBlockProgress")] HRESULT NotifyBlockProgress([in] long nCompleted, [in] long nTotal);
  155. [helpstring("method NotifyTrackProgress")] HRESULT NotifyTrackProgress([in] long nCurrentTrack, [in] long nTotalTracks);
  156. [helpstring("method NotifyPreparingBurn")] HRESULT NotifyPreparingBurn([in] long nEstimatedSeconds);
  157. [helpstring("method NotifyClosingDisc")] HRESULT NotifyClosingDisc([in] long nEstimatedSeconds);
  158. [helpstring("method NotifyBurnComplete")] HRESULT NotifyBurnComplete([in] HRESULT status);
  159. [helpstring("method NotifyEraseComplete")] HRESULT NotifyEraseComplete([in] HRESULT status);
  160. }
  161. // ---------------------------------------------------------------------------
  162. [
  163. object,
  164. uuid(520CCA62-51A5-11D3-9144-00104BA11C5E),
  165. helpstring("IDiscMaster Interface"),
  166. pointer_default(unique)
  167. ]
  168. interface IDiscMaster : IUnknown
  169. {
  170. [helpstring("method Open")] HRESULT Open();
  171. [helpstring("method EnumDiscMasterFormats")] HRESULT EnumDiscMasterFormats([out] IEnumDiscMasterFormats **ppEnum);
  172. [helpstring("method GetActiveDiscMasterFormat")] HRESULT GetActiveDiscMasterFormat([out] LPIID lpiid );
  173. [helpstring("method SetActiveDiscMasterFormat")] HRESULT SetActiveDiscMasterFormat([in] REFIID riid, [out,iid_is(riid)] void **ppUnk);
  174. [helpstring("method EnumDiscRecorders")] HRESULT EnumDiscRecorders([out] IEnumDiscRecorders ** ppEnum);
  175. [helpstring("method GetActiveDiscRecorder")] HRESULT GetActiveDiscRecorder([out] IDiscRecorder **ppRecorder);
  176. [helpstring("method SetActiveDiscRecorder")] HRESULT SetActiveDiscRecorder([in] IDiscRecorder *pRecorder);
  177. [helpstring("method ClearFormatContent")] HRESULT ClearFormatContent();
  178. [helpstring("method ProgressAdvise")] HRESULT ProgressAdvise([in] IDiscMasterProgressEvents *pEvents, [out,retval] UINT_PTR *pvCookie);
  179. [helpstring("method ProgressUnadvise")] HRESULT ProgressUnadvise([in] UINT_PTR vCookie);
  180. [helpstring("method RecordDisc")] HRESULT RecordDisc([in] boolean bSimulate, [in] boolean bEjectAfterBurn);
  181. [helpstring("method Close")] HRESULT Close();
  182. };
  183. // ---------------------------------------------------------------------------
  184. [
  185. object,
  186. uuid(520CCA64-51A5-11D3-9144-00104BA11C5E),
  187. helpstring("IDiscStash Interface"),
  188. pointer_default(unique)
  189. ]
  190. interface IDiscStash : IUnknown
  191. {
  192. [helpstring("method OpenExclusive")] HRESULT OpenExclusive([out,retval] UINT_PTR *pvCookie);
  193. [helpstring("method GetTotalStashBytes")] HRESULT GetTotalStashBytes([in] UINT_PTR vCookie, [out, retval] unsigned __int64 *plibStashBytes);
  194. [helpstring("method Read")] HRESULT Read([in] UINT_PTR vCookie, [out, size_is(cb), length_is(*pcbRead)] byte *pby, [in] long cb, [out,retval] long *pcbRead);
  195. [helpstring("method Write")] HRESULT Write([in] UINT_PTR vCookie, [in,size_is(cb)] byte *pby, [in] long cb);
  196. [helpstring("method Seek")] HRESULT Seek([in] UINT_PTR vCookie, [in] __int64 dlibMove, [in] long dwOrigin, [out] unsigned __int64 *plibNewPosition);
  197. [helpstring("method Close")] HRESULT Close([in] UINT_PTR vCookie);
  198. [helpstring("method GetFileHandle")] HRESULT GetFileHandle([out,retval] UINT_PTR *phFileHandle);
  199. };
  200. // ---------------------------------------------------------------------------
  201. [
  202. object,
  203. uuid(520CCA66-51A5-11D3-9144-00104BA11C5E),
  204. helpstring("IBurnEngine Interface"),
  205. pointer_default(unique)
  206. ]
  207. interface IBurnEngine : IUnknown
  208. {
  209. typedef enum
  210. {
  211. eBurnProgressNoError = 0,
  212. eBurnProgressNotStarted,
  213. eBurnProgressBurning,
  214. eBurnProgressComplete,
  215. eBurnProgressError,
  216. eBurnProgressLossOfStreamingError,
  217. eBurnProgressMediaWriteProtect,
  218. eBurnProgressUnableToWriteToMedia,
  219. eBurnProgressBadHandle
  220. } BURN_PROGRESS_STATUS;
  221. typedef struct tag_BURN_PROGRESS
  222. {
  223. DWORD dwCancelBurn; // (IN) if not zero, cancel the burn.
  224. DWORD dwSectionsDone; // (OUT) Number of sections completed.
  225. DWORD dwTotalSections;// (OUT) Total number of sections to burn.
  226. DWORD dwBlocksDone; // (OUT) Number of blocks completed.
  227. DWORD dwTotalBlocks; // (OUT) Total number of blocks to burn.
  228. BURN_PROGRESS_STATUS eStatus; // (OUT) Status of the progress operation.
  229. } BURN_PROGRESS, *PBURN_PROGRESS;
  230. [helpstring("method ReadOpen")] HRESULT ReadOpen([in] long bOpen);
  231. [helpstring("method EnumDiscRecorders")] HRESULT EnumDiscRecorders([out] IEnumDiscRecorders ** ppEnum);
  232. [helpstring("method GetActiveDiscRecorder")] HRESULT GetActiveDiscRecorder([out,retval] IDiscRecorder **ppRecorder);
  233. [helpstring("method SetActiveDiscRecorder")] HRESULT SetActiveDiscRecorder([in] IDiscRecorder *pRecorder);
  234. [helpstring("method Read")] HRESULT Read([in,out]byte *pby, [in] long sb, [in] long hmb, [in] long * br );
  235. [helpstring("method GetSessionInfo")] HRESULT GetSessionInfo([in,out]byte *pbsessions, [in,out] byte *pblasttrack, [in,out] unsigned long *ulstartaddress, [in,out] unsigned long *ulnextwritable, [in,out] unsigned long *ulfreeblocks );
  236. [helpstring("method Burn")] HRESULT Burn([in,size_is(cb)] byte *pby, [in] long cb, [in] long bSimulate, [in] unsigned long ulsession, [in] unsigned long ulstartoffset, [in] long bEjectAfterBurn );
  237. [helpstring("method GetBurnProgress")] HRESULT(GetBurnProgress)([in,out]PBURN_PROGRESS pBurnProgress);
  238. };
  239. // ---------------------------------------------------------------------------
  240. [
  241. uuid(C49F2184-50A7-11D3-9144-00104BA11C5E),
  242. version(1.0),
  243. helpstring("Microsoft IMAPI 1.0 Type Library")
  244. ]
  245. library IMAPILib
  246. {
  247. // importlib("stdole32.tlb");
  248. importlib("stdole2.tlb");
  249. enum MEDIA_TYPES;
  250. enum MEDIA_FLAGS;
  251. enum RECORDER_TYPES;
  252. [
  253. uuid(520CCA61-51A5-11D3-9144-00104BA11C5E),
  254. helpstring("Microsoft IMAPI Disc Recorder")
  255. ]
  256. coclass MSDiscRecorderObj
  257. {
  258. [default] interface IDiscRecorder;
  259. };
  260. [
  261. uuid(520CCA63-51A5-11D3-9144-00104BA11C5E),
  262. helpstring("Microsoft IMAPI Disc Master")
  263. ]
  264. coclass MSDiscMasterObj
  265. {
  266. [default] interface IDiscMaster;
  267. interface IRedbookDiscMaster;
  268. interface IJolietDiscMaster;
  269. };
  270. [
  271. uuid(520CCA65-51A5-11D3-9144-00104BA11C5E),
  272. helpstring("Microsoft IMAPI Disc Stash")
  273. ]
  274. coclass MSDiscStashObj
  275. {
  276. [default] interface IDiscStash;
  277. };
  278. [
  279. uuid(520CCA67-51A5-11D3-9144-00104BA11C5E),
  280. helpstring("Microsoft IMAPI Burn Engine")
  281. ]
  282. coclass MSBurnEngineObj
  283. {
  284. [default] interface IBurnEngine;
  285. };
  286. [
  287. uuid(8A03567A-63CB-4BA8-BAF6-52119816D1EF),
  288. helpstring("Microsoft IMAPI Disc Recorder Enumerator")
  289. ]
  290. coclass MSEnumDiscRecordersObj
  291. {
  292. [default] interface IEnumDiscRecorders;
  293. };
  294. };