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.

477 lines
29 KiB

  1. #pragma warning( disable: 4049 ) /* more than 64k source lines */
  2. /* this ALWAYS GENERATED file contains the definitions for the interfaces */
  3. /* File created by MIDL compiler version 6.00.0347 */
  4. /* Compiler settings for mddefw.idl:
  5. Oi, W1, Zp8, env=Win32 (32b run)
  6. protocol : dce , ms_ext, c_ext
  7. error checks: allocation ref
  8. VC __declspec() decoration level:
  9. __declspec(uuid()), __declspec(selectany), __declspec(novtable)
  10. DECLSPEC_UUID(), MIDL_INTERFACE()
  11. */
  12. //@@MIDL_FILE_HEADING( )
  13. /* verify that the <rpcndr.h> version is high enough to compile this file*/
  14. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  15. #define __REQUIRED_RPCNDR_H_VERSION__ 440
  16. #endif
  17. #include "rpc.h"
  18. #include "rpcndr.h"
  19. #ifndef __mddefw_h__
  20. #define __mddefw_h__
  21. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  22. #pragma once
  23. #endif
  24. /* Forward Declarations */
  25. /* header files for imported files */
  26. #include "unknwn.h"
  27. #ifdef __cplusplus
  28. extern "C"{
  29. #endif
  30. void * __RPC_USER MIDL_user_allocate(size_t);
  31. void __RPC_USER MIDL_user_free( void * );
  32. /* interface __MIDL_itf_mddefw_0000 */
  33. /* [local] */
  34. /*++
  35. Copyright (c) 1997-1999 Microsoft Corporation
  36. Module Name: mddef.h
  37. Definitions for Admin Objects and Metadata
  38. --*/
  39. #ifndef _MD_DEFW_
  40. #define _MD_DEFW_
  41. #include <mdmsg.h>
  42. #include <mdcommsg.h>
  43. /*
  44. Error Codes
  45. Metadata api's all return HRESULTS. Since internal results are either
  46. winerrors or Metadata specific return codes (see mdmsg.h), they are
  47. converted to HRESULTS using the RETURNCODETOHRESULT macro (see
  48. commsg.h).
  49. */
  50. /*
  51. Max Name Length
  52. The maximum number of characters in the length of a metaobject name,
  53. including the terminating NULL. This refers to each node in the tree,
  54. not the entire path.
  55. eg. strlen("Root") < METADATA_MAX_NAME_LEN
  56. */
  57. #define METADATA_MAX_NAME_LEN 256
  58. /*
  59. Access Permissons
  60. Permissions associated with handles of type METADATA_HANDLE
  61. METADATA_PERMISSION_READ - Allows reading metadata.
  62. METADATA_PERMISSION_WRITE - Allows writing metadata.
  63. */
  64. #define METADATA_PERMISSION_READ 0x00000001
  65. #define METADATA_PERMISSION_WRITE 0x00000002
  66. /*
  67. Data Types
  68. ALL_METADATA - Used on Get/Enum/Getall api's (ComMDGetMetaData,
  69. ComMDEnumMetaData, and ComMDGetAllMetaData), api's to allow getting
  70. all data. Not valid on the Set api.
  71. DWORD_METADATA - The data is an unsigned 32 bit value.
  72. STRING_METADATA - The data is a null terminated ASCII string.
  73. BINARY_METADATA - The data is any binary value.
  74. EXPANDSZ_METADATA - The data is a null terminated ASCII string.
  75. Clients are expected to treat this as an expandsz string.
  76. MULTISZ_METADATA - A series of NULL terminated ASCII strings. ending
  77. with 2 NULL's.
  78. */
  79. enum METADATATYPES
  80. { ALL_METADATA = 0,
  81. DWORD_METADATA = ALL_METADATA + 1,
  82. STRING_METADATA = DWORD_METADATA + 1,
  83. BINARY_METADATA = STRING_METADATA + 1,
  84. EXPANDSZ_METADATA = BINARY_METADATA + 1,
  85. MULTISZ_METADATA = EXPANDSZ_METADATA + 1,
  86. INVALID_END_METADATA = MULTISZ_METADATA + 1
  87. } ;
  88. /*
  89. Attributes - The flags for the data.
  90. METADATA_INHERIT - If set for a data item, the data item can be
  91. inherited. If set on input to the Get/Enum/Getall api's,
  92. (ComMDGetMetaData, ComMDEnumMetaData, and ComMDGetAllMetaData),
  93. inheritable data will be returned. If not set on input to the
  94. Get/Enum/Getall, inheritable data will not be returned.
  95. METADATA_PARTIAL_PATH - If set on input to Get/Enum/Getall api's, this
  96. routine will return ERROR_SUCCESS and the inherited data even if
  97. the entire path is not present. Only valid if METADATA_INHERIT is
  98. also set. Should not be set for data items on input the the Set api
  99. (ComMDSetMetaData).
  100. METADATA_SECURE - If set for a data item, the data is stored in a
  101. secure fasion. Should not be set on input to Get/Enum api's.
  102. METADATA_REFERENCE - If set for a data item, the data item may be
  103. gotten by reference. If set on input to Get/Enum/GetAll api's and
  104. set on a the data item being returned, the data is returned by
  105. reference. A pointer to the metadata server's copy of the data is
  106. placed in the Data field of the METADATA_RECORD or
  107. METADATA_GETALL_RECORD, and the DataTag field is set. This data must
  108. be freed by calling ComMDReleaseReferenceData. The client must not
  109. change this data. This flag must not be set on input to
  110. Get/Enum/Getall api's from remote clients.
  111. METADATA_VOLATILE - If set for a data item, the data item will not be
  112. saved to long term storage.
  113. METADATA_ISINHERITED - If specified on input to one of the get api's,
  114. the flag will be set on return if the data was inherited.
  115. METADATA_INSERT_PATH - If specified on input to one of the get api's,
  116. and on a string data item, the path relative to handle will replaced the
  117. string MD_INSERT_PATH_STRING in the string data.
  118. METADATA_LOCAL_MACHINE_ONLY - If set for a data item, the data item
  119. will not be replicated during web cluster replication.
  120. */
  121. #define METADATA_NO_ATTRIBUTES 0
  122. #define METADATA_INHERIT 0x00000001
  123. #define METADATA_PARTIAL_PATH 0x00000002
  124. #define METADATA_SECURE 0x00000004
  125. #define METADATA_REFERENCE 0x00000008
  126. #define METADATA_VOLATILE 0x00000010
  127. #define METADATA_ISINHERITED 0x00000020
  128. #define METADATA_INSERT_PATH 0x00000040
  129. #define METADATA_LOCAL_MACHINE_ONLY 0x00000080
  130. /*
  131. Backup Flags.
  132. MD_BACKUP_OVERWRITE - If set, the metabase will be backed up even if
  133. a backupe with the same name and version already exists. The
  134. existing backup will be overwritten.
  135. MD_BACKUP_SAVE_FIRST - If set backup will save the metabase prior to
  136. making the backup. If the save fails, backup behavior is dependent
  137. on the value of MD_BACKUP_FORCE_BACKUP.
  138. MD_BACKUP_FORCE_BACKUP - If set backup will proceed even if the save
  139. failed. Only valid if MD_BACKUP_SAVE_FIRST is set. If the save
  140. but the backup succeeds, a warning will be returned.
  141. */
  142. #define MD_BACKUP_OVERWRITE 0x00000001
  143. #define MD_BACKUP_SAVE_FIRST 0x00000002
  144. #define MD_BACKUP_FORCE_BACKUP 0x00000004
  145. /*
  146. Backup Version Defines.
  147. MD_BACKUP_NEXT_VERSION - For Backup, indicates use the next available
  148. backup version of the BackupLocation specified, ie. one higher than
  149. the highest existing version.
  150. Not valid for Restore or DeleteBackup.
  151. MD_BACKUP_HIGHEST_VERSION - For Backup, Restore, and DeleteBackup, will
  152. use the highest existing backup version of the BackupLocation
  153. specified.
  154. MD_BACKUP_MAX_VERSION - The highest allowed backup version number.
  155. MD_BACKUP_MAX_LEN - The maximup length, in UNICODE characters, of the
  156. BackupLocation.
  157. */
  158. #define MD_BACKUP_NEXT_VERSION 0xffffffff
  159. #define MD_BACKUP_HIGHEST_VERSION 0xfffffffe
  160. #define MD_BACKUP_MAX_VERSION 9999
  161. #define MD_BACKUP_MAX_LEN (100)
  162. /*
  163. Backup Location Defines.
  164. MD_DEFAULT_BACKUP_LOCATION - The default location to backup from or
  165. restore to if no location is specified.
  166. */
  167. #define MD_DEFAULT_BACKUP_LOCATION TEXT("MDBackUp")
  168. /*
  169. History Flags.
  170. MD_HISTORY_LATEST - The most recent history file by timestamp
  171. */
  172. #define MD_HISTORY_LATEST 0x00000001
  173. /*
  174. Export Flags.
  175. MD_EXPORT_INHERITED - If set, inherited properties will be backed up
  176. to special section in output file called IIsInheritedProperties.
  177. If not set, inherited properties are ignored.
  178. MD_EXPORT_NODE_ONLY - If set, children will not be exported.
  179. If not set, children will be exported.
  180. */
  181. #define MD_EXPORT_INHERITED 0x00000001
  182. #define MD_EXPORT_NODE_ONLY 0x00000002
  183. /*
  184. Import Flags.
  185. MD_IMPORT_INHERITED - If set, inherited properties will be imported.
  186. MD_IMPORT_NODE_ONLY - If set, children will not be imported.
  187. If not set, children will be imported.
  188. MD_IMPORT_MERGE - If set, imported settings overwrite existing
  189. settings, but entire node is not overwritten. If not set, entire
  190. node is clobbered.
  191. */
  192. #define MD_IMPORT_INHERITED 0x00000001
  193. #define MD_IMPORT_NODE_ONLY 0x00000002
  194. #define MD_IMPORT_MERGE 0x00000004
  195. /*
  196. Insert Path Defines.
  197. */
  198. #define MD_INSERT_PATH_STRINGA "<%INSERT_PATH%>"
  199. #define MD_INSERT_PATH_STRINGW L##"<%INSERT_PATH%>"
  200. #define MD_INSERT_PATH_STRING TEXT("<%INSERT_PATH%>")
  201. /*
  202. Handle Defines.
  203. */
  204. #define METADATA_MASTER_ROOT_HANDLE 0
  205. /*
  206. METADATA_RECORD is the basic input/output parameter for the set and get
  207. metadata api's. The Set api (ComMDSetMetaData) takes all fields as
  208. input, except DataTag. The Get/Enum api's (ComMDGetMetadata and
  209. ComMDEnumMetaData) take some of the fields as input, and fill in all
  210. fields as output.
  211. Identifier - The identifier of the data.
  212. Attributes - The flags for the data.
  213. UserType - The User Type for the data. This is a user defined field to allow
  214. users to group data. If set to anything other than ALL_METADATA on input
  215. to Get/Set apis, only metadata of the specified User Type will be
  216. returned.
  217. ALL_METADATA
  218. User Defined Values
  219. DataType - The Type of the data. Must be set to a valid value other than
  220. ALL_METADATA for each data item. If set to anything other than
  221. ALL_METADATA on input to Get/Set api's, only metadata of the
  222. specified Data Type will be returned.
  223. ALL_METADATA
  224. DWORD_METADATA
  225. STRING_METADATA
  226. BINARY_METADATA
  227. EXPANDSZ_METADATA
  228. DataLen - On input to the Set api, specifies the length of Data, in
  229. bytes. Inprocess clients only need to specify this for binary data.
  230. Remote clients need to specify this for all data types. For strings,
  231. this must include the trailing '\0', eg. strlen(string) + 1.
  232. On input to Get/Enum apis, specifies the size of the buffer pointed to
  233. by Data. On successful output from Get/Enum API's, specifies the size of
  234. Data in bytes.
  235. Data - On input to the Set api, points to the data. On input to the
  236. Get/Enum api's, points to a buffer to return the data in. On output
  237. from the Get/Enum api's, points to the data. If the data is not
  238. gotten by reference, the pointer will be unchanged.
  239. DataTag - A tag for reference data. Not used in the Set api. Not used on
  240. input to the Get/Enum api's. On successful return from the Get/Enum
  241. api's, this is set to a nonzero tag if the data was gotten by reference,
  242. and set to 0 if the data was not gotten by reference.
  243. */
  244. typedef struct _METADATA_RECORD
  245. {
  246. DWORD dwMDIdentifier;
  247. DWORD dwMDAttributes;
  248. DWORD dwMDUserType;
  249. DWORD dwMDDataType;
  250. DWORD dwMDDataLen;
  251. /* [size_is][unique] */ unsigned char *pbMDData;
  252. DWORD dwMDDataTag;
  253. } METADATA_RECORD;
  254. typedef struct _METADATA_RECORD *PMETADATA_RECORD;
  255. /*
  256. METADATA_GETALL_RECORD, is essentially the same as METADATA_RECORD, but is
  257. used by MDGetAllMetaData. It is used the same as the corresponding
  258. METADATA_RECORD values for the MDGetMetaData, with the following
  259. exceptions:
  260. MDGetAllMetadata does not take the structure as input, but takes parameters
  261. equivalent to Attributes, UserType, and DataType.
  262. On output, MDGetAllMetadata returns an array of METADATA_GETALL_RECORD.
  263. DataOffset/Data - If the data is not returned by reference, DataOffset
  264. contains the byte offset into the buffer provided. If the data is
  265. returned by reference, Data contains a pointer to the data.
  266. Because an opaque pointer to an array of _METADATA_GETALL_RECORD's is
  267. passed on calls to GetAllData, its size must be the same on x86 and ia64.
  268. So, the pbMDData member (not used by the public interface) has been
  269. removed and a new structure _METADATA_GETALL_INTERNAL_RECORD has been
  270. created for use by the callees of the internal interface
  271. */
  272. typedef struct _METADATA_GETALL_RECORD
  273. {
  274. DWORD dwMDIdentifier;
  275. DWORD dwMDAttributes;
  276. DWORD dwMDUserType;
  277. DWORD dwMDDataType;
  278. DWORD dwMDDataLen;
  279. DWORD dwMDDataOffset;
  280. DWORD dwMDDataTag;
  281. } METADATA_GETALL_RECORD;
  282. typedef struct _METADATA_GETALL_RECORD *PMETADATA_GETALL_RECORD;
  283. typedef struct _METADATA_GETALL_INTERNAL_RECORD
  284. {
  285. DWORD dwMDIdentifier;
  286. DWORD dwMDAttributes;
  287. DWORD dwMDUserType;
  288. DWORD dwMDDataType;
  289. DWORD dwMDDataLen;
  290. union
  291. {
  292. DWORD_PTR dwMDDataOffset;
  293. unsigned char *pbMDData;
  294. } ;
  295. DWORD dwMDDataTag;
  296. } METADATA_GETALL_INTERNAL_RECORD;
  297. typedef struct _METADATA_GETALL_INTERNAL_RECORD *PMETADATA_GETALL_INTERNAL_RECORD;
  298. typedef DWORD METADATA_HANDLE;
  299. typedef DWORD *PMETADATA_HANDLE;
  300. /*
  301. Handle Information
  302. Permissions - The permissions associated with the handle.
  303. METADATA_PERMISSION_READ
  304. METADATA_PERMISSION_WRITE
  305. SystemChangeNumber - The system change number at the time the handle was
  306. allocated.
  307. */
  308. typedef struct _METADATA_HANDLE_INFO
  309. {
  310. DWORD dwMDPermissions;
  311. DWORD dwMDSystemChangeNumber;
  312. } METADATA_HANDLE_INFO;
  313. typedef struct _METADATA_HANDLE_INFO *PMETADATA_HANDLE_INFO;
  314. /*
  315. Change Object - The structure passed to ComMDSinkNotify.
  316. Path - The path of the MetaObject modified.
  317. ChangeType - The types of changes made, from the flags below.
  318. NumDataIDs - The number of data id's changed.
  319. DataIDs - An array of the data id's changed.
  320. */
  321. #define MD_CHANGE_OBJECT MD_CHANGE_OBJECT_W
  322. #define PMD_CHANGE_OBJECT PMD_CHANGE_OBJECT_W
  323. typedef struct _MD_CHANGE_OBJECT_W
  324. {
  325. /* [string] */ LPWSTR pszMDPath;
  326. DWORD dwMDChangeType;
  327. DWORD dwMDNumDataIDs;
  328. /* [size_is][unique] */ DWORD *pdwMDDataIDs;
  329. } MD_CHANGE_OBJECT_W;
  330. typedef struct _MD_CHANGE_OBJECT_W *PMD_CHANGE_OBJECT_W;
  331. /*
  332. Change Types
  333. MD_CHANGE_TYPE_DELETE_OBJECT - The Meta Object was deleted.
  334. MD_CHANGE_TYPE_ADD_OBJECT - The Meta Object was added.
  335. MD_CHANGE_TYPE_SET_DATA - A data item was set.
  336. MD_CHANGE_TYPE_DELETE_DATA - A data item was deleted.
  337. MD_CHANGE_TYPE_RENAME_OBJECT - The Meta Object was renamed.
  338. */
  339. #define MD_CHANGE_TYPE_DELETE_OBJECT 0x00000001
  340. #define MD_CHANGE_TYPE_ADD_OBJECT 0x00000002
  341. #define MD_CHANGE_TYPE_SET_DATA 0x00000004
  342. #define MD_CHANGE_TYPE_DELETE_DATA 0x00000008
  343. #define MD_CHANGE_TYPE_RENAME_OBJECT 0x00000010
  344. /*
  345. Max Change Entries - The maximum number of change entries that will be sent on
  346. a single call to IMDCOMSINK::ComMDSinkNotify. If more notifications are
  347. required, IMDCOMSINK::ComMDSinkNotify will be called multiple times.
  348. */
  349. #define MD_MAX_CHANGE_ENTRIES 100
  350. #endif
  351. extern RPC_IF_HANDLE __MIDL_itf_mddefw_0000_v0_0_c_ifspec;
  352. extern RPC_IF_HANDLE __MIDL_itf_mddefw_0000_v0_0_s_ifspec;
  353. /* Additional Prototypes for ALL interfaces */
  354. /* end of Additional Prototypes */
  355. #ifdef __cplusplus
  356. }
  357. #endif
  358. #endif