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.

293 lines
9.6 KiB

  1. //
  2. // Microsoft Windows Media Technologies
  3. // Copyright (C) Microsoft Corporation, 1999 - 2001. All rights reserved.
  4. //
  5. cpp_quote("// Open Mode Flags")
  6. cpp_quote("#define MDSP_READ 0x00000001")
  7. cpp_quote("#define MDSP_WRITE 0x00000002")
  8. cpp_quote("// Seek Flags")
  9. cpp_quote("#define MDSP_SEEK_BOF 0x00000001")
  10. cpp_quote("#define MDSP_SEEK_CUR 0x00000002")
  11. cpp_quote("#define MDSP_SEEK_EOF 0x00000004")
  12. interface IMDSPDevice;
  13. interface IMDSPDevice2;
  14. interface IMDSPStorage;
  15. interface IMDSPStorage2;
  16. interface IMDSPObjectInfo;
  17. interface IMDSPStorageGlobals;
  18. interface IMDSPEnumDevice;
  19. interface IMDSPEnumStorage;
  20. interface IMDSPRevoked;
  21. // IMDServiceProvider
  22. [
  23. object,
  24. uuid(1DCB3A10-33ED-11d3-8470-00C04F79DBC0),
  25. pointer_default(unique)
  26. ]
  27. interface IMDServiceProvider : IUnknown
  28. {
  29. HRESULT GetDeviceCount([out] DWORD *pdwCount);
  30. HRESULT EnumDevices([out] IMDSPEnumDevice **ppEnumDevice);
  31. };
  32. // IMDServiceProvider2
  33. [
  34. object,
  35. uuid(B2FA24B7-CDA3-4694-9862-413AE1A34819),
  36. pointer_default(unique)
  37. ]
  38. interface IMDServiceProvider2 : IMDServiceProvider
  39. {
  40. HRESULT GetDeviceFromPnPName( [in, string] LPCWSTR pwszPnPName,
  41. [out] IMDSPDevice** ppDevice );
  42. };
  43. // IMDSPEnumDevice
  44. [
  45. object,
  46. uuid(1DCB3A11-33ED-11d3-8470-00C04F79DBC0),
  47. pointer_default(unique)
  48. ]
  49. interface IMDSPEnumDevice : IUnknown
  50. {
  51. HRESULT Next([in]ULONG celt,
  52. [out, size_is(celt), length_is(*pceltFetched)] IMDSPDevice **ppDevice,
  53. [out] ULONG *pceltFetched);
  54. HRESULT Skip([in] ULONG celt, [out] ULONG *pceltFetched);
  55. HRESULT Reset();
  56. HRESULT Clone([out] IMDSPEnumDevice **ppEnumDevice);
  57. };
  58. // IMDSPDevice
  59. [
  60. object,
  61. uuid(1DCB3A12-33ED-11d3-8470-00C04F79DBC0),
  62. pointer_default(unique)
  63. ]
  64. interface IMDSPDevice : IUnknown
  65. {
  66. HRESULT GetName([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  67. [in] UINT nMaxChars);
  68. HRESULT GetManufacturer([out,string,size_is(nMaxChars)] LPWSTR pwszName,
  69. [in] UINT nMaxChars);
  70. HRESULT GetVersion([out] DWORD *pdwVersion);
  71. HRESULT GetType([out] DWORD *pdwType);
  72. HRESULT GetSerialNumber([out] PWMDMID pSerialNumber,
  73. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  74. HRESULT GetPowerSource([out] DWORD *pdwPowerSource,
  75. [out] DWORD *pdwPercentRemaining);
  76. HRESULT GetStatus([out] DWORD *pdwStatus);
  77. HRESULT GetDeviceIcon([out] ULONG *hIcon);
  78. HRESULT EnumStorage([out] IMDSPEnumStorage **ppEnumStorage);
  79. HRESULT GetFormatSupport([out, size_is( , *pnFormatCount)] _WAVEFORMATEX **pFormatEx,
  80. [out] UINT *pnFormatCount,
  81. [out, size_is( , *pnMimeTypeCount)] LPWSTR **pppwszMimeType,
  82. [out] UINT *pnMimeTypeCount);
  83. HRESULT SendOpaqueCommand([in,out] OPAQUECOMMAND *pCommand);
  84. };
  85. // IWMDMDevice2
  86. [
  87. object,
  88. uuid(420D16AD-C97D-4e00-82AA-00E9F4335DDD),
  89. pointer_default(unique)
  90. ]
  91. interface IMDSPDevice2 : IMDSPDevice
  92. {
  93. HRESULT GetStorage([in, string] LPCWSTR pszStorageName, [out] IMDSPStorage** ppStorage );
  94. HRESULT GetFormatSupport2(
  95. [in] DWORD dwFlags,
  96. [out, size_is( , *pnAudioFormatCount)] _WAVEFORMATEX** ppAudioFormatEx,
  97. [out, ref] UINT *pnAudioFormatCount,
  98. [out, size_is( , *pnVideoFormatCount)] _VIDEOINFOHEADER** ppVideoFormatEx,
  99. [out, ref] UINT *pnVideoFormatCount,
  100. [out, size_is( , *pnFileTypeCount)] WMFILECAPABILITIES** ppFileType,
  101. [out, ref] UINT *pnFileTypeCount);
  102. HRESULT GetSpecifyPropertyPages([out, ref] ISpecifyPropertyPages** ppSpecifyPropPages,
  103. [out, ref, size_is(,*pcUnks)] IUnknown*** pppUnknowns,
  104. [out, ref] ULONG *pcUnks );
  105. HRESULT GetPnPName([out, size_is(nMaxChars)] LPWSTR pwszPnPName,
  106. [in] UINT nMaxChars );
  107. };
  108. // IMDSPDeviceControl
  109. [
  110. object,
  111. uuid(1DCB3A14-33ED-11d3-8470-00C04F79DBC0),
  112. pointer_default(unique)
  113. ]
  114. interface IMDSPDeviceControl : IUnknown
  115. {
  116. HRESULT GetDCStatus([out] DWORD *pdwStatus);
  117. HRESULT GetCapabilities([out] DWORD *pdwCapabilitiesMask);
  118. HRESULT Play();
  119. HRESULT Record([in] _WAVEFORMATEX *pFormat);
  120. HRESULT Pause();
  121. HRESULT Resume();
  122. HRESULT Stop();
  123. HRESULT Seek([in] UINT fuMode, [in] int nOffset);
  124. };
  125. // IMDSPEnumStorage
  126. [
  127. object,
  128. uuid(1DCB3A15-33ED-11d3-8470-00C04F79DBC0),
  129. pointer_default(unique)
  130. ]
  131. interface IMDSPEnumStorage : IUnknown
  132. {
  133. HRESULT Next([in]ULONG celt,
  134. [out, size_is(celt), length_is(*pceltFetched)] IMDSPStorage **ppStorage,
  135. [out] ULONG *pceltFetched);
  136. HRESULT Skip([in] ULONG celt, [out] ULONG *pceltFetched);
  137. HRESULT Reset();
  138. HRESULT Clone([out] IMDSPEnumStorage **ppEnumStorage);
  139. };
  140. // IMDSPStorage
  141. [
  142. object,
  143. uuid(1DCB3A16-33ED-11d3-8470-00C04F79DBC0),
  144. pointer_default(unique)
  145. ]
  146. interface IMDSPStorage : IUnknown
  147. {
  148. HRESULT SetAttributes([in] DWORD dwAttributes,
  149. [in] _WAVEFORMATEX *pFormat);
  150. HRESULT GetStorageGlobals([out]IMDSPStorageGlobals **ppStorageGlobals);
  151. HRESULT GetAttributes([out] DWORD *pdwAttributes,
  152. [out] _WAVEFORMATEX *pFormat);
  153. HRESULT GetName([out,string, size_is(nMaxChars)] LPWSTR pwszName,
  154. [in] UINT nMaxChars);
  155. HRESULT GetDate([out] PWMDMDATETIME pDateTimeUTC);
  156. HRESULT GetSize([out] DWORD *pdwSizeLow,
  157. [out] DWORD *pdwSizeHigh);
  158. HRESULT GetRights([out, size_is(,*pnRightsCount)] PWMDMRIGHTS *ppRights,
  159. [out] UINT *pnRightsCount,
  160. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  161. HRESULT CreateStorage([in] DWORD dwAttributes,
  162. [in, unique] _WAVEFORMATEX *pFormat,
  163. [in] LPWSTR pwszName,
  164. [out] IMDSPStorage **ppNewStorage);
  165. HRESULT EnumStorage([out] IMDSPEnumStorage **ppEnumStorage);
  166. HRESULT SendOpaqueCommand([in,out] OPAQUECOMMAND *pCommand);
  167. };
  168. // IMDSPStorage2
  169. [
  170. object,
  171. uuid(0A5E07A5-6454-4451-9C36-1C6AE7E2B1D6),
  172. pointer_default(unique)
  173. ]
  174. interface IMDSPStorage2 : IMDSPStorage
  175. {
  176. HRESULT GetStorage([in, string] LPCWSTR pszStorageName, [out] IMDSPStorage** ppStorage );
  177. HRESULT CreateStorage2([in] DWORD dwAttributes,
  178. [in] DWORD dwAttributesEx,
  179. [in, unique] _WAVEFORMATEX *pAudioFormat,
  180. [in, unique] _VIDEOINFOHEADER *pVideoFormat,
  181. [in] LPWSTR pwszName,
  182. [in] ULONGLONG qwFileSize,
  183. [out] IMDSPStorage **ppNewStorage);
  184. HRESULT SetAttributes2( [in] DWORD dwAttributes,
  185. [in] DWORD dwAttributesEx,
  186. [in] _WAVEFORMATEX *pAudioFormat,
  187. [in] _VIDEOINFOHEADER* pVideoFormat );
  188. HRESULT GetAttributes2( [out] DWORD *pdwAttributes,
  189. [out] DWORD *pdwAttributesEx,
  190. [out] _WAVEFORMATEX *pAudioFormat,
  191. [out] _VIDEOINFOHEADER* pVideoFormat );
  192. }
  193. // IMDSPStorageGlobals
  194. [
  195. object,
  196. uuid(1DCB3A17-33ED-11d3-8470-00C04F79DBC0),
  197. pointer_default(unique)
  198. ]
  199. interface IMDSPStorageGlobals : IUnknown
  200. {
  201. HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
  202. HRESULT GetSerialNumber([out] PWMDMID pSerialNum,
  203. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  204. HRESULT GetTotalSize([out] DWORD *pdwTotalSizeLow,
  205. [out] DWORD *pdwTotalSizeHigh);
  206. HRESULT GetTotalFree([out] DWORD *pdwFreeLow,
  207. [out] DWORD *pdwFreeHigh);
  208. HRESULT GetTotalBad([out] DWORD *pdwBadLow,
  209. [out] DWORD *pdwBadHigh);
  210. HRESULT GetStatus([out] DWORD *pdwStatus);
  211. HRESULT Initialize([in] UINT fuMode,
  212. [in] IWMDMProgress *pProgress);
  213. HRESULT GetDevice([out] IMDSPDevice **ppDevice);
  214. HRESULT GetRootStorage([out] IMDSPStorage **ppRoot);
  215. };
  216. // IMDSPObjectInfo
  217. [
  218. object,
  219. uuid(1DCB3A19-33ED-11d3-8470-00C04F79DBC0),
  220. pointer_default(unique)
  221. ]
  222. interface IMDSPObjectInfo : IUnknown
  223. {
  224. HRESULT GetPlayLength([out] DWORD *pdwLength);
  225. HRESULT SetPlayLength([in] DWORD dwLength);
  226. HRESULT GetPlayOffset([out] DWORD *pdwOffset);
  227. HRESULT SetPlayOffset([in] DWORD dwOffset);
  228. HRESULT GetTotalLength([out] DWORD *pdwLength);
  229. HRESULT GetLastPlayPosition([out] DWORD *pdwLastPos);
  230. HRESULT GetLongestPlayPosition([out] DWORD *pdwLongestPos);
  231. };
  232. // IMDSPObject
  233. [
  234. object,
  235. uuid(1DCB3A18-33ED-11d3-8470-00C04F79DBC0),
  236. pointer_default(unique)
  237. ]
  238. interface IMDSPObject : IUnknown
  239. {
  240. HRESULT Open([in] UINT fuMode);
  241. HRESULT Read([out,size_is(*pdwSize)] BYTE *pData,
  242. [in,out] DWORD *pdwSize,
  243. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  244. HRESULT Write([in, size_is(*pdwSize)] BYTE *pData,
  245. [in,out] DWORD *pdwSize,
  246. [in, out] BYTE abMac[WMDM_MAC_LENGTH]);
  247. HRESULT Delete([in] UINT fuMode, [in] IWMDMProgress *pProgress);
  248. HRESULT Seek([in] UINT fuFlags,
  249. [in] DWORD dwOffset);
  250. HRESULT Rename([in] LPWSTR pwszNewName, [in] IWMDMProgress *pProgress);
  251. HRESULT Move([in] UINT fuMode,
  252. [in] IWMDMProgress *pProgress,
  253. [in] IMDSPStorage *pTarget);
  254. HRESULT Close();
  255. };
  256. // IMDSPRevoked
  257. [
  258. object,
  259. uuid(A4E8F2D4-3F31-464d-B53D-4FC335998184),
  260. pointer_default(unique)
  261. ]
  262. interface IMDSPRevoked : IUnknown
  263. {
  264. HRESULT GetRevocationURL( [in, out, string, size_is(, *pdwBufferLen)] LPWSTR* ppwszRevocationURL,
  265. [in, out] DWORD* pdwBufferLen );
  266. };