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.

613 lines
23 KiB

  1. //
  2. // Microsoft Windows Media Technologies
  3. // Copyright (C) Microsoft Corporation, 1999 - 2001. All rights reserved.
  4. //
  5. import "unknwn.idl";
  6. import "objidl.idl";
  7. import "wtypes.idl";
  8. typedef struct _tWAVEFORMATEX
  9. {
  10. WORD wFormatTag; /* format type */
  11. WORD nChannels; /* number of channels (i.e. mono, stereo...) */
  12. DWORD nSamplesPerSec; /* sample rate */
  13. DWORD nAvgBytesPerSec; /* for buffer estimation */
  14. WORD nBlockAlign; /* block size of data */
  15. WORD wBitsPerSample; /* Number of bits per sample of mono data */
  16. WORD cbSize; /* The count in bytes of the size of
  17. extra information (after cbSize) */
  18. } _WAVEFORMATEX;
  19. typedef struct _tagBITMAPINFOHEADER
  20. {
  21. DWORD biSize;
  22. LONG biWidth;
  23. LONG biHeight;
  24. WORD biPlanes;
  25. WORD biBitCount;
  26. DWORD biCompression;
  27. DWORD biSizeImage;
  28. LONG biXPelsPerMeter;
  29. LONG biYPelsPerMeter;
  30. DWORD biClrUsed;
  31. DWORD biClrImportant;
  32. } _BITMAPINFOHEADER;
  33. typedef struct _tagVIDEOINFOHEADER{
  34. RECT rcSource;
  35. RECT rcTarget;
  36. DWORD dwBitRate;
  37. DWORD dwBitErrorRate;
  38. LONGLONG AvgTimePerFrame;
  39. _BITMAPINFOHEADER bmiHeader;
  40. } _VIDEOINFOHEADER;
  41. typedef struct _tagWMFILECAPABILITIES
  42. {
  43. LPWSTR pwszMimeType; // Mime type
  44. DWORD dwReserved; // Recerved for future use - Should be 0 for now.
  45. } WMFILECAPABILITIES;
  46. typedef struct __OPAQUECOMMAND
  47. {
  48. GUID guidCommand;
  49. DWORD dwDataLen;
  50. [size_is(dwDataLen)]BYTE *pData;
  51. BYTE abMAC[20];
  52. } OPAQUECOMMAND;
  53. cpp_quote("#define WMDMID_LENGTH 128")
  54. #define WMDMID_LENGTH 128
  55. typedef struct __WMDMID
  56. {
  57. UINT cbSize;
  58. DWORD dwVendorID;
  59. BYTE pID[WMDMID_LENGTH];
  60. UINT SerialNumberLength;
  61. } WMDMID, *PWMDMID;
  62. typedef struct _WMDMDATETIME {
  63. WORD wYear;
  64. WORD wMonth;
  65. WORD wDay;
  66. WORD wHour;
  67. WORD wMinute;
  68. WORD wSecond;
  69. } WMDMDATETIME, *PWMDMDATETIME;
  70. typedef struct __WMDMRIGHTS
  71. {
  72. UINT cbSize;
  73. DWORD dwContentType;
  74. DWORD fuFlags;
  75. DWORD fuRights;
  76. DWORD dwAppSec;
  77. DWORD dwPlaybackCount;
  78. WMDMDATETIME ExpirationDate;
  79. } WMDMRIGHTS, *PWMDMRIGHTS;
  80. cpp_quote("#define WMDM_MAC_LENGTH 8")
  81. #define WMDM_MAC_LENGTH 8
  82. cpp_quote("// WMDM HRESULTS")
  83. cpp_quote("#define WMDM_E_BUSY 0x80045000L")
  84. cpp_quote("#define WMDM_E_INTERFACEDEAD 0x80045001L")
  85. cpp_quote("#define WMDM_E_INVALIDTYPE 0x80045002L")
  86. cpp_quote("#define WMDM_E_PROCESSFAILED 0x80045003L")
  87. cpp_quote("#define WMDM_E_NOTSUPPORTED 0x80045004L")
  88. cpp_quote("#define WMDM_E_NOTCERTIFIED 0x80045005L")
  89. cpp_quote("#define WMDM_E_NORIGHTS 0x80045006L")
  90. cpp_quote("#define WMDM_E_CALL_OUT_OF_SEQUENCE 0x80045007L")
  91. cpp_quote("#define WMDM_E_BUFFERTOOSMALL 0x80045008L")
  92. cpp_quote("#define WMDM_E_MOREDATA 0x80045009L")
  93. cpp_quote("#define WMDM_E_MAC_CHECK_FAILED 0x8004500AL")
  94. cpp_quote("#define WMDM_E_USER_CANCELLED 0x8004500BL")
  95. cpp_quote("#define WMDM_E_SDMI_TRIGGER 0x8004500CL")
  96. cpp_quote("#define WMDM_E_SDMI_NOMORECOPIES 0x8004500DL")
  97. cpp_quote("#define WMDM_E_REVOKED 0x8004500EL")
  98. cpp_quote("// Revocation Flags")
  99. cpp_quote("#define WMDM_WMDM_REVOKED 0x00000001")
  100. cpp_quote("#define WMDM_APP_REVOKED 0x00000002")
  101. cpp_quote("#define WMDM_SP_REVOKED 0x00000004")
  102. cpp_quote("#define WMDM_SCP_REVOKED 0x00000008")
  103. cpp_quote("// GetFormatSupport2 Flags")
  104. cpp_quote("#define WMDM_GET_FORMAT_SUPPORT_AUDIO 0x00000001")
  105. cpp_quote("#define WMDM_GET_FORMAT_SUPPORT_VIDEO 0x00000002")
  106. cpp_quote("#define WMDM_GET_FORMAT_SUPPORT_FILE 0x00000004")
  107. cpp_quote("// MDMRIGHTS Flags")
  108. cpp_quote("#define WMDM_RIGHTS_PLAYBACKCOUNT 0x00000001")
  109. cpp_quote("#define WMDM_RIGHTS_EXPIRATIONDATE 0x00000002")
  110. cpp_quote("#define WMDM_RIGHTS_GROUPID 0x00000004")
  111. cpp_quote("#define WMDM_RIGHTS_FREESERIALIDS 0x00000008")
  112. cpp_quote("#define WMDM_RIGHTS_NAMEDSERIALIDS 0x00000010")
  113. cpp_quote("// Device Type Flags")
  114. cpp_quote("#define WMDM_DEVICE_TYPE_PLAYBACK 0x00000001")
  115. cpp_quote("#define WMDM_DEVICE_TYPE_RECORD 0x00000002")
  116. cpp_quote("#define WMDM_DEVICE_TYPE_DECODE 0x00000004")
  117. cpp_quote("#define WMDM_DEVICE_TYPE_ENCODE 0x00000008")
  118. cpp_quote("#define WMDM_DEVICE_TYPE_STORAGE 0x00000010")
  119. cpp_quote("#define WMDM_DEVICE_TYPE_VIRTUAL 0x00000020")
  120. cpp_quote("#define WMDM_DEVICE_TYPE_SDMI 0x00000040")
  121. cpp_quote("#define WMDM_DEVICE_TYPE_NONSDMI 0x00000080")
  122. cpp_quote("#define WMDM_DEVICE_TYPE_NONREENTRANT 0x00000100")
  123. cpp_quote("#define WMDM_DEVICE_TYPE_FILELISTRESYNC 0x00000200")
  124. cpp_quote("// Device Power Source Flags")
  125. cpp_quote("#define WMDM_POWER_CAP_BATTERY 0x00000001")
  126. cpp_quote("#define WMDM_POWER_CAP_EXTERNAL 0x00000002")
  127. cpp_quote("#define WMDM_POWER_IS_BATTERY 0x00000004")
  128. cpp_quote("#define WMDM_POWER_IS_EXTERNAL 0x00000008")
  129. cpp_quote("#define WMDM_POWER_PERCENT_AVAILABLE 0x00000010")
  130. cpp_quote("// Device Status Flags")
  131. cpp_quote("#define WMDM_STATUS_READY 0x00000001")
  132. cpp_quote("#define WMDM_STATUS_BUSY 0x00000002")
  133. cpp_quote("#define WMDM_STATUS_DEVICE_NOTPRESENT 0x00000004")
  134. cpp_quote("#define WMDM_STATUS_DEVICECONTROL_PLAYING 0x00000008")
  135. cpp_quote("#define WMDM_STATUS_DEVICECONTROL_RECORDING 0x00000010")
  136. cpp_quote("#define WMDM_STATUS_DEVICECONTROL_PAUSED 0x00000020")
  137. cpp_quote("#define WMDM_STATUS_DEVICECONTROL_REMOTE 0x00000040")
  138. cpp_quote("#define WMDM_STATUS_DEVICECONTROL_STREAM 0x00000080")
  139. cpp_quote("#define WMDM_STATUS_STORAGE_NOTPRESENT 0x00000100")
  140. cpp_quote("#define WMDM_STATUS_STORAGE_INITIALIZING 0x00000200")
  141. cpp_quote("#define WMDM_STATUS_STORAGE_BROKEN 0x00000400")
  142. cpp_quote("#define WMDM_STATUS_STORAGE_NOTSUPPORTED 0x00000800")
  143. cpp_quote("#define WMDM_STATUS_STORAGE_UNFORMATTED 0x00001000")
  144. cpp_quote("#define WMDM_STATUS_STORAGECONTROL_INSERTING 0x00002000")
  145. cpp_quote("#define WMDM_STATUS_STORAGECONTROL_DELETING 0x00004000")
  146. cpp_quote("#define WMDM_STATUS_STORAGECONTROL_APPENDING 0x00008000")
  147. cpp_quote("#define WMDM_STATUS_STORAGECONTROL_MOVING 0x00010000")
  148. cpp_quote("#define WMDM_STATUS_STORAGECONTROL_READING 0x00020000")
  149. cpp_quote("// Device Capabilities Flags")
  150. cpp_quote("#define WMDM_DEVICECAP_CANPLAY 0x00000001")
  151. cpp_quote("#define WMDM_DEVICECAP_CANSTREAMPLAY 0x00000002")
  152. cpp_quote("#define WMDM_DEVICECAP_CANRECORD 0x00000004")
  153. cpp_quote("#define WMDM_DEVICECAP_CANSTREAMRECORD 0x00000008")
  154. cpp_quote("#define WMDM_DEVICECAP_CANPAUSE 0x00000010")
  155. cpp_quote("#define WMDM_DEVICECAP_CANRESUME 0x00000020")
  156. cpp_quote("#define WMDM_DEVICECAP_CANSTOP 0x00000040")
  157. cpp_quote("#define WMDM_DEVICECAP_CANSEEK 0x00000080")
  158. cpp_quote("// WMDM Seek Flags")
  159. cpp_quote("#define WMDM_SEEK_REMOTECONTROL 0x00000001")
  160. cpp_quote("#define WMDM_SEEK_STREAMINGAUDIO 0x00000002")
  161. cpp_quote("// Storage Attributes Flags")
  162. cpp_quote("#define WMDM_STORAGE_ATTR_FILESYSTEM 0x00000001")
  163. cpp_quote("#define WMDM_STORAGE_ATTR_REMOVABLE 0x00000002")
  164. cpp_quote("#define WMDM_STORAGE_ATTR_NONREMOVABLE 0x00000004")
  165. cpp_quote("#define WMDM_FILE_ATTR_FOLDER 0x00000008")
  166. cpp_quote("#define WMDM_FILE_ATTR_LINK 0x00000010")
  167. cpp_quote("#define WMDM_FILE_ATTR_FILE 0x00000020")
  168. cpp_quote("#define WMDM_FILE_ATTR_VIDEO 0x00000040")
  169. cpp_quote("#define WMDM_STORAGE_ATTR_FOLDERS 0x00000100")
  170. // These flag are defined below but can be used with this group of flags also
  171. //cpp_quote("#define WMDM_STORAGECONTROL_INSERTBEFORE 0x00000200")
  172. //cpp_quote("#define WMDM_STORAGECONTROL_INSERTAFTER 0x00000400")
  173. //cpp_quote("#define WMDM_STORAGECONTROL_INSERTINTO 0x00000800")
  174. cpp_quote("#define WMDM_FILE_ATTR_AUDIO 0x00001000")
  175. cpp_quote("#define WMDM_FILE_ATTR_DATA 0x00002000")
  176. cpp_quote("#define WMDM_FILE_ATTR_CANPLAY 0x00004000")
  177. cpp_quote("#define WMDM_FILE_ATTR_CANDELETE 0x00008000")
  178. cpp_quote("#define WMDM_FILE_ATTR_CANMOVE 0x00010000")
  179. cpp_quote("#define WMDM_FILE_ATTR_CANRENAME 0x00020000")
  180. cpp_quote("#define WMDM_FILE_ATTR_CANREAD 0x00040000")
  181. cpp_quote("#define WMDM_FILE_ATTR_MUSIC 0x00080000")
  182. cpp_quote("#define WMDM_FILE_CREATE_OVERWRITE 0x00100000")
  183. cpp_quote("#define WMDM_FILE_ATTR_AUDIOBOOK 0x00200000")
  184. cpp_quote("#define WMDM_FILE_ATTR_HIDDEN 0x00400000")
  185. cpp_quote("#define WMDM_FILE_ATTR_SYSTEM 0x00800000")
  186. cpp_quote("#define WMDM_FILE_ATTR_READONLY 0x01000000")
  187. cpp_quote("#define WMDM_STORAGE_ATTR_HAS_FOLDERS 0x02000000")
  188. cpp_quote("#define WMDM_STORAGE_ATTR_HAS_FILES 0x04000000")
  189. cpp_quote("#define WMDM_STORAGE_IS_DEFAULT 0x08000000")
  190. cpp_quote("#define WMDM_STORAGE_CONTAINS_DEFAULT 0x10000000")
  191. cpp_quote("// Storage Capabilities Flags")
  192. cpp_quote("#define WMDM_STORAGECAP_FOLDERSINROOT 0x00000001")
  193. cpp_quote("#define WMDM_STORAGECAP_FILESINROOT 0x00000002")
  194. cpp_quote("#define WMDM_STORAGECAP_FOLDERSINFOLDERS 0x00000004")
  195. cpp_quote("#define WMDM_STORAGECAP_FILESINFOLDERS 0x00000008")
  196. cpp_quote("#define WMDM_STORAGECAP_FOLDERLIMITEXISTS 0x00000010")
  197. cpp_quote("#define WMDM_STORAGECAP_FILELIMITEXISTS 0x00000020")
  198. cpp_quote("// WMDM Mode Flags")
  199. cpp_quote("#define WMDM_MODE_BLOCK 0x00000001")
  200. cpp_quote("#define WMDM_MODE_THREAD 0x00000002")
  201. cpp_quote("#define WMDM_CONTENT_FILE 0x00000004")
  202. cpp_quote("#define WMDM_CONTENT_FOLDER 0x00000008")
  203. cpp_quote("#define WMDM_CONTENT_OPERATIONINTERFACE 0x00000010")
  204. cpp_quote("#define WMDM_MODE_QUERY 0x00000020")
  205. cpp_quote("#define WMDM_MODE_PROGRESS 0x00000040")
  206. cpp_quote("#define WMDM_MODE_TRANSFER_PROTECTED 0x00000080")
  207. cpp_quote("#define WMDM_MODE_TRANSFER_UNPROTECTED 0x00000100")
  208. cpp_quote("#define WMDM_STORAGECONTROL_INSERTBEFORE 0x00000200")
  209. cpp_quote("#define WMDM_STORAGECONTROL_INSERTAFTER 0x00000400")
  210. cpp_quote("#define WMDM_STORAGECONTROL_INSERTINTO 0x00000800")
  211. cpp_quote("#define WMDM_MODE_RECURSIVE 0x00001000")
  212. //cpp_quote("#define WMDM_FILE_CREATE_OVERWRITE 0x00100000")
  213. cpp_quote("// WMDM Rights Flags")
  214. cpp_quote("// NON_SDMI = !SDMI_PROTECTED")
  215. cpp_quote("// SDMI = SDMI_VALIDATED")
  216. cpp_quote("#define WMDM_RIGHTS_PLAY_ON_PC 0x00000001")
  217. cpp_quote("#define WMDM_RIGHTS_COPY_TO_NON_SDMI_DEVICE 0x00000002")
  218. cpp_quote("#define WMDM_RIGHTS_COPY_TO_CD 0x00000008")
  219. cpp_quote("#define WMDM_RIGHTS_COPY_TO_SDMI_DEVICE 0x00000010")
  220. cpp_quote("// WMDM Seek Flags")
  221. cpp_quote("#define WMDM_SEEK_BEGIN 0x00000001")
  222. cpp_quote("#define WMDM_SEEK_CURRENT 0x00000002")
  223. cpp_quote("#define WMDM_SEEK_END 0x00000008")
  224. interface IWMDMStorage;
  225. interface IWMDMStorage2;
  226. interface IWMDMProgress;
  227. interface IWMDMProgress2;
  228. interface IWMDMDevice;
  229. interface IWMDMDevice2;
  230. interface IWMDMEnumDevice;
  231. interface IWMDMEnumStorage;
  232. interface IWMDMRevoked;
  233. // IWMDeviceManager
  234. [
  235. object,
  236. uuid(1DCB3A00-33ED-11d3-8470-00C04F79DBC0),
  237. pointer_default(unique)
  238. ]
  239. interface IWMDeviceManager : IUnknown
  240. {
  241. HRESULT GetRevision([out] DWORD *pdwRevision);
  242. HRESULT GetDeviceCount([out]DWORD *pdwCount);
  243. HRESULT EnumDevices([out] IWMDMEnumDevice **ppEnumDevice);
  244. };
  245. // IWMDeviceManager2
  246. [
  247. object,
  248. uuid(923E5249-8731-4c5b-9B1C-B8B60B6E46AF),
  249. pointer_default(unique)
  250. ]
  251. interface IWMDeviceManager2 : IWMDeviceManager
  252. {
  253. HRESULT GetDeviceFromPnPName( [in, string] LPCWSTR pwszPnPName,
  254. [out] IWMDMDevice** ppDevice );
  255. }
  256. // IWMDMStorageGlobals
  257. [
  258. object,
  259. uuid(1DCB3A07-33ED-11d3-8470-00C04F79DBC0),
  260. pointer_default(unique)
  261. ]
  262. interface IWMDMStorageGlobals : IUnknown
  263. {
  264. HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
  265. HRESULT GetSerialNumber([out] PWMDMID pSerialNum,
  266. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  267. HRESULT GetTotalSize([out] DWORD *pdwTotalSizeLow,
  268. [out] DWORD *pdwTotalSizeHigh);
  269. HRESULT GetTotalFree([out] DWORD *pdwFreeLow,
  270. [out] DWORD *pdwFreeHigh);
  271. HRESULT GetTotalBad([out] DWORD *pdwBadLow,
  272. [out] DWORD *pdwBadHigh);
  273. HRESULT GetStatus([out] DWORD *pdwStatus);
  274. HRESULT Initialize([in] UINT fuMode,
  275. [in] IWMDMProgress *pProgress);
  276. };
  277. // IWMDMStorage
  278. [
  279. object,
  280. uuid(1DCB3A06-33ED-11d3-8470-00C04F79DBC0),
  281. pointer_default(unique)
  282. ]
  283. interface IWMDMStorage : IUnknown
  284. {
  285. HRESULT SetAttributes([in] DWORD dwAttributes,
  286. [in] _WAVEFORMATEX *pFormat);
  287. HRESULT GetStorageGlobals([out]IWMDMStorageGlobals **ppStorageGlobals);
  288. HRESULT GetAttributes([out] DWORD *pdwAttributes,
  289. [out] _WAVEFORMATEX *pFormat);
  290. HRESULT GetName([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  291. [in] UINT nMaxChars);
  292. HRESULT GetDate([out] PWMDMDATETIME pDateTimeUTC);
  293. HRESULT GetSize([out] DWORD *pdwSizeLow,
  294. [out] DWORD *pdwSizeHigh);
  295. HRESULT GetRights([out, size_is(, *pnRightsCount)] PWMDMRIGHTS *ppRights,
  296. [out] UINT *pnRightsCount,
  297. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  298. HRESULT EnumStorage([out] IWMDMEnumStorage **pEnumStorage);
  299. HRESULT SendOpaqueCommand([in,out] OPAQUECOMMAND *pCommand);
  300. };
  301. // IWMDMStorage2
  302. [
  303. object,
  304. uuid(1ED5A144-5CD5-4683-9EFF-72CBDB2D9533),
  305. pointer_default(unique)
  306. ]
  307. interface IWMDMStorage2 : IWMDMStorage
  308. {
  309. HRESULT GetStorage([in, string] LPCWSTR pszStorageName, [out] IWMDMStorage** ppStorage );
  310. HRESULT SetAttributes2( [in] DWORD dwAttributes,
  311. [in] DWORD dwAttributesEx,
  312. [in] _WAVEFORMATEX *pFormat,
  313. [in] _VIDEOINFOHEADER* pVideoFormat );
  314. HRESULT GetAttributes2( [out] DWORD *pdwAttributes,
  315. [out] DWORD *pdwAttributesEx,
  316. [out] _WAVEFORMATEX *pAudioFormat,
  317. [out] _VIDEOINFOHEADER* pVideoFormat );
  318. }
  319. // IWMDMOperation
  320. [
  321. object,
  322. uuid(1DCB3A0B-33ED-11d3-8470-00C04F79DBC0),
  323. pointer_default(unique)
  324. ]
  325. interface IWMDMOperation : IUnknown
  326. {
  327. HRESULT BeginRead();
  328. HRESULT BeginWrite();
  329. HRESULT GetObjectName([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  330. [in] UINT nMaxChars);
  331. HRESULT SetObjectName([in,string,size_is(nMaxChars)] LPWSTR pwszName,
  332. [in] UINT nMaxChars);
  333. HRESULT GetObjectAttributes([out] DWORD *pdwAttributes,
  334. [out] _WAVEFORMATEX *pFormat);
  335. HRESULT SetObjectAttributes([in] DWORD dwAttributes,
  336. [in] _WAVEFORMATEX *pFormat);
  337. HRESULT GetObjectTotalSize([out] DWORD *pdwSize,
  338. [out] DWORD *pdwSizeHigh);
  339. HRESULT SetObjectTotalSize([in] DWORD dwSize,
  340. [in] DWORD dwSizeHigh);
  341. HRESULT TransferObjectData([in,out,size_is(*pdwSize)] BYTE *pData,
  342. [in,out] DWORD *pdwSize,
  343. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  344. HRESULT End([in] HRESULT *phCompletionCode,
  345. [in] IUnknown *pNewObject);
  346. };
  347. // IWMDMOperation2
  348. [
  349. object,
  350. uuid(33445B48-7DF7-425c-AD8F-0FC6D82F9F75),
  351. pointer_default(unique)
  352. ]
  353. interface IWMDMOperation2 : IWMDMOperation
  354. {
  355. HRESULT SetObjectAttributes2( [in] DWORD dwAttributes,
  356. [in] DWORD dwAttributesEx,
  357. [in] _WAVEFORMATEX *pFormat,
  358. [in] _VIDEOINFOHEADER* pVideoFormat );
  359. HRESULT GetObjectAttributes2( [out] DWORD *pdwAttributes,
  360. [out] DWORD *pdwAttributesEx,
  361. [out] _WAVEFORMATEX *pAudioFormat,
  362. [out] _VIDEOINFOHEADER* pVideoFormat );
  363. };
  364. // IWMDMProgress
  365. [
  366. object,
  367. uuid(1DCB3A0C-33ED-11d3-8470-00C04F79DBC0),
  368. pointer_default(unique)
  369. ]
  370. interface IWMDMProgress : IUnknown
  371. {
  372. HRESULT Begin([in] DWORD dwEstimatedTicks);
  373. HRESULT Progress([in] DWORD dwTranspiredTicks);
  374. HRESULT End();
  375. };
  376. // IWMDMProgress2
  377. [
  378. object,
  379. uuid(3A43F550-B383-4e92-B04A-E6BBC660FEFC),
  380. pointer_default(unique)
  381. ]
  382. interface IWMDMProgress2 : IWMDMProgress
  383. {
  384. HRESULT End2([in] HRESULT hrCompletionCode );
  385. };
  386. // IWMDMDevice
  387. [
  388. object,
  389. uuid(1DCB3A02-33ED-11d3-8470-00C04F79DBC0),
  390. pointer_default(unique)
  391. ]
  392. interface IWMDMDevice : IUnknown
  393. {
  394. HRESULT GetName([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  395. [in] UINT nMaxChars);
  396. HRESULT GetManufacturer([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  397. [in] UINT nMaxChars);
  398. HRESULT GetVersion([out] DWORD *pdwVersion);
  399. HRESULT GetType([out] DWORD *pdwType);
  400. HRESULT GetSerialNumber([out] PWMDMID pSerialNumber,
  401. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  402. HRESULT GetPowerSource([out] DWORD *pdwPowerSource,
  403. [out] DWORD *pdwPercentRemaining);
  404. HRESULT GetStatus([out] DWORD *pdwStatus);
  405. HRESULT GetDeviceIcon([out] ULONG *hIcon);
  406. HRESULT EnumStorage([out] IWMDMEnumStorage **ppEnumStorage);
  407. HRESULT GetFormatSupport([out, size_is( , *pnFormatCount)] _WAVEFORMATEX **ppFormatEx,
  408. [out] UINT *pnFormatCount,
  409. [out, size_is( , *pnMimeTypeCount)] LPWSTR **pppwszMimeType,
  410. [out] UINT *pnMimeTypeCount);
  411. HRESULT SendOpaqueCommand([in,out] OPAQUECOMMAND *pCommand);
  412. };
  413. // IWMDMDevice2
  414. [
  415. object,
  416. uuid(E34F3D37-9D67-4fc1-9252-62D28B2F8B55),
  417. pointer_default(unique)
  418. ]
  419. interface IWMDMDevice2 : IWMDMDevice
  420. {
  421. HRESULT GetStorage([in, string] LPCWSTR pszStorageName, [out] IWMDMStorage** ppStorage );
  422. HRESULT GetFormatSupport2(
  423. [in] DWORD dwFlags,
  424. [out, size_is( , *pnAudioFormatCount)] _WAVEFORMATEX** ppAudioFormatEx,
  425. [out, ref] UINT *pnAudioFormatCount,
  426. [out, size_is( , *pnVideoFormatCount)] _VIDEOINFOHEADER** ppVideoFormatEx,
  427. [out, ref] UINT *pnVideoFormatCount,
  428. [out, size_is( , *pnFileTypeCount)] WMFILECAPABILITIES** ppFileType,
  429. [out, ref] UINT* pnFileTypeCount);
  430. HRESULT GetSpecifyPropertyPages([out, ref] ISpecifyPropertyPages** ppSpecifyPropPages,
  431. [out, ref, size_is(,*pcUnks)] IUnknown*** pppUnknowns,
  432. [out, ref] ULONG* pcUnks );
  433. HRESULT GetPnPName([out, size_is(nMaxChars)] LPWSTR pwszPnPName,
  434. [in] UINT nMaxChars );
  435. };
  436. // IWMDMEnumDevice
  437. [
  438. object,
  439. uuid(1DCB3A01-33ED-11d3-8470-00C04F79DBC0),
  440. pointer_default(unique)
  441. ]
  442. interface IWMDMEnumDevice : IUnknown
  443. {
  444. HRESULT Next([in]ULONG celt,
  445. [out, size_is(celt), length_is(*pceltFetched)] IWMDMDevice **ppDevice,
  446. [out] ULONG *pceltFetched);
  447. HRESULT Skip([in] ULONG celt, [out] ULONG *pceltFetched);
  448. HRESULT Reset();
  449. HRESULT Clone([out] IWMDMEnumDevice **ppEnumDevice);
  450. };
  451. // IWMDMDeviceControl
  452. [
  453. object,
  454. uuid(1DCB3A04-33ED-11d3-8470-00C04F79DBC0),
  455. pointer_default(unique)
  456. ]
  457. interface IWMDMDeviceControl : IUnknown
  458. {
  459. HRESULT GetStatus([out] DWORD *pdwStatus);
  460. HRESULT GetCapabilities([out] DWORD *pdwCapabilitiesMask);
  461. HRESULT Play();
  462. HRESULT Record([in] _WAVEFORMATEX *pFormat);
  463. HRESULT Pause();
  464. HRESULT Resume();
  465. HRESULT Stop();
  466. HRESULT Seek([in] UINT fuMode, [in] int nOffset);
  467. };
  468. // IWMDMEnumStorage
  469. [
  470. object,
  471. uuid(1DCB3A05-33ED-11d3-8470-00C04F79DBC0),
  472. pointer_default(unique)
  473. ]
  474. interface IWMDMEnumStorage : IUnknown
  475. {
  476. HRESULT Next([in]ULONG celt,
  477. [out, size_is(celt), length_is(*pceltFetched)] IWMDMStorage **ppStorage,
  478. [out] ULONG *pceltFetched);
  479. HRESULT Skip([in] ULONG celt, [out] ULONG *pceltFetched);
  480. HRESULT Reset();
  481. HRESULT Clone([out] IWMDMEnumStorage **ppEnumStorage);
  482. };
  483. // IWMDMStorageControl
  484. [
  485. object,
  486. uuid(1DCB3A08-33ED-11d3-8470-00C04F79DBC0),
  487. pointer_default(unique)
  488. ]
  489. interface IWMDMStorageControl : IUnknown
  490. {
  491. HRESULT Insert([in] UINT fuMode,
  492. [in,unique] LPWSTR pwszFile,
  493. [in] IWMDMOperation *pOperation,
  494. [in] IWMDMProgress *pProgress,
  495. [out] IWMDMStorage **ppNewObject);
  496. HRESULT Delete([in] UINT fuMode,
  497. [in] IWMDMProgress *pProgress);
  498. HRESULT Rename([in] UINT fuMode,
  499. [in] LPWSTR pwszNewName,
  500. [in] IWMDMProgress *pProgress);
  501. HRESULT Read([in] UINT fuMode,
  502. [in,unique] LPWSTR pwszFile,
  503. [in] IWMDMProgress *pProgress,
  504. [in] IWMDMOperation *pOperation);
  505. HRESULT Move([in] UINT fuMode,
  506. [in] IWMDMStorage *pTargetObject,
  507. [in] IWMDMProgress *pProgress);
  508. };
  509. // IWMDMStorageControl2
  510. [
  511. object,
  512. uuid(972C2E88-BD6C-4125-8E09-84F837E637B6),
  513. pointer_default(unique)
  514. ]
  515. interface IWMDMStorageControl2 : IWMDMStorageControl
  516. {
  517. HRESULT Insert2([in] UINT fuMode,
  518. [in,unique] LPWSTR pwszFileSource,
  519. [in,unique] LPWSTR pwszFileDest,
  520. [in] IWMDMOperation *pOperation,
  521. [in] IWMDMProgress *pProgress,
  522. [in] IUnknown* pUnknown,
  523. [in,out,unique] IWMDMStorage **ppNewObject);
  524. };
  525. // IWMDMObjectInfo
  526. [
  527. object,
  528. uuid(1DCB3A09-33ED-11d3-8470-00C04F79DBC0),
  529. pointer_default(unique)
  530. ]
  531. interface IWMDMObjectInfo : IUnknown
  532. {
  533. HRESULT GetPlayLength([out] DWORD *pdwLength);
  534. HRESULT SetPlayLength([in] DWORD dwLength);
  535. HRESULT GetPlayOffset([out] DWORD *pdwOffset);
  536. HRESULT SetPlayOffset([in] DWORD dwOffset);
  537. HRESULT GetTotalLength([out] DWORD *pdwLength);
  538. HRESULT GetLastPlayPosition([out] DWORD *pdwLastPos);
  539. HRESULT GetLongestPlayPosition([out] DWORD *pdwLongestPos);
  540. };
  541. // IWMDMRevoked
  542. [
  543. object,
  544. uuid(EBECCEDB-88EE-4e55-B6A4-8D9F07D696AA),
  545. pointer_default(ref)
  546. ]
  547. interface IWMDMRevoked : IUnknown
  548. {
  549. HRESULT GetRevocationURL( [in,out, string, size_is(, *pdwBufferLen)] LPWSTR* ppwszRevocationURL,
  550. [in,out] DWORD* pdwBufferLen,
  551. [out] DWORD* pdwRevokedBitFlag );
  552. };