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.

312 lines
16 KiB

  1. cpp_quote("#ifndef _MD_IMD_")
  2. cpp_quote("#define _MD_IMD_")
  3. import "unknwn.idl";
  4. import "wtypes.idl";
  5. import "objidl.idl";
  6. import "ocidl.idl";
  7. import "mddef.idl";
  8. cpp_quote("/* ")
  9. cpp_quote("The Main Interface ")
  10. cpp_quote("*/ ")
  11. #define METADATA_MAX_NAME_LEN 256
  12. cpp_quote("DEFINE_GUID(CLSID_MDCOM, 0xba4e57f0, 0xfab6, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);")
  13. cpp_quote("DEFINE_GUID(IID_IMDCOM, 0xc1aa48c0, 0xfacc, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);")
  14. cpp_quote("DEFINE_GUID(IID_NSECOM, 0x4810a750, 0x4318, 0x11d0, 0xa5, 0xc8, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x52);")
  15. cpp_quote("DEFINE_GUID(CLSID_NSEPMCOM, 0x05dc3bb0, 0x4337, 0x11d0, 0xa5, 0xc8, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x52);")
  16. cpp_quote("DEFINE_GUID(CLSID_MDCOMEXE, 0xba4e57f1, 0xfab6, 0x11cf, 0x9d, 0x1a, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);")
  17. cpp_quote("DEFINE_GUID(CLSID_MDPCOM, 0xf1e08563, 0x1598, 0x11d1, 0x9d, 0x77, 0x0, 0xc0, 0x4f, 0xd7, 0xbf, 0x3e);")
  18. //cpp_quote("#define GETMDCLSID(IsService) ((IsService) ? CLSID_MDCOM : CLSID_MDCOMEXE)")
  19. cpp_quote("#define GETMDCLSID(IsService) CLSID_MDCOM")
  20. cpp_quote("#define GETMDPCLSID(IsService) CLSID_MDPCOM")
  21. #ifdef UNICODE
  22. cpp_quote("#define IID_IMDCOMSINK IID_IMDCOMSINK_W")
  23. #else
  24. cpp_quote("#define IID_IMDCOMSINK IID_IMDCOMSINK_A")
  25. #endif
  26. cpp_quote("DEFINE_GUID(IID_IMDCOMSINK_A, 0x5229ea36, 0x1bdf, 0x11d0, 0x9d, 0x1c, 0x0, 0xaa, 0x0, 0xa7, 0xd, 0x51);")
  27. cpp_quote("DEFINE_GUID(IID_IMDCOMSINK_W, 0x6906ee20, 0xb69f, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
  28. [object, uuid(C1AA48C0-FACC-11cf-9D1A-00AA00A70D51), pointer_default(unique)]
  29. interface IMDCOM : IUnknown {
  30. // Interfaces
  31. HRESULT ComMDInitialize();
  32. HRESULT ComMDTerminate([in] BOOL bSaveData);
  33. HRESULT ComMDShutdown();
  34. HRESULT ComMDAddMetaObjectA([in] METADATA_HANDLE hMDHandle,
  35. [unique, in, string] unsigned char *pszMDPath);
  36. HRESULT ComMDAddMetaObjectW([in] METADATA_HANDLE hMDHandle,
  37. [unique, in, string] LPCWSTR pszMDPath);
  38. HRESULT ComMDDeleteMetaObjectA([in] METADATA_HANDLE hMDHandle,
  39. [unique, in, string] unsigned char *pszMDPath);
  40. HRESULT ComMDDeleteMetaObjectW([in] METADATA_HANDLE hMDHandle,
  41. [unique, in, string] LPCWSTR pszMDPath);
  42. HRESULT ComMDDeleteChildMetaObjectsA([in] METADATA_HANDLE hMDHandle,
  43. [unique, in, string] unsigned char *pszMDPath);
  44. HRESULT ComMDDeleteChildMetaObjectsW([in] METADATA_HANDLE hMDHandle,
  45. [unique, in, string] LPCWSTR pszMDPath);
  46. HRESULT ComMDEnumMetaObjectsA([in] METADATA_HANDLE hMDHandle,
  47. [unique, in, string] unsigned char *pszMDPath,
  48. [out, size_is(METADATA_MAX_NAME_LEN)] unsigned char *pszMDName,
  49. [in] DWORD dwMDEnumObjectIndex);
  50. HRESULT ComMDEnumMetaObjectsW([in] METADATA_HANDLE hMDHandle,
  51. [unique, in, string] LPCWSTR pszMDPath,
  52. [out, size_is(METADATA_MAX_NAME_LEN)] LPWSTR pszMDName,
  53. [in] DWORD dwMDEnumObjectIndex);
  54. HRESULT ComMDCopyMetaObjectA([in] METADATA_HANDLE hMDSourceHandle,
  55. [unique, in, string] unsigned char *pszMDSourcePath,
  56. [in] METADATA_HANDLE hMDDestHandle,
  57. [unique, in, string] unsigned char *pszMDDestPath,
  58. [in] BOOL bMDOverwriteFlag,
  59. [in] BOOL bMDCopyFlag);
  60. HRESULT ComMDCopyMetaObjectW([in] METADATA_HANDLE hMDSourceHandle,
  61. [unique, in, string] LPCWSTR pszMDSourcePath,
  62. [in] METADATA_HANDLE hMDDestHandle,
  63. [unique, in, string] LPCWSTR pszMDDestPath,
  64. [in] BOOL bMDOverwriteFlag,
  65. [in] BOOL bMDCopyFlag);
  66. HRESULT ComMDRenameMetaObjectA([in] METADATA_HANDLE hMDHandle,
  67. [unique, in, string] unsigned char *pszMDPath,
  68. [unique, in, string] unsigned char *pszMDNewName);
  69. HRESULT ComMDRenameMetaObjectW([in] METADATA_HANDLE hMDHandle,
  70. [unique, in, string] LPCWSTR pszMDPath,
  71. [unique, in, string] LPCWSTR pszMDNewName);
  72. HRESULT ComMDSetMetaDataA([in] METADATA_HANDLE hMDHandle,
  73. [unique, in, string] unsigned char *pszMDPath,
  74. [in] PMETADATA_RECORD pmdrMDData);
  75. HRESULT ComMDSetMetaDataW([in] METADATA_HANDLE hMDHandle,
  76. [unique, in, string] LPCWSTR pszMDPath,
  77. [in] PMETADATA_RECORD pmdrMDData);
  78. HRESULT ComMDGetMetaDataA([in] METADATA_HANDLE hMDHandle,
  79. [unique, in, string] unsigned char *pszMDPath,
  80. [in, out] PMETADATA_RECORD pmdrMDData,
  81. [out] DWORD *pdwMDRequiredDataLen);
  82. HRESULT ComMDGetMetaDataW([in] METADATA_HANDLE hMDHandle,
  83. [unique, in, string] LPCWSTR pszMDPath,
  84. [in, out] PMETADATA_RECORD pmdrMDData,
  85. [out] DWORD *pdwMDRequiredDataLen);
  86. HRESULT ComMDDeleteMetaDataA([in] METADATA_HANDLE hMDHandle,
  87. [unique, in, string] unsigned char *pszMDPath,
  88. [in] DWORD dwMDIdentifier,
  89. [in] DWORD dwMDDataType);
  90. HRESULT ComMDDeleteMetaDataW([in] METADATA_HANDLE hMDHandle,
  91. [unique, in, string] LPCWSTR pszMDPath,
  92. [in] DWORD dwMDIdentifier,
  93. [in] DWORD dwMDDataType);
  94. HRESULT ComMDEnumMetaDataA([in] METADATA_HANDLE hMDHandle,
  95. [unique, in, string] unsigned char *pszMDPath,
  96. [in, out] PMETADATA_RECORD pmdrMDData,
  97. [in] DWORD dwMDEnumDataIndex,
  98. [out] DWORD *pdwMDRequiredDataLen);
  99. HRESULT ComMDEnumMetaDataW([in] METADATA_HANDLE hMDHandle,
  100. [unique, in, string] LPCWSTR pszMDPath,
  101. [in, out] PMETADATA_RECORD pmdrMDData,
  102. [in] DWORD dwMDEnumDataIndex,
  103. [out] DWORD *pdwMDRequiredDataLen);
  104. HRESULT ComMDGetAllMetaDataA([in] METADATA_HANDLE hMDHandle,
  105. [unique, in, string] unsigned char *pszMDPath,
  106. [in] DWORD dwMDAttributes,
  107. [in] DWORD dwMDUserType,
  108. [in] DWORD dwMDDataType,
  109. [out] DWORD *pdwMDNumDataEntries,
  110. [out] DWORD *pdwMDDataSetNumber,
  111. [in] DWORD dwMDBufferSize,
  112. [out, size_is(dwMDBufferSize)] unsigned char *pbBuffer,
  113. [out] DWORD *pdwMDRequiredBufferSize);
  114. HRESULT ComMDGetAllMetaDataW([in] METADATA_HANDLE hMDHandle,
  115. [unique, in, string] LPCWSTR pszMDPath,
  116. [in] DWORD dwMDAttributes,
  117. [in] DWORD dwMDUserType,
  118. [in] DWORD dwMDDataType,
  119. [out] DWORD *pdwMDNumDataEntries,
  120. [out] DWORD *pdwMDDataSetNumber,
  121. [in] DWORD dwMDBufferSize,
  122. [out, size_is(dwMDBufferSize)] unsigned char *pbBuffer,
  123. [out] DWORD *pdwMDRequiredBufferSize);
  124. HRESULT ComMDDeleteAllMetaDataA([in] METADATA_HANDLE hMDHandle,
  125. [unique, in, string] unsigned char *pszMDPath,
  126. [in] DWORD dwMDUserType,
  127. [in] DWORD dwMDDataType);
  128. HRESULT ComMDDeleteAllMetaDataW([in] METADATA_HANDLE hMDHandle,
  129. [unique, in, string] LPCWSTR pszMDPath,
  130. [in] DWORD dwMDUserType,
  131. [in] DWORD dwMDDataType);
  132. HRESULT ComMDCopyMetaDataA([in] METADATA_HANDLE hMDSourceHandle,
  133. [unique, in, string] unsigned char *pszMDSourcePath,
  134. [in] METADATA_HANDLE hMDDestHandle,
  135. [unique, in, string] unsigned char *pszMDDestPath,
  136. [in] DWORD dwMDAttributes,
  137. [in] DWORD dwMDUserType,
  138. [in] DWORD dwMDDataType,
  139. [in] BOOL bMDCopyFlag);
  140. HRESULT ComMDCopyMetaDataW([in] METADATA_HANDLE hMDSourceHandle,
  141. [unique, in, string] LPCWSTR pszMDSourcePath,
  142. [in] METADATA_HANDLE hMDDestHandle,
  143. [unique, in, string] LPCWSTR pszMDDestPath,
  144. [in] DWORD dwMDAttributes,
  145. [in] DWORD dwMDUserType,
  146. [in] DWORD dwMDDataType,
  147. [in] BOOL bMDCopyFlag);
  148. HRESULT ComMDOpenMetaObjectA([in] METADATA_HANDLE hMDHandle,
  149. [unique, in, string] unsigned char *pszMDPath,
  150. [in] DWORD dwMDAccessRequested,
  151. [in] DWORD dwMDTimeOut,
  152. [out] PMETADATA_HANDLE phMDNewHandle);
  153. HRESULT ComMDOpenMetaObjectW([in] METADATA_HANDLE hMDHandle,
  154. [unique, in, string] LPCWSTR pszMDPath,
  155. [in] DWORD dwMDAccessRequested,
  156. [in] DWORD dwMDTimeOut,
  157. [out] PMETADATA_HANDLE phMDNewHandle);
  158. HRESULT ComMDCloseMetaObject([in] METADATA_HANDLE hMDHandle);
  159. HRESULT ComMDChangePermissions([in] METADATA_HANDLE hMDHandle,
  160. [in] DWORD dwMDTimeOut,
  161. [in] DWORD dwMDAccessRequested);
  162. HRESULT ComMDSaveData();
  163. HRESULT ComMDGetHandleInfo([in] METADATA_HANDLE hMDHandle,
  164. [out] PMETADATA_HANDLE_INFO pmdhiInfo);
  165. HRESULT ComMDGetSystemChangeNumber([out] DWORD *pdwSystemChangeNumber);
  166. HRESULT ComMDGetDataSetNumberA([in] METADATA_HANDLE hMDHandle,
  167. [unique, in, string] unsigned char *pszMDPath,
  168. [out] DWORD *pdwMDDataSetNumber);
  169. HRESULT ComMDGetDataSetNumberW([in] METADATA_HANDLE hMDHandle,
  170. [unique, in, string] LPCWSTR pszMDPath,
  171. [out] DWORD *pdwMDDataSetNumber);
  172. HRESULT ComMDAddRefReferenceData([in] DWORD dwMDDataTag);
  173. HRESULT ComMDReleaseReferenceData([in] DWORD dwMDDataTag);
  174. HRESULT ComMDSetLastChangeTimeA([in] METADATA_HANDLE hMDHandle,
  175. [unique, in, string] unsigned char *pszMDPath,
  176. [in] PFILETIME pftMDLastChangeTime);
  177. HRESULT ComMDSetLastChangeTimeW([in] METADATA_HANDLE hMDHandle,
  178. [unique, in, string] LPCWSTR pszMDPath,
  179. [in] PFILETIME pftMDLastChangeTime);
  180. HRESULT ComMDGetLastChangeTimeA([in] METADATA_HANDLE hMDHandle,
  181. [unique, in, string] unsigned char *pszMDPath,
  182. [out] PFILETIME pftMDLastChangeTime);
  183. HRESULT ComMDGetLastChangeTimeW([in] METADATA_HANDLE hMDHandle,
  184. [unique, in, string] LPCWSTR pszMDPath,
  185. [out] PFILETIME pftMDLastChangeTime);
  186. };
  187. cpp_quote("/* ")
  188. cpp_quote("The Callback Interface - Clients that need to receive callbacks need to provide ")
  189. cpp_quote(" an implementation of this interface and Advise the metadata server. ")
  190. cpp_quote("*/ ")
  191. #ifdef UNICODE
  192. cpp_quote("#define IMDCOMSINK IMDCOMSINKW")
  193. #else
  194. cpp_quote("#define IMDCOMSINK IMDCOMSINKA")
  195. #endif
  196. [object, uuid(5229EA36-1BDF-11d0-9D1C-00AA00A70D51), pointer_default(unique)]
  197. interface IMDCOMSINKA:IUnknown
  198. {
  199. HRESULT ComMDSinkNotify([in] METADATA_HANDLE hMDHandle,
  200. [in] DWORD dwMDNumElements,
  201. [in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT_A pcoChangeList[]);
  202. }
  203. [object, uuid(6906EE20-B69F-11d0-B9B9-00A0C922E750), pointer_default(unique)]
  204. interface IMDCOMSINKW:IUnknown
  205. {
  206. HRESULT ComMDSinkNotify([in] METADATA_HANDLE hMDHandle,
  207. [in] DWORD dwMDNumElements,
  208. [in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT_W pcoChangeList[]);
  209. }
  210. // UNICODE DEFINITIONS
  211. cpp_quote(" ")
  212. cpp_quote("#ifdef UNICODE ")
  213. cpp_quote(" ")
  214. cpp_quote("#define ComMDAddMetaObject ComMDAddMetaObjectW ")
  215. cpp_quote("#define ComMDDeleteMetaObject ComMDDeleteMetaObjectW ")
  216. cpp_quote("#define ComMDDeleteChildMetaObjects ComMDDeleteChildMetaObjectsW ")
  217. cpp_quote("#define ComMDEnumMetaObjects ComMDEnumMetaObjectsW ")
  218. cpp_quote("#define ComMDCopyMetaObject ComMDCopyMetaObjectW ")
  219. cpp_quote("#define ComMDRenameMetaObject ComMDRenameMetaObjectW ")
  220. cpp_quote("#define ComMDSetMetaData ComMDSetMetaDataW ")
  221. cpp_quote("#define ComMDGetMetaData ComMDGetMetaDataW ")
  222. cpp_quote("#define ComMDDeleteMetaData ComMDDeleteMetaDataW ")
  223. cpp_quote("#define ComMDEnumMetaData ComMDEnumMetaDataW ")
  224. cpp_quote("#define ComMDGetAllMetaData ComMDGetAllMetaDataW ")
  225. cpp_quote("#define ComMDDeleteAllMetaData ComMDDeleteAllMetaDataW ")
  226. cpp_quote("#define ComMDCopyMetaData ComMDCopyMetaDataW ")
  227. cpp_quote("#define ComMDOpenMetaObject ComMDOpenMetaObjectW ")
  228. cpp_quote("#define ComMDGetDataSetNumber ComMDGetDataSetNumberW ")
  229. cpp_quote("#define ComMDSetLastChangeTime ComMDSetLastChangeTimeW ")
  230. cpp_quote("#define ComMDGetLastChangeTime ComMDGetLastChangeTimeW ")
  231. cpp_quote(" ")
  232. cpp_quote("#else // Not UNICODE ")
  233. cpp_quote(" ")
  234. cpp_quote("#define ComMDAddMetaObject ComMDAddMetaObjectA ")
  235. cpp_quote("#define ComMDDeleteMetaObject ComMDDeleteMetaObjectA ")
  236. cpp_quote("#define ComMDDeleteChildMetaObjects ComMDDeleteChildMetaObjectsA ")
  237. cpp_quote("#define ComMDEnumMetaObjects ComMDEnumMetaObjectsA ")
  238. cpp_quote("#define ComMDCopyMetaObject ComMDCopyMetaObjectA ")
  239. cpp_quote("#define ComMDRenameMetaObject ComMDRenameMetaObjectA ")
  240. cpp_quote("#define ComMDSetMetaData ComMDSetMetaDataA ")
  241. cpp_quote("#define ComMDGetMetaData ComMDGetMetaDataA ")
  242. cpp_quote("#define ComMDDeleteMetaData ComMDDeleteMetaDataA ")
  243. cpp_quote("#define ComMDEnumMetaData ComMDEnumMetaDataA ")
  244. cpp_quote("#define ComMDGetAllMetaData ComMDGetAllMetaDataA ")
  245. cpp_quote("#define ComMDDeleteAllMetaData ComMDDeleteAllMetaDataA ")
  246. cpp_quote("#define ComMDCopyMetaData ComMDCopyMetaDataA ")
  247. cpp_quote("#define ComMDOpenMetaObject ComMDOpenMetaObjectA ")
  248. cpp_quote("#define ComMDGetDataSetNumber ComMDGetDataSetNumberA ")
  249. cpp_quote("#define ComMDSetLastChangeTime ComMDSetLastChangeTimeA ")
  250. cpp_quote("#define ComMDGetLastChangeTime ComMDGetLastChangeTimeA ")
  251. cpp_quote(" ")
  252. cpp_quote("#endif //UNICODE ")
  253. cpp_quote(" ")
  254. cpp_quote("#endif")