home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / mddefw.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  25.5 KB  |  418 lines

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