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.

246 lines
7.5 KiB

  1. /*===================================================================
  2. Microsoft Denali
  3. Microsoft Confidential.
  4. Copyright 1997 Microsoft Corporation. All Rights Reserved.
  5. Component: MetaUtil object
  6. File: MetaUtil.idl
  7. Owner: t-BrianM
  8. This file contains the MIDL code for the MetaUtil object.
  9. ===================================================================*/
  10. import "oaidl.idl";
  11. import "ocidl.idl";
  12. [
  13. object,
  14. uuid(A4FA4E18-EF45-11D0-9E65-00C04FB94FEF),
  15. dual,
  16. helpstring("ICheckError Interface"),
  17. pointer_default(unique)
  18. ]
  19. interface ICheckError : IDispatch
  20. {
  21. [propget, id(1), helpstring("Id of the type of error")]
  22. HRESULT Id([out, retval] long *plId);
  23. [propget, id(2), helpstring("Severity of the error")]
  24. HRESULT Severity([out, retval] long *plSeverity);
  25. [propget, id(3), helpstring("Description of the error")]
  26. HRESULT Description([out, retval] BSTR *pbstrDescription);
  27. [propget, id(4), helpstring("Key where occured")]
  28. HRESULT Key([out, retval] BSTR *pbstrKey);
  29. [propget, id(5), helpstring("Property where occured or 0")]
  30. HRESULT Property([out, retval] long *plProperty);
  31. };
  32. [
  33. object,
  34. uuid(A4FA4E11-EF45-11D0-9E65-00C04FB94FEF),
  35. dual,
  36. helpstring("ICheckErrorCollection Interface"),
  37. pointer_default(unique)
  38. ]
  39. interface ICheckErrorCollection : IDispatch
  40. {
  41. [propget, id(DISPID_VALUE), helpstring("Get an error by 1 based index")]
  42. HRESULT Item([in] long lIndex, [out, retval] LPDISPATCH *ppIReturn);
  43. [propget, id(1), helpstring("Number of errors")]
  44. HRESULT Count([out, retval] long *plReturn);
  45. [propget, id(DISPID_NEWENUM), restricted]
  46. HRESULT _NewEnum([out, retval] LPUNKNOWN *ppIReturn);
  47. };
  48. [
  49. object,
  50. uuid(5C3CD722-E6C3-11D0-9E5D-00C04FB94FEF),
  51. dual,
  52. helpstring("IProperty Interface"),
  53. pointer_default(unique)
  54. ]
  55. interface IProperty : IDispatch
  56. {
  57. [propget, id(1), helpstring("Id of property")]
  58. HRESULT Id([out, retval] long *plId);
  59. [propget, id(2), helpstring("Name or property")]
  60. HRESULT Name([out, retval] BSTR *pbstrName);
  61. [propget, id(3), helpstring("Metabase attributes of property")]
  62. HRESULT Attributes([out, retval] long *plAttributes);
  63. [propput, id(3), helpstring("Metabase attributes of property")]
  64. HRESULT Attributes([in] long lAttributes);
  65. [propget, id(4), helpstring("Metabase UserType of property")]
  66. HRESULT UserType([out, retval] long *plUserType);
  67. [propput, id(4), helpstring("Metabase UserType of property")]
  68. HRESULT UserType([in] long lUserType);
  69. [propget, id(5), helpstring("Metabase DataType of property")]
  70. HRESULT DataType([out, retval] long *plDataType);
  71. [propput, id(5), helpstring("Metabase DataType of property")]
  72. HRESULT DataType([in] long lDataType);
  73. [propget, id(6), helpstring("Property data")]
  74. HRESULT Data([out, retval] VARIANT *pvarData);
  75. [propput, id(6), helpstring("Property data")]
  76. HRESULT Data([in] VARIANT varData);
  77. [id(7), helpstring("Write property to metabase")]
  78. HRESULT Write();
  79. };
  80. [
  81. object,
  82. uuid(802D7470-E767-11D0-9E5D-00C04FB94FEF),
  83. dual,
  84. helpstring("IPropertyCollection Interface"),
  85. pointer_default(unique)
  86. ]
  87. interface IPropertyCollection : IDispatch
  88. {
  89. [propget, id(DISPID_VALUE), helpstring("Get a property by 1 based index")]
  90. HRESULT Item([in] long lIndex, [out, retval] LPDISPATCH *ppIReturn);
  91. [propget, id(1), helpstring("Count the properties")]
  92. HRESULT Count([out, retval] long *plReturn);
  93. [propget, id(DISPID_NEWENUM), restricted]
  94. HRESULT _NewEnum([out, retval] LPUNKNOWN *ppIReturn);
  95. [id(2), helpstring("Get a property by Id or Name")]
  96. HRESULT Get([in] VARIANT varId, [out, retval] IProperty **ppIReturn);
  97. [id(3), helpstring("Add a property to the collection's base key")]
  98. HRESULT Add([in] VARIANT varId, [out, retval] IProperty **ppIReturn);
  99. [id(4), helpstring("Delete a property from the collection's base key")]
  100. HRESULT Remove([in] VARIANT varId);
  101. };
  102. [
  103. object,
  104. uuid(1C733DD0-E1B5-11D0-9E58-00C04FB94FEF),
  105. dual,
  106. helpstring("IKeyCollection Interface"),
  107. pointer_default(unique)
  108. ]
  109. interface IKeyCollection : IDispatch
  110. {
  111. [propget, id(DISPID_VALUE), helpstring("Get a key by 1 based index")]
  112. HRESULT Item([in] long lIndex, [out, retval] BSTR *pbstrRetKey);
  113. [propget, id(1), helpstring("Count the keys")]
  114. HRESULT Count([out, retval] long *plReturn);
  115. [propget, id(DISPID_NEWENUM), restricted]
  116. HRESULT _NewEnum([out, retval] LPUNKNOWN *ppIReturn);
  117. [id(2), helpstring("Create a key relative to the collection's base key")]
  118. HRESULT Add([in] BSTR bstrRelKey);
  119. [id(3), helpstring("Delete a key relative to the collection's base key")]
  120. HRESULT Remove([in] BSTR bstrRelKey);
  121. };
  122. [
  123. object,
  124. uuid(B40F6F4D-E116-11D0-9E58-00C04FB94FEF),
  125. dual,
  126. helpstring("IMetaUtil Interface"),
  127. pointer_default(unique)
  128. ]
  129. interface IMetaUtil : IDispatch
  130. {
  131. [id(1), helpstring("Flat, non-recursive enumeration of keys")]
  132. HRESULT EnumKeys([in] BSTR bstrBaseKey, [out, retval] IKeyCollection **ppIReturn);
  133. [id(2), helpstring("Depth first, recursive enumeration of keys")]
  134. HRESULT EnumAllKeys([in] BSTR bstrBaseKey, [out, retval] IKeyCollection **ppIReturn);
  135. [id(3), helpstring("Enumerate properties of a key")]
  136. HRESULT EnumProperties([in] BSTR bstrKey, [out, retval] IPropertyCollection **ppIReturn);
  137. [id(4), helpstring("Create a key")]
  138. HRESULT CreateKey([in] BSTR bstrKey);
  139. [id(5), helpstring("Delete a key")]
  140. HRESULT DeleteKey([in] BSTR bstrKey);
  141. [id(6), helpstring("Rename a key")]
  142. HRESULT RenameKey([in] BSTR bstrOldName, [in] BSTR bstrNewName);
  143. [id(7), helpstring("Copy a key")]
  144. HRESULT CopyKey([in] BSTR bstrSrcKey, [in] BSTR bstrDestKey, [in] BOOL fOverwrite);
  145. [id(8), helpstring("Move a key")]
  146. HRESULT MoveKey([in] BSTR bstrSrcKey, [in] BSTR bstrDestKey, [in] BOOL fOverwrite);
  147. [id(9), helpstring("Get a property")]
  148. HRESULT GetProperty([in] BSTR bstrKey, [in] VARIANT varId, [out, retval] IProperty **ppIReturn);
  149. [id(10), helpstring("Create a property")]
  150. HRESULT CreateProperty([in] BSTR bstrKey, [in] VARIANT varId, [out, retval] IProperty **ppIReturn);
  151. [id(11), helpstring("Delete a property")]
  152. HRESULT DeleteProperty([in] BSTR Key, [in] VARIANT varId);
  153. [id(12), helpstring("Check a metabase schema for errors")]
  154. HRESULT CheckSchema([in] BSTR bstrMachine, [out, retval] ICheckErrorCollection **ppIReturn);
  155. [id(13), helpstring("Check a metabase key for errors")]
  156. HRESULT CheckKey([in] BSTR bstrKey, [out, retval] ICheckErrorCollection **ppIReturn);
  157. [id(14), helpstring("Expand an environment string")]
  158. HRESULT ExpandString([in] BSTR bstrIn, [out, retval] BSTR *pbstrRet);
  159. [id(15), helpstring("Translate a property id to a name")]
  160. HRESULT PropIdToName([in] BSTR bstrKey, [in] long lId, [out, retval] BSTR *pbstrName);
  161. [id(16), helpstring("Translate a property name to an id")]
  162. HRESULT PropNameToId([in] BSTR bstrKey, [in] BSTR bstrName, [out, retval] long *plId);
  163. [propget, id(17), helpstring("Get a configuration setting")]
  164. HRESULT Config([in] BSTR bstrSetting, [out, retval] VARIANT *pvarValue);
  165. [propput, id(17), helpstring("Set a configuration setting")]
  166. HRESULT Config([in] BSTR bstrSetting, [in] VARIANT varValue);
  167. };
  168. [
  169. uuid(B40F6F40-E116-11D0-9E58-00C04FB94FEF),
  170. version(1.0),
  171. helpstring("IISSample MetaUtil Object Library")
  172. ]
  173. library MetaUtil
  174. {
  175. importlib("stdole2.tlb");
  176. [
  177. uuid(8C4B7ADF-E10B-11D0-9E58-00C04FB94FEF),
  178. helpstring("MetaUtil Class")
  179. ]
  180. coclass MetaUtil
  181. {
  182. [default] interface IMetaUtil;
  183. };
  184. [
  185. uuid(A4FA4E19-EF45-11D0-9E65-00C04FB94FEF),
  186. helpstring("CheckError Class")
  187. ]
  188. coclass CheckError
  189. {
  190. [default] interface ICheckError;
  191. };
  192. };