Mddefw.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:29k
源码类别:

模拟服务器

开发平台:

C/C++

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