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.

404 lines
17 KiB

  1. cpp_quote("/*++")
  2. cpp_quote(" ")
  3. cpp_quote("Copyright (c) 1997-1999 Microsoft Corporation")
  4. cpp_quote(" ")
  5. cpp_quote("Module Name: iadmw.h")
  6. cpp_quote(" ")
  7. cpp_quote(" Admin Objects Interfaces")
  8. cpp_quote(" ")
  9. cpp_quote ("--*/")
  10. cpp_quote("#ifndef _ADM_IADMW_")
  11. cpp_quote("#define _ADM_IADMW_")
  12. import "mddefw.idl";
  13. import "unknwn.idl";
  14. import "wtypes.idl";
  15. import "objidl.idl";
  16. import "ocidl.idl";
  17. import "iiscblob.h"; // Removed by POSTMIDL.SCR after IADMW.H is generated!
  18. cpp_quote("#include <mdcommsg.h>")
  19. cpp_quote("#include <mdmsg.h>")
  20. cpp_quote("/* ")
  21. cpp_quote(" Error Codes ")
  22. cpp_quote(" ")
  23. cpp_quote(" Admin api's all return HRESULTS. Since internal results are either ")
  24. cpp_quote(" winerrors or Metadata specific return codes (see mdmsg.h), they are ")
  25. cpp_quote(" converted to HRESULTS using the RETURNCODETOHRESULT macro (see ")
  26. cpp_quote(" commsg.h). ")
  27. cpp_quote("*/ ")
  28. cpp_quote(" ")
  29. cpp_quote("/* ")
  30. cpp_quote(" Max Name Length ")
  31. cpp_quote(" The maximum number of characters in the length of a metaobject name, ")
  32. cpp_quote(" including the terminating NULL. This refers to each node in the tree, ")
  33. cpp_quote(" not the entire path. ")
  34. cpp_quote(" eg. strlen(\"Root\") < ADMINDATA_MAX_NAME_LEN ")
  35. cpp_quote("*/ ")
  36. #define ADMINDATA_MAX_NAME_LEN 256
  37. cpp_quote("#define ADMINDATA_MAX_NAME_LEN 256")
  38. cpp_quote(" ")
  39. cpp_quote("#define CLSID_MSAdminBase CLSID_MSAdminBase_W ")
  40. cpp_quote("#define IID_IMSAdminBase IID_IMSAdminBase_W ")
  41. cpp_quote("#define IMSAdminBase IMSAdminBaseW ")
  42. cpp_quote("#define IID_IMSAdminBase2 IID_IMSAdminBase2_W ")
  43. cpp_quote("#define IMSAdminBase2 IMSAdminBase2W ")
  44. cpp_quote("#define IID_IMSAdminBase3 IID_IMSAdminBase3_W ")
  45. cpp_quote("#define IMSAdminBase3 IMSAdminBase3W ")
  46. cpp_quote("#define IMSAdminBaseSink IMSAdminBaseSinkW ")
  47. cpp_quote("#define IID_IMSAdminBaseSink IID_IMSAdminBaseSink_W ")
  48. cpp_quote("#define IMSImpExpHelp IMSImpExpHelpW ")
  49. cpp_quote("#define IID_IMSImpExpHelp IID_IMSImpExpHelp_W ")
  50. cpp_quote("#define GETAdminBaseCLSID GETAdminBaseCLSIDW ")
  51. cpp_quote(" ")
  52. cpp_quote("#define AsyncIMSAdminBaseSink AsyncIMSAdminBaseSinkW ")
  53. cpp_quote("#define IID_AsyncIMSAdminBaseSink IID_AsyncIMSAdminBaseSink_W ")
  54. cpp_quote("DEFINE_GUID(CLSID_MSAdminBase_W, 0xa9e69610, 0xb80d, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
  55. cpp_quote("DEFINE_GUID(IID_IMSAdminBase_W, 0x70b51430, 0xb6ca, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
  56. cpp_quote("DEFINE_GUID(IID_IMSAdminBase2_W, 0x8298d101, 0xf992, 0x43b7, 0x8e, 0xca, 0x50, 0x52, 0xd8, 0x85, 0xb9, 0x95);")
  57. cpp_quote("DEFINE_GUID(IID_IMSAdminBase3_W, 0xf612954d, 0x3b0b, 0x4c56, 0x95, 0x63, 0x22, 0x7b, 0x7b, 0xe6, 0x24, 0xb4);")
  58. cpp_quote("DEFINE_GUID(IID_IMSImpExpHelp_W, 0x29ff67ff, 0x8050, 0x480f, 0x9f, 0x30, 0xcc, 0x41, 0x63, 0x5f, 0x2f, 0x9d);")
  59. cpp_quote("DEFINE_GUID(IID_IMSAdminBaseSink_W, 0xa9e69612, 0xb80d, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
  60. cpp_quote("DEFINE_GUID(IID_AsyncIMSAdminBaseSink_W, 0xa9e69613, 0xb80d, 0x11d0, 0xb9, 0xb9, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
  61. cpp_quote("DEFINE_GUID(IID_IMSAdminBaseSinkNoAsyncCallback, 0x41704d5c, 0x75a0, 0x4d0e, 0xae, 0x3f, 0x80, 0xa5, 0xfc, 0x4c, 0xf6, 0x53);")
  62. cpp_quote("#define GETAdminBaseCLSIDW(IsService) CLSID_MSAdminBase_W")
  63. cpp_quote("/* ")
  64. cpp_quote("The Main Interface, UNICODE ")
  65. cpp_quote("*/ ")
  66. [
  67. object,
  68. uuid(70B51430-B6CA-11d0-B9B9-00A0C922E750),
  69. pointer_default(unique)
  70. ]
  71. interface IMSAdminBaseW : IUnknown {
  72. // Interfaces
  73. HRESULT AddKey([in] METADATA_HANDLE hMDHandle,
  74. [unique, in, string] LPCWSTR pszMDPath);
  75. HRESULT DeleteKey([in] METADATA_HANDLE hMDHandle,
  76. [unique, in, string] LPCWSTR pszMDPath);
  77. HRESULT DeleteChildKeys([in] METADATA_HANDLE hMDHandle,
  78. [unique, in, string] LPCWSTR pszMDPath);
  79. HRESULT EnumKeys([in] METADATA_HANDLE hMDHandle,
  80. [unique, in, string] LPCWSTR pszMDPath,
  81. [out, size_is(ADMINDATA_MAX_NAME_LEN)] LPWSTR pszMDName,
  82. [in] DWORD dwMDEnumObjectIndex);
  83. HRESULT CopyKey([in] METADATA_HANDLE hMDSourceHandle,
  84. [unique, in, string] LPCWSTR pszMDSourcePath,
  85. [in] METADATA_HANDLE hMDDestHandle,
  86. [unique, in, string] LPCWSTR pszMDDestPath,
  87. [in] BOOL bMDOverwriteFlag,
  88. [in] BOOL bMDCopyFlag);
  89. HRESULT RenameKey([in] METADATA_HANDLE hMDHandle,
  90. [unique, in, string] LPCWSTR pszMDPath,
  91. [unique, in, string] LPCWSTR pszMDNewName);
  92. [local]
  93. HRESULT SetData([in] METADATA_HANDLE hMDHandle,
  94. [unique, in, string] LPCWSTR pszMDPath,
  95. [in] PMETADATA_RECORD pmdrMDData);
  96. [call_as(SetData)]
  97. HRESULT R_SetData([in] METADATA_HANDLE hMDHandle,
  98. [unique, in, string] LPCWSTR pszMDPath,
  99. [in] PMETADATA_RECORD pmdrMDData);
  100. [local]
  101. HRESULT GetData([in] METADATA_HANDLE hMDHandle,
  102. [unique, in, string] LPCWSTR pszMDPath,
  103. [in, out] PMETADATA_RECORD pmdrMDData,
  104. [out] DWORD *pdwMDRequiredDataLen);
  105. [call_as(GetData)]
  106. HRESULT R_GetData([in] METADATA_HANDLE hMDHandle,
  107. [unique, in, string] LPCWSTR pszMDPath,
  108. [in, out] PMETADATA_RECORD pmdrMDData,
  109. [out] DWORD *pdwMDRequiredDataLen,
  110. [out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
  111. HRESULT DeleteData([in] METADATA_HANDLE hMDHandle,
  112. [unique, in, string] LPCWSTR pszMDPath,
  113. [in] DWORD dwMDIdentifier,
  114. [in] DWORD dwMDDataType);
  115. [local]
  116. HRESULT EnumData([in] METADATA_HANDLE hMDHandle,
  117. [unique, in, string] LPCWSTR pszMDPath,
  118. [in, out] PMETADATA_RECORD pmdrMDData,
  119. [in] DWORD dwMDEnumDataIndex,
  120. [out] DWORD *pdwMDRequiredDataLen);
  121. [call_as(EnumData)]
  122. HRESULT R_EnumData([in] METADATA_HANDLE hMDHandle,
  123. [unique, in, string] LPCWSTR pszMDPath,
  124. [in, out] PMETADATA_RECORD pmdrMDData,
  125. [in] DWORD dwMDEnumDataIndex,
  126. [out] DWORD *pdwMDRequiredDataLen,
  127. [out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
  128. [local]
  129. HRESULT GetAllData([in] METADATA_HANDLE hMDHandle,
  130. [unique, in, string] LPCWSTR pszMDPath,
  131. [in] DWORD dwMDAttributes,
  132. [in] DWORD dwMDUserType,
  133. [in] DWORD dwMDDataType,
  134. [out] DWORD *pdwMDNumDataEntries,
  135. [out] DWORD *pdwMDDataSetNumber,
  136. [in] DWORD dwMDBufferSize,
  137. [out, size_is(dwMDBufferSize)] unsigned char *pbMDBuffer,
  138. [out] DWORD *pdwMDRequiredBufferSize);
  139. [call_as(GetAllData)]
  140. HRESULT R_GetAllData([in] METADATA_HANDLE hMDHandle,
  141. [unique, in, string] LPCWSTR pszMDPath,
  142. [in] DWORD dwMDAttributes,
  143. [in] DWORD dwMDUserType,
  144. [in] DWORD dwMDDataType,
  145. [out] DWORD *pdwMDNumDataEntries,
  146. [out] DWORD *pdwMDDataSetNumber,
  147. [in] DWORD dwMDBufferSize,
  148. [out] DWORD *pdwMDRequiredBufferSize,
  149. [out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
  150. HRESULT DeleteAllData([in] METADATA_HANDLE hMDHandle,
  151. [unique, in, string] LPCWSTR pszMDPath,
  152. [in] DWORD dwMDUserType,
  153. [in] DWORD dwMDDataType);
  154. HRESULT CopyData([in] METADATA_HANDLE hMDSourceHandle,
  155. [unique, in, string] LPCWSTR pszMDSourcePath,
  156. [in] METADATA_HANDLE hMDDestHandle,
  157. [unique, in, string] LPCWSTR pszMDDestPath,
  158. [in] DWORD dwMDAttributes,
  159. [in] DWORD dwMDUserType,
  160. [in] DWORD dwMDDataType,
  161. [in] BOOL bMDCopyFlag);
  162. HRESULT GetDataPaths([in] METADATA_HANDLE hMDHandle,
  163. [unique, in, string] LPCWSTR pszMDPath,
  164. [in] DWORD dwMDIdentifier,
  165. [in] DWORD dwMDDataType,
  166. [in] DWORD dwMDBufferSize,
  167. [out, size_is(dwMDBufferSize)] WCHAR *pszBuffer,
  168. [out] DWORD *pdwMDRequiredBufferSize);
  169. HRESULT OpenKey([in] METADATA_HANDLE hMDHandle,
  170. [unique, in, string] LPCWSTR pszMDPath,
  171. [in] DWORD dwMDAccessRequested,
  172. [in] DWORD dwMDTimeOut,
  173. [out] PMETADATA_HANDLE phMDNewHandle);
  174. HRESULT CloseKey([in] METADATA_HANDLE hMDHandle);
  175. HRESULT ChangePermissions([in] METADATA_HANDLE hMDHandle,
  176. [in] DWORD dwMDTimeOut,
  177. [in] DWORD dwMDAccessRequested);
  178. HRESULT SaveData();
  179. HRESULT GetHandleInfo([in] METADATA_HANDLE hMDHandle,
  180. [out] PMETADATA_HANDLE_INFO pmdhiInfo);
  181. HRESULT GetSystemChangeNumber([out] DWORD *pdwSystemChangeNumber);
  182. HRESULT GetDataSetNumber([in] METADATA_HANDLE hMDHandle,
  183. [unique, in, string] LPCWSTR pszMDPath,
  184. [out] DWORD *pdwMDDataSetNumber);
  185. HRESULT SetLastChangeTime([in] METADATA_HANDLE hMDHandle,
  186. [unique, in, string] LPCWSTR pszMDPath,
  187. [in] PFILETIME pftMDLastChangeTime,
  188. [in] BOOL bLocalTime);
  189. HRESULT GetLastChangeTime([in] METADATA_HANDLE hMDHandle,
  190. [unique, in, string] LPCWSTR pszMDPath,
  191. [out] PFILETIME pftMDLastChangeTime,
  192. [in] BOOL bLocalTime);
  193. [local, restricted]
  194. HRESULT KeyExchangePhase1();
  195. [local, restricted]
  196. HRESULT KeyExchangePhase2();
  197. [call_as(KeyExchangePhase1)]
  198. HRESULT R_KeyExchangePhase1(
  199. [unique, in] struct _IIS_CRYPTO_BLOB *pClientKeyExchangeKeyBlob,
  200. [unique, in] struct _IIS_CRYPTO_BLOB *pClientSignatureKeyBlob,
  201. [out] struct _IIS_CRYPTO_BLOB **ppServerKeyExchangeKeyBlob,
  202. [out] struct _IIS_CRYPTO_BLOB **ppServerSignatureKeyBlob,
  203. [out] struct _IIS_CRYPTO_BLOB **ppServerSessionKeyBlob
  204. );
  205. [call_as(KeyExchangePhase2)]
  206. HRESULT R_KeyExchangePhase2(
  207. [unique, in] struct _IIS_CRYPTO_BLOB *pClientSessionKeyBlob,
  208. [unique, in] struct _IIS_CRYPTO_BLOB *pClientHashBlob,
  209. [out] struct _IIS_CRYPTO_BLOB **ppServerHashBlob
  210. );
  211. HRESULT Backup(
  212. [unique, in, string] LPCWSTR pszMDBackupLocation,
  213. [in] DWORD dwMDVersion,
  214. [in] DWORD dwMDFlags);
  215. HRESULT Restore(
  216. [unique, in, string] LPCWSTR pszMDBackupLocation,
  217. [in] DWORD dwMDVersion,
  218. [in] DWORD dwMDFlags);
  219. HRESULT EnumBackups(
  220. [in, out, size_is(ADMINDATA_MAX_NAME_LEN)] LPWSTR pszMDBackupLocation,
  221. [out] DWORD *pdwMDVersion,
  222. [out] PFILETIME pftMDBackupTime,
  223. [in] DWORD dwMDEnumIndex);
  224. HRESULT DeleteBackup(
  225. [unique, in, string] LPCWSTR pszMDBackupLocation,
  226. [in] DWORD dwMDVersion);
  227. HRESULT UnmarshalInterface(
  228. [out] IMSAdminBaseW **piadmbwInterface
  229. );
  230. [local, restricted]
  231. HRESULT GetServerGuid();
  232. [call_as(GetServerGuid)]
  233. HRESULT R_GetServerGuid(
  234. [out] GUID *pServerGuid
  235. );
  236. };
  237. [
  238. object,
  239. uuid(8298d101-f992-43b7-8eca-5052d885b995),
  240. pointer_default(unique)
  241. ]
  242. interface IMSAdminBase2W : IMSAdminBaseW {
  243. // Interfaces
  244. HRESULT BackupWithPasswd(
  245. [unique, in, string] LPCWSTR pszMDBackupLocation,
  246. [in] DWORD dwMDVersion,
  247. [in] DWORD dwMDFlags,
  248. [unique, in, string] LPCWSTR pszPasswd);
  249. HRESULT RestoreWithPasswd(
  250. [unique, in, string] LPCWSTR pszMDBackupLocation,
  251. [in] DWORD dwMDVersion,
  252. [in] DWORD dwMDFlags,
  253. [unique, in, string] LPCWSTR pszPasswd);
  254. HRESULT Export(
  255. [unique, in, string] LPCWSTR pszPasswd,
  256. [unique, in, string] LPCWSTR pszFileName,
  257. [unique, in, string] LPCWSTR pszSourcePath,
  258. [in] DWORD dwMDFlags);
  259. HRESULT Import(
  260. [unique, in, string] LPCWSTR pszPasswd,
  261. [unique, in, string] LPCWSTR pszFileName,
  262. [unique, in, string] LPCWSTR pszSourcePath,
  263. [unique, in, string] LPCWSTR pszDestPath,
  264. [in] DWORD dwMDFlags);
  265. HRESULT RestoreHistory(
  266. [unique, in, string] LPCWSTR pszMDHistoryLocation,
  267. [in] DWORD dwMDMajorVersion,
  268. [in] DWORD dwMDMinorVersion,
  269. [in] DWORD dwMDFlags);
  270. HRESULT EnumHistory(
  271. [in, out, size_is(ADMINDATA_MAX_NAME_LEN)] LPWSTR pszMDHistoryLocation,
  272. [out] DWORD *pdwMDMajorVersion,
  273. [out] DWORD *pdwMDMinorVersion,
  274. [out] PFILETIME pftMDHistoryTime,
  275. [in] DWORD dwMDEnumIndex);
  276. };
  277. [
  278. object,
  279. uuid(f612954d-3b0b-4c56-9563-227b7be624b4),
  280. pointer_default(unique)
  281. ]
  282. interface IMSAdminBase3W : IMSAdminBase2W {
  283. HRESULT GetChildPaths(
  284. [in] METADATA_HANDLE hMDHandle,
  285. [unique, in, string] LPCWSTR pszMDPath,
  286. [in] DWORD cchMDBufferSize,
  287. [in, out, unique, size_is(cchMDBufferSize)] WCHAR *pszBuffer,
  288. [in, out, unique] DWORD *pcchMDRequiredBufferSize);
  289. };
  290. //
  291. // IID_IMSImpExpHelp_W
  292. //
  293. [
  294. object,
  295. uuid(29FF67FF-8050-480f-9F30-CC41635F2F9D),
  296. pointer_default(unique)
  297. ]
  298. interface IMSImpExpHelpW:IUnknown
  299. {
  300. HRESULT EnumeratePathsInFile (
  301. [unique, in, string] LPCWSTR pszFileName,
  302. [unique, in, string] LPCWSTR pszKeyType,
  303. [in] DWORD dwMDBufferSize,
  304. [in, out, unique, size_is(dwMDBufferSize)] WCHAR *pszBuffer,
  305. [out] DWORD *pdwMDRequiredBufferSize);
  306. }
  307. //
  308. // IID_IMSAdminBaseSink_W
  309. //
  310. [
  311. object,
  312. uuid(A9E69612-B80D-11d0-B9B9-00A0C922E750),
  313. async_uuid(A9E69613-B80D-11d0-B9B9-00A0C922E750),
  314. pointer_default(unique)
  315. ]
  316. interface IMSAdminBaseSinkW:IUnknown
  317. {
  318. HRESULT SinkNotify(
  319. [in] DWORD dwMDNumElements,
  320. [in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT_W pcoChangeList[]);
  321. HRESULT ShutdownNotify();
  322. }
  323. cpp_quote("#endif")