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.

372 lines
9.7 KiB

  1. import "msxml.idl";
  2. import "wbemdisp.idl";
  3. [
  4. uuid(979D18F7-D1D2-4ee2-803D-A4C7A98DF75B),
  5. lcid(0x00),
  6. version(1.0),
  7. helpstring("Microsoft WMI XML Transformer V1.0")
  8. ]
  9. library WmiXMLTransformer
  10. {
  11. importlib("stdole32.tlb");
  12. interface IWmiXMLTransformer;
  13. typedef
  14. [
  15. v1_enum,
  16. uuid(28D1EEA5-D41E-46c2-B42D-6CE0B9B4D7A7),
  17. helpstring("Specifies Encoding required")
  18. ]
  19. enum WmiXMLEncoding
  20. {
  21. // TODO - integrate this enumeration with the core team's when they are ready
  22. wmiXML_CIM_DTD_2_0 = 0x0, // The DMTF DTD
  23. wmiXML_WMI_DTD_2_0 = 0x1, // Same as the WMI Nova DTD
  24. wmiXML_WMI_DTD_WHISTLER = 0x2
  25. } WmiXMLEncoding;
  26. typedef
  27. [
  28. v1_enum,
  29. uuid(598BCA7A-E40E-4265-8517-C9A86E2FC07E),
  30. helpstring("Specifies the compilation operation to perform")
  31. ]
  32. enum WmiXMLCompilationTypeEnum
  33. {
  34. WmiXMLCompilationWellFormCheck = 0x0,
  35. WmiXMLCompilationValidityCheck = 0x1,
  36. WmiXMLCompilationFullCompileAndLoad = 0x2
  37. } WmiXMLCompilationTypeEnum;
  38. [
  39. uuid(A2BB0F35-458E-4075-8A4B-F92664943917),
  40. helpstring("WMI XML Transformer Control")
  41. ]
  42. coclass WmiXMLTransformer
  43. {
  44. [default] interface IWmiXMLTransformer;
  45. };
  46. };
  47. /*************************************************
  48. * A collection of IXMLDOMDocuments
  49. * This is used for output from enumerations and queries
  50. * The primary purpose of this is to prevent reading of all the data from a socket
  51. * in the XML/HTTP case. Instead every call to Next() on the enumerator results in further data
  52. * being read from the socket.
  53. **************************************************/
  54. [
  55. local,
  56. object,
  57. uuid(3E46A227-5207-4603-8440-9FCC5AF16407),
  58. oleautomation,
  59. dual,
  60. hidden,
  61. nonextensible,
  62. helpstring("A collection of IXMLDOMDocument objects")
  63. ]
  64. interface ISWbemXMLDocumentSet : IDispatch
  65. {
  66. // Standard property required on all collections
  67. [id(DISPID_NEWENUM), propget, restricted] HRESULT _NewEnum ([out, retval] IUnknown **pUnk);
  68. [
  69. id(DISPID_VALUE),
  70. helpstring("Not Implemented")
  71. ]
  72. HRESULT Item (
  73. [in] BSTR strObjectPath,
  74. [in, defaultvalue(0)] long iFlags,
  75. [out, retval] IXMLDOMDocument **ppXMLDocument
  76. );
  77. [
  78. id(1),
  79. propget,
  80. helpstring("Not Implemented")
  81. ]
  82. HRESULT Count ([out, retval] long *iCount);
  83. [
  84. id(2),
  85. helpstring("The next item in this collection. This is primarily for C++ programs that dont want to use the enumerator")
  86. ]
  87. HRESULT NextDocument ([out, retval, unique] IXMLDOMDocument **ppDoc);
  88. [
  89. id(3),
  90. helpstring("Skips past the next document in the enumerator")
  91. ]
  92. HRESULT SkipNextDocument ();
  93. };
  94. /*************************************************
  95. * The primary interface for the transformer.
  96. * This scriptable interface allows for both read (get, enums, queries)
  97. * and write (compile) operations. It also exposes a few
  98. * properties to control the amount of information in the output,
  99. * for authentication credentials etc.
  100. **************************************************/
  101. [
  102. object,
  103. local,
  104. uuid(FB624102-3145-4daf-B0EA-FF5A31178600),
  105. dual,
  106. hidden,
  107. nonextensible,
  108. oleautomation,
  109. helpstring("WMI XML Transformer Dual Interface")
  110. ]
  111. interface IWmiXMLTransformer : IDispatch
  112. {
  113. [
  114. propget,
  115. id(1),
  116. helpstring("Specifies the type of XML Encoding to use")
  117. ]
  118. HRESULT XMLEncodingType([retval, out] WmiXMLEncoding *piEncoding);
  119. [
  120. propput,
  121. id(1)
  122. ]
  123. HRESULT XMLEncodingType([in] WmiXMLEncoding iEncoding);
  124. [
  125. propget,
  126. id(2),
  127. helpstring("Specifies the level of Qualifier information in the output XML")
  128. ]
  129. HRESULT QualifierFilter([retval, out] VARIANT_BOOL *bQualifierFilter);
  130. [
  131. propput,
  132. id(2)
  133. ]
  134. HRESULT QualifierFilter([in] VARIANT_BOOL bQualifierFilter);
  135. [
  136. propget,
  137. id(3),
  138. helpstring("Specifies whether to decorate elements with Class origin information")
  139. ]
  140. HRESULT ClassOriginFilter([retval, out] VARIANT_BOOL *bClassOriginFilter);
  141. [
  142. propput,
  143. id(3)
  144. ]
  145. HRESULT ClassOriginFilter([in] VARIANT_BOOL bClassOriginFilter);
  146. [
  147. propget,
  148. id(4),
  149. helpstring("Specifies the user name to be used for the operation")
  150. ]
  151. HRESULT User([retval, out] BSTR * strUser);
  152. [
  153. propput,
  154. id(4)
  155. ]
  156. HRESULT User ([in] BSTR strUser);
  157. [
  158. propget,
  159. id(5),
  160. helpstring("Specifies the password name to be used for the operation")
  161. ]
  162. HRESULT Password([retval, out] BSTR * strPassword);
  163. [
  164. propput,
  165. id(5)
  166. ]
  167. HRESULT Password ([in] BSTR strPassword);
  168. [
  169. propget,
  170. id(6),
  171. helpstring("Specifies the Authority (domain/machine)name to be used for the operation")
  172. ]
  173. HRESULT Authority([retval, out] BSTR * strAuthority);
  174. [
  175. propput,
  176. id(6)
  177. ]
  178. HRESULT Authority ([in] BSTR strAuthority);
  179. [
  180. propget,
  181. id(7),
  182. helpstring("Specifies the Impersonation level used for the operation. Standard RPC constants")
  183. ]
  184. HRESULT ImpersonationLevel([retval, out] DWORD * pdwImpersonationLevel);
  185. [
  186. propput,
  187. id(7)
  188. ]
  189. HRESULT ImpersonationLevel ([in] DWORD dwImpersonationLevel);
  190. [
  191. propget,
  192. id(8),
  193. helpstring("Specifies the AuthenticationLevel used for the operation. Standard RPC constants")
  194. ]
  195. HRESULT AuthenticationLevel([retval, out] DWORD * pdwAuthenticationLevel);
  196. [
  197. propput,
  198. id(8)
  199. ]
  200. HRESULT AuthenticationLevel ([in] DWORD dwAuthenticationLevel);
  201. [
  202. propget,
  203. id(9),
  204. helpstring("Specifies the locale name to be used for the operation")
  205. ]
  206. HRESULT Locale([retval, out] BSTR * strLocale);
  207. [
  208. propput,
  209. id(9)
  210. ]
  211. HRESULT Locale ([in] BSTR strLocale);
  212. [
  213. propget,
  214. id(10),
  215. helpstring("Specifies whether only local elements (properties and methods) are to be included in output")
  216. ]
  217. HRESULT LocalOnly([retval, out] VARIANT_BOOL *bLocalOnly);
  218. [
  219. propput,
  220. id(10)
  221. ]
  222. HRESULT LocalOnly([in] VARIANT_BOOL bLocalOnly);
  223. [
  224. helpstring("Maps a single class or instance to XML"),
  225. id(11)
  226. ]
  227. HRESULT GetObject(
  228. // Identifies an object name to get
  229. [in] BSTR strObjectPath,
  230. // The IWbemContext object
  231. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  232. // On successful return contains XML document stream
  233. [out,retval] IXMLDOMDocument **ppXMLDocument
  234. );
  235. [
  236. helpstring("Maps a query result set to XML"),
  237. id(12)
  238. ]
  239. HRESULT ExecQuery(
  240. // Identifies a namespace to connect to
  241. [in] BSTR strNamespacePath,
  242. // CIM query to be evaluated
  243. [in] BSTR strQuery,
  244. // The language name of the query to be evaluated
  245. [in, defaultvalue("WQL")] BSTR strQueryLanguage,
  246. // The IWbemContext object
  247. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  248. // On successful return contains a collection of documents
  249. [out,retval] ISWbemXMLDocumentSet **ppXMLDocumentSet
  250. );
  251. [
  252. helpstring("Enumerates sub classes of a specified class"),
  253. id(13)
  254. ]
  255. HRESULT EnumClasses(
  256. // Identifies the class path of the super class
  257. [in] BSTR strSuperClassPath,
  258. // Whether to do a deep enumeration
  259. [in] VARIANT_BOOL bDeep,
  260. // The IWbemContext object
  261. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  262. // On successful return contains a collection of documents
  263. [out,retval] ISWbemXMLDocumentSet **ppXMLDocumentSet
  264. );
  265. [
  266. helpstring("Enumerates instances of a specific class"),
  267. id(14)
  268. ]
  269. HRESULT EnumInstances(
  270. // Identifies the class path of the class whose instances are to be enumerated
  271. [in] BSTR strClassPath,
  272. // Whether to do a deep enumeration
  273. [in] VARIANT_BOOL bDeep,
  274. // The IWbemContext object
  275. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  276. // On successful return contains a collection of documents
  277. [out,retval] ISWbemXMLDocumentSet **ppXMLDocumentSet
  278. );
  279. [
  280. helpstring("Enumerates sub class names of a specific class"),
  281. id(15)
  282. ]
  283. HRESULT EnumClassNames(
  284. // Identifies the class path of the super class
  285. [in] BSTR strSuperClassPath,
  286. // Whether to do a deep enumeration
  287. [in] VARIANT_BOOL bDeep,
  288. // The IWbemContext object
  289. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  290. // On successful return contains a collection of documents
  291. [out,retval] ISWbemXMLDocumentSet **ppXMLDocumentSet
  292. );
  293. [
  294. helpstring("Enumerate instance names of a specific class"),
  295. id(16)
  296. ]
  297. HRESULT EnumInstanceNames(
  298. // Identifies the class path of the class whose instances are to be enumerated
  299. [in] BSTR strClassPath,
  300. // The IWbemContext object
  301. [in, defaultvalue(0)] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  302. // On successful return contains a collection of documents
  303. [out,retval] ISWbemXMLDocumentSet **ppXMLDocumentSet
  304. );
  305. [
  306. helpstring("Compile a specified file"),
  307. id(17)
  308. ]
  309. HRESULT Compile (
  310. // If this is a VT_BSTR, then it the string is used as the input XML data
  311. // If this is a VT_UNKNOWN, then it is queried for Istream and the result is used
  312. // as the input stream
  313. [in] VARIANT *pvInputSource,
  314. // Identifies a namespace to connect to
  315. [in] BSTR strNamespacePath,
  316. // Class Flags - A combination of the flags used for PutClass WMI call
  317. [in] LONG lClassFlags,
  318. // Instance Flags - A combination of the flags used for PutInstance WMI call
  319. [in] LONG lInstanceFlags,
  320. // What operation to do
  321. [in] WmiXMLCompilationTypeEnum iOperation,
  322. // The IWbemContext object
  323. [in] /*ISWbemNamedValueSet*/IDispatch *pCtx,
  324. // Whether the compilation was successful
  325. [out, retval] VARIANT_BOOL *pStatus
  326. );
  327. [
  328. id(18),
  329. propget,
  330. helpstring ("The collection of privileges for this object")
  331. ]
  332. HRESULT Privileges ([out, retval] ISWbemPrivilegeSet **objWbemPrivilegeSet);
  333. [
  334. id(19),
  335. propget,
  336. helpstring ("The last compilation error, if any")
  337. ]
  338. HRESULT CompilationErrors ([out, retval] BSTR *pstrErrors);
  339. };