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.

1416 lines
42 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. WBEMCLI.IDL
  5. Abstract:
  6. Interfaces for WBEM clients. These interfaces are implemented by CIMOM and
  7. used by clients. Additional interfaces needed by WBEM providers can be
  8. found in WBEMPROV.IDL
  9. --*/
  10. [uuid(7ec196fe-7005-11d1-ad90-00c04fd8fdff)]
  11. library WbemClient_v1
  12. {
  13. importlib("stdole32.tlb");
  14. interface IWbemClassObject;
  15. interface IWbemObjectAccess;
  16. interface IWbemQualifierSet;
  17. interface IWbemServices;
  18. interface IWbemLocator;
  19. interface IWbemConnection;
  20. interface IWbemObjectSink;
  21. interface IEnumWbemClassObject;
  22. interface IWbemCallResult;
  23. interface IWbemContext;
  24. interface IUnsecuredApartment;
  25. interface IWbemStatusCodeText;
  26. interface IWbemBackupRestore;
  27. interface IWbemBackupRestoreEx;
  28. interface IWbemRefresher;
  29. interface IWbemHiPerfEnum;
  30. interface IWbemConfigureRefresher;
  31. interface IWbemSecureObjectSink;
  32. interface IWbemEventSink;
  33. /////////////////////////////////////////////////////////////////
  34. //
  35. typedef [v1_enum] enum tag_WBEM_GENUS_TYPE
  36. {
  37. WBEM_GENUS_CLASS = 1,
  38. WBEM_GENUS_INSTANCE = 2
  39. } WBEM_GENUS_TYPE;
  40. typedef [v1_enum] enum tag_WBEM_CHANGE_FLAG_TYPE
  41. {
  42. WBEM_FLAG_CREATE_OR_UPDATE = 0,
  43. WBEM_FLAG_UPDATE_ONLY = 0x1,
  44. WBEM_FLAG_CREATE_ONLY = 0x2,
  45. WBEM_FLAG_UPDATE_COMPATIBLE = 0x0,
  46. WBEM_FLAG_UPDATE_SAFE_MODE = 0x20,
  47. WBEM_FLAG_UPDATE_FORCE_MODE = 0x40,
  48. WBEM_MASK_UPDATE_MODE = 0x60,
  49. WBEM_FLAG_ADVISORY = 0x000010000
  50. } WBEM_CHANGE_FLAG_TYPE;
  51. typedef [v1_enum] enum tag_WBEM_GENERIC_FLAG_TYPE
  52. {
  53. WBEM_FLAG_RETURN_IMMEDIATELY = 0x10,
  54. WBEM_FLAG_RETURN_WBEM_COMPLETE = 0,
  55. WBEM_FLAG_BIDIRECTIONAL = 0,
  56. WBEM_FLAG_FORWARD_ONLY = 0x20,
  57. WBEM_FLAG_NO_ERROR_OBJECT = 0x40,
  58. WBEM_FLAG_RETURN_ERROR_OBJECT = 0,
  59. WBEM_FLAG_SEND_STATUS = 0x80,
  60. WBEM_FLAG_DONT_SEND_STATUS = 0,
  61. WBEM_FLAG_ENSURE_LOCATABLE = 0x100,
  62. WBEM_FLAG_DIRECT_READ = 0x200,
  63. WBEM_FLAG_SEND_ONLY_SELECTED = 0,
  64. // backward-compatibility
  65. WBEM_RETURN_WHEN_COMPLETE = 0,
  66. WBEM_RETURN_IMMEDIATELY = 0x10,
  67. // these bits are reserved!!
  68. WBEM_MASK_RESERVED_FLAGS = 0x1F000,
  69. WBEM_FLAG_USE_AMENDED_QUALIFIERS = 0x20000,
  70. // If used, the context object must have one or more of the following
  71. // BOOL "INCLUDE_OWNER"
  72. // BOOL "INCLUDE_DACL"
  73. // BOOL "INCLUDE_SACL"
  74. // BOOL "INCLUDE_GROUP"
  75. WBEM_FLAG_STRONG_VALIDATION = 0x100000,
  76. } WBEM_GENERIC_FLAG_TYPE;
  77. typedef enum tag_WBEM_STATUS_TYPE
  78. {
  79. WBEM_STATUS_COMPLETE = 0,
  80. WBEM_STATUS_REQUIREMENTS = 1,
  81. WBEM_STATUS_PROGRESS = 2,
  82. } WBEM_STATUS_TYPE;
  83. typedef [v1_enum] enum tag_WBEM_TIMEOUT_TYPE
  84. {
  85. WBEM_NO_WAIT = 0,
  86. WBEM_INFINITE = 0xFFFFFFFF,
  87. } WBEM_TIMEOUT_TYPE;
  88. typedef [v1_enum] enum tag_WBEM_CONDITION_FLAG_TYPE
  89. {
  90. WBEM_FLAG_ALWAYS = 0,
  91. WBEM_FLAG_ONLY_IF_TRUE = 0x1,
  92. WBEM_FLAG_ONLY_IF_FALSE = 0x2,
  93. WBEM_FLAG_ONLY_IF_IDENTICAL = 0x3,
  94. WBEM_MASK_PRIMARY_CONDITION = 0x3,
  95. WBEM_FLAG_KEYS_ONLY = 0x4,
  96. WBEM_FLAG_REFS_ONLY = 0x8,
  97. WBEM_FLAG_LOCAL_ONLY = 0x10,
  98. WBEM_FLAG_PROPAGATED_ONLY = 0x20,
  99. WBEM_FLAG_SYSTEM_ONLY = 0x30,
  100. WBEM_FLAG_NONSYSTEM_ONLY = 0x40,
  101. WBEM_MASK_CONDITION_ORIGIN = 0x70,
  102. WBEM_FLAG_CLASS_OVERRIDES_ONLY = 0x100,
  103. WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES = 0x200,
  104. WBEM_MASK_CLASS_CONDITION = 0x300
  105. } WBEM_CONDITION_FLAG_TYPE;
  106. typedef [v1_enum] enum tag_WBEM_FLAVOR_TYPE
  107. {
  108. WBEM_FLAVOR_DONT_PROPAGATE = 0,
  109. WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = 0x1,
  110. WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = 0x2,
  111. WBEM_FLAVOR_MASK_PROPAGATION = 0x0F,
  112. WBEM_FLAVOR_OVERRIDABLE = 0,
  113. WBEM_FLAVOR_NOT_OVERRIDABLE = 0x10,
  114. WBEM_FLAVOR_MASK_PERMISSIONS = 0x10,
  115. WBEM_FLAVOR_ORIGIN_LOCAL = 0,
  116. WBEM_FLAVOR_ORIGIN_PROPAGATED = 0x20,
  117. WBEM_FLAVOR_ORIGIN_SYSTEM = 0x40,
  118. WBEM_FLAVOR_MASK_ORIGIN = 0x60,
  119. WBEM_FLAVOR_NOT_AMENDED = 0,
  120. WBEM_FLAVOR_AMENDED = 0x80,
  121. WBEM_FLAVOR_MASK_AMENDED = 0x80
  122. } WBEM_FLAVOR_TYPE;
  123. typedef [v1_enum] enum tag_WBEM_QUERY_FLAG_TYPE
  124. {
  125. WBEM_FLAG_DEEP = 0,
  126. WBEM_FLAG_SHALLOW = 1,
  127. WBEM_FLAG_PROTOTYPE = 2
  128. } WBEM_QUERY_FLAG_TYPE;
  129. typedef [v1_enum] enum tag_WBEM_SECURITY_FLAGS
  130. {
  131. WBEM_ENABLE = 1,
  132. WBEM_METHOD_EXECUTE = 2,
  133. WBEM_FULL_WRITE_REP = 4,
  134. WBEM_PARTIAL_WRITE_REP = 8,
  135. WBEM_WRITE_PROVIDER = 0x10,
  136. WBEM_REMOTE_ACCESS = 0X20,
  137. WBEM_RIGHT_SUBSCRIBE = 0x40,
  138. WBEM_RIGHT_PUBLISH = 0x80
  139. } WBEM_SECURITY_FLAGS;
  140. typedef [v1_enum] enum tag_WBEM_LIMITATION_FLAG_TYPE
  141. {
  142. WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS = 0x10,
  143. WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS = 0x20
  144. } WBEM_LIMITATION_FLAG_TYPE;
  145. typedef [v1_enum] enum tag_WBEM_TEXT_FLAG_TYPE
  146. {
  147. WBEM_FLAG_NO_FLAVORS = 0x1
  148. } WBEM_TEXT_FLAG_TYPE;
  149. typedef [v1_enum] enum tag_WBEM_COMPARISON_FLAG
  150. {
  151. WBEM_COMPARISON_INCLUDE_ALL = 0,
  152. WBEM_FLAG_IGNORE_QUALIFIERS = 0x1,
  153. WBEM_FLAG_IGNORE_OBJECT_SOURCE = 0x2,
  154. WBEM_FLAG_IGNORE_DEFAULT_VALUES = 0x4,
  155. WBEM_FLAG_IGNORE_CLASS = 0x8,
  156. WBEM_FLAG_IGNORE_CASE = 0x10,
  157. WBEM_FLAG_IGNORE_FLAVOR = 0x20
  158. } WBEM_COMPARISON_FLAG;
  159. typedef [v1_enum] enum tag_WBEM_LOCKING
  160. {
  161. WBEM_FLAG_ALLOW_READ = 0x1,
  162. } WBEM_LOCKING_FLAG_TYPE;
  163. typedef [v1_enum] enum tag_CIMTYPE_ENUMERATION
  164. {
  165. CIM_ILLEGAL = 0xfff,
  166. CIM_EMPTY = 0,
  167. CIM_SINT8 = 16,
  168. CIM_UINT8 = 17,
  169. CIM_SINT16 = 2,
  170. CIM_UINT16 = 18,
  171. CIM_SINT32 = 3,
  172. CIM_UINT32 = 19,
  173. CIM_SINT64 = 20,
  174. CIM_UINT64 = 21,
  175. CIM_REAL32 = 4,
  176. CIM_REAL64 = 5,
  177. CIM_BOOLEAN = 11,
  178. CIM_STRING = 8,
  179. CIM_DATETIME = 101,
  180. CIM_REFERENCE = 102,
  181. CIM_CHAR16 = 103,
  182. CIM_OBJECT = 13,
  183. CIM_FLAG_ARRAY = 0x2000
  184. } CIMTYPE_ENUMERATION;
  185. typedef [v1_enum] enum tag_WBEM_BACKUP_RESTORE_FLAGS
  186. {
  187. WBEM_FLAG_BACKUP_RESTORE_DEFAULT = 0,
  188. WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN = 1
  189. } WBEM_BACKUP_RESTORE_FLAGS;
  190. typedef [v1_enum] enum tag_WBEM_REFRESHER_FLAGS
  191. {
  192. WBEM_FLAG_REFRESH_AUTO_RECONNECT = 0,
  193. WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT = 1
  194. } WBEM_REFRESHER_FLAGS;
  195. typedef enum tag_WBEM_SHUTDOWN_FLAGS
  196. {
  197. WBEM_SHUTDOWN_UNLOAD_COMPONENT = 1, // Component receiving this is being notified it is no longer required
  198. WBEM_SHUTDOWN_WMI = 2, // WMI itself is shutting down
  199. WBEM_SHUTDOWN_OS = 3 // OS is being shut down
  200. } WBEM_SHUTDOWN_FLAGS;
  201. typedef long CIMTYPE;
  202. typedef [v1_enum] enum tag_WBEMSTATUS_FORMAT
  203. {
  204. WBEMSTATUS_FORMAT_NEWLINE= 0, // Newline appended to textual representation of status code
  205. WBEMSTATUS_FORMAT_NO_NEWLINE= 1 // No Newline appended to textual representation of status code
  206. } WBEMSTATUS_FORMAT;
  207. /////////////////////////////////////////////////////////////////
  208. //
  209. typedef [v1_enum] enum tag_WBEMSTATUS
  210. {
  211. WBEM_NO_ERROR = 0,
  212. WBEM_S_NO_ERROR = 0,
  213. WBEM_S_SAME = 0,
  214. // Non-error status codes.
  215. // =======================
  216. WBEM_S_FALSE = 1,
  217. WBEM_S_ALREADY_EXISTS = 0x40001,
  218. WBEM_S_RESET_TO_DEFAULT = 0x40002,
  219. WBEM_S_DIFFERENT = 0x40003,
  220. WBEM_S_TIMEDOUT = 0x40004,
  221. WBEM_S_NO_MORE_DATA = 0x40005,
  222. WBEM_S_OPERATION_CANCELLED = 0x40006,
  223. WBEM_S_PENDING = 0x40007,
  224. WBEM_S_DUPLICATE_OBJECTS = 0x40008,
  225. WBEM_S_ACCESS_DENIED = 0x40009,
  226. WBEM_S_PARTIAL_RESULTS = 0x40010,
  227. // Hook status enum values have been moved to wbemint.idl (RAID 278480).
  228. // They remain here for reference.
  229. // WBEM_S_NO_POSTHOOK = 0x40011,
  230. // WBEM_S_POSTHOOK_WITH_BOTH = 0x40012,
  231. // WBEM_S_POSTHOOK_WITH_NEW = 0x40013,
  232. // WBEM_S_POSTHOOK_WITH_STATUS = 0x40014,
  233. // WBEM_S_POSTHOOK_WITH_OLD = 0x40015,
  234. // WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT = 0x40016,
  235. WBEM_S_SOURCE_NOT_AVAILABLE = 0x40017,
  236. // Errors.
  237. // =======
  238. WBEM_E_FAILED = 0x80041001,
  239. WBEM_E_NOT_FOUND = 0x80041002,
  240. WBEM_E_ACCESS_DENIED = 0x80041003,
  241. WBEM_E_PROVIDER_FAILURE = 0x80041004,
  242. WBEM_E_TYPE_MISMATCH = 0x80041005,
  243. WBEM_E_OUT_OF_MEMORY = 0x80041006,
  244. WBEM_E_INVALID_CONTEXT = 0x80041007,
  245. WBEM_E_INVALID_PARAMETER = 0x80041008,
  246. WBEM_E_NOT_AVAILABLE = 0x80041009,
  247. WBEM_E_CRITICAL_ERROR = 0x8004100A,
  248. WBEM_E_INVALID_STREAM = 0x8004100B,
  249. WBEM_E_NOT_SUPPORTED = 0x8004100C,
  250. WBEM_E_INVALID_SUPERCLASS = 0x8004100D,
  251. WBEM_E_INVALID_NAMESPACE = 0x8004100E,
  252. WBEM_E_INVALID_OBJECT = 0x8004100F,
  253. WBEM_E_INVALID_CLASS = 0x80041010,
  254. WBEM_E_PROVIDER_NOT_FOUND = 0x80041011,
  255. WBEM_E_INVALID_PROVIDER_REGISTRATION = 0x80041012,
  256. WBEM_E_PROVIDER_LOAD_FAILURE = 0x80041013,
  257. WBEM_E_INITIALIZATION_FAILURE = 0x80041014,
  258. WBEM_E_TRANSPORT_FAILURE = 0x80041015,
  259. WBEM_E_INVALID_OPERATION = 0x80041016,
  260. WBEM_E_INVALID_QUERY = 0x80041017,
  261. WBEM_E_INVALID_QUERY_TYPE = 0x80041018,
  262. WBEM_E_ALREADY_EXISTS = 0x80041019,
  263. WBEM_E_OVERRIDE_NOT_ALLOWED = 0x8004101A,
  264. WBEM_E_PROPAGATED_QUALIFIER = 0x8004101B,
  265. WBEM_E_PROPAGATED_PROPERTY = 0x8004101C,
  266. WBEM_E_UNEXPECTED = 0x8004101D,
  267. WBEM_E_ILLEGAL_OPERATION = 0x8004101E,
  268. WBEM_E_CANNOT_BE_KEY = 0x8004101F,
  269. WBEM_E_INCOMPLETE_CLASS = 0x80041020,
  270. WBEM_E_INVALID_SYNTAX = 0x80041021,
  271. WBEM_E_NONDECORATED_OBJECT = 0x80041022,
  272. WBEM_E_READ_ONLY = 0x80041023,
  273. WBEM_E_PROVIDER_NOT_CAPABLE = 0x80041024,
  274. WBEM_E_CLASS_HAS_CHILDREN = 0x80041025,
  275. WBEM_E_CLASS_HAS_INSTANCES = 0x80041026,
  276. WBEM_E_QUERY_NOT_IMPLEMENTED = 0x80041027,
  277. WBEM_E_ILLEGAL_NULL = 0x80041028,
  278. WBEM_E_INVALID_QUALIFIER_TYPE = 0x80041029,
  279. WBEM_E_INVALID_PROPERTY_TYPE = 0x8004102A,
  280. WBEM_E_VALUE_OUT_OF_RANGE = 0x8004102B,
  281. WBEM_E_CANNOT_BE_SINGLETON = 0x8004102C,
  282. WBEM_E_INVALID_CIM_TYPE = 0x8004102D,
  283. WBEM_E_INVALID_METHOD = 0x8004102E,
  284. WBEM_E_INVALID_METHOD_PARAMETERS = 0x8004102F,
  285. WBEM_E_SYSTEM_PROPERTY = 0x80041030,
  286. WBEM_E_INVALID_PROPERTY = 0x80041031,
  287. WBEM_E_CALL_CANCELLED = 0x80041032,
  288. WBEM_E_SHUTTING_DOWN = 0x80041033,
  289. WBEM_E_PROPAGATED_METHOD = 0x80041034,
  290. WBEM_E_UNSUPPORTED_PARAMETER = 0x80041035,
  291. WBEM_E_MISSING_PARAMETER_ID = 0x80041036,
  292. WBEM_E_INVALID_PARAMETER_ID = 0x80041037,
  293. WBEM_E_NONCONSECUTIVE_PARAMETER_IDS = 0x80041038,
  294. WBEM_E_PARAMETER_ID_ON_RETVAL = 0x80041039,
  295. WBEM_E_INVALID_OBJECT_PATH = 0x8004103A,
  296. WBEM_E_OUT_OF_DISK_SPACE = 0x8004103B,
  297. WBEM_E_BUFFER_TOO_SMALL = 0x8004103C,
  298. WBEM_E_UNSUPPORTED_PUT_EXTENSION = 0x8004103D,
  299. WBEM_E_UNKNOWN_OBJECT_TYPE = 0x8004103E,
  300. WBEM_E_UNKNOWN_PACKET_TYPE = 0x8004103F,
  301. WBEM_E_MARSHAL_VERSION_MISMATCH = 0x80041040,
  302. WBEM_E_MARSHAL_INVALID_SIGNATURE = 0x80041041,
  303. WBEM_E_INVALID_QUALIFIER = 0x80041042,
  304. WBEM_E_INVALID_DUPLICATE_PARAMETER = 0x80041043,
  305. WBEM_E_TOO_MUCH_DATA = 0x80041044,
  306. WBEM_E_SERVER_TOO_BUSY = 0x80041045,
  307. WBEM_E_INVALID_FLAVOR = 0x80041046,
  308. WBEM_E_CIRCULAR_REFERENCE = 0x80041047,
  309. WBEM_E_UNSUPPORTED_CLASS_UPDATE = 0x80041048,
  310. WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE = 0x80041049,
  311. WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE = 0x80041050,
  312. WBEM_E_TOO_MANY_PROPERTIES = 0x80041051,
  313. WBEM_E_UPDATE_TYPE_MISMATCH = 0x80041052,
  314. WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED = 0x80041053,
  315. WBEM_E_UPDATE_PROPAGATED_METHOD = 0x80041054,
  316. WBEM_E_METHOD_NOT_IMPLEMENTED = 0x80041055,
  317. WBEM_E_METHOD_DISABLED = 0x80041056,
  318. WBEM_E_REFRESHER_BUSY = 0x80041057,
  319. WBEM_E_UNPARSABLE_QUERY = 0x80041058,
  320. WBEM_E_NOT_EVENT_CLASS = 0x80041059,
  321. WBEM_E_MISSING_GROUP_WITHIN = 0x8004105A,
  322. WBEM_E_MISSING_AGGREGATION_LIST = 0x8004105B,
  323. WBEM_E_PROPERTY_NOT_AN_OBJECT = 0x8004105C,
  324. WBEM_E_AGGREGATING_BY_OBJECT = 0x8004105D,
  325. WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY = 0x8004105F,
  326. WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING = 0x80041060,
  327. WBEM_E_QUEUE_OVERFLOW = 0x80041061,
  328. WBEM_E_PRIVILEGE_NOT_HELD = 0x80041062,
  329. WBEM_E_INVALID_OPERATOR = 0x80041063,
  330. WBEM_E_LOCAL_CREDENTIALS = 0x80041064,
  331. WBEM_E_CANNOT_BE_ABSTRACT = 0x80041065,
  332. WBEM_E_AMENDED_OBJECT = 0x80041066,
  333. WBEM_E_CLIENT_TOO_SLOW = 0x80041067,
  334. WBEM_E_NULL_SECURITY_DESCRIPTOR = 0x80041068,
  335. WBEM_E_TIMED_OUT = 0x80041069,
  336. WBEM_E_INVALID_ASSOCIATION = 0x8004106A,
  337. WBEM_E_AMBIGUOUS_OPERATION = 0x8004106B,
  338. WBEM_E_QUOTA_VIOLATION = 0x8004106C,
  339. WBEM_E_RESERVED_001 = 0x8004106D,
  340. WBEM_E_RESERVED_002 = 0x8004106E,
  341. WBEM_E_UNSUPPORTED_LOCALE = 0x8004106F,
  342. WBEM_E_HANDLE_OUT_OF_DATE = 0x80041070,
  343. WBEM_E_CONNECTION_FAILED = 0x80041071,
  344. WBEM_E_INVALID_HANDLE_REQUEST = 0x80041072,
  345. WBEM_E_PROPERTY_NAME_TOO_WIDE = 0x80041073,
  346. WBEM_E_CLASS_NAME_TOO_WIDE = 0x80041074,
  347. WBEM_E_METHOD_NAME_TOO_WIDE = 0x80041075,
  348. WBEM_E_QUALIFIER_NAME_TOO_WIDE = 0x80041076,
  349. WBEM_E_RERUN_COMMAND = 0x80041077,
  350. WBEM_E_DATABASE_VER_MISMATCH = 0x80041078,
  351. WBEM_E_VETO_DELETE = 0x80041079,
  352. WBEM_E_VETO_PUT = 0x8004107A,
  353. WBEM_E_INVALID_LOCALE = 0x80041080,
  354. WBEM_E_PROVIDER_SUSPENDED = 0x80041081,
  355. WBEM_E_SYNCHRONIZATION_REQUIRED = 0x80041082,
  356. WBEM_E_NO_SCHEMA = 0x80041083,
  357. WBEM_E_PROVIDER_ALREADY_REGISTERED = 0x80041084,
  358. WBEM_E_PROVIDER_NOT_REGISTERED = 0x80041085,
  359. WBEM_E_FATAL_TRANSPORT_ERROR = 0x80041086,
  360. WBEM_E_ENCRYPTED_CONNECTION_REQUIRED = 0x80041087,
  361. WBEM_E_PROVIDER_TIMED_OUT = 0x80041088,
  362. WBEM_E_NO_KEY = 0x80041089,
  363. WBEM_E_PROVIDER_DISABLED = 0x8004108a,
  364. WBEMESS_E_REGISTRATION_TOO_BROAD = 0x80042001,
  365. WBEMESS_E_REGISTRATION_TOO_PRECISE = 0x80042002,
  366. WBEMMOF_E_EXPECTED_QUALIFIER_NAME = 0x80044001,
  367. WBEMMOF_E_EXPECTED_SEMI = 0x80044002,
  368. WBEMMOF_E_EXPECTED_OPEN_BRACE = 0x80044003,
  369. WBEMMOF_E_EXPECTED_CLOSE_BRACE = 0x80044004,
  370. WBEMMOF_E_EXPECTED_CLOSE_BRACKET = 0x80044005,
  371. WBEMMOF_E_EXPECTED_CLOSE_PAREN = 0x80044006,
  372. WBEMMOF_E_ILLEGAL_CONSTANT_VALUE = 0x80044007,
  373. WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER = 0x80044008,
  374. WBEMMOF_E_EXPECTED_OPEN_PAREN = 0x80044009,
  375. WBEMMOF_E_UNRECOGNIZED_TOKEN = 0x8004400A,
  376. WBEMMOF_E_UNRECOGNIZED_TYPE = 0x8004400B,
  377. WBEMMOF_E_EXPECTED_PROPERTY_NAME = 0x8004400C,
  378. WBEMMOF_E_TYPEDEF_NOT_SUPPORTED = 0x8004400D,
  379. WBEMMOF_E_UNEXPECTED_ALIAS = 0x8004400E,
  380. WBEMMOF_E_UNEXPECTED_ARRAY_INIT = 0x8004400F,
  381. WBEMMOF_E_INVALID_AMENDMENT_SYNTAX = 0x80044010,
  382. WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT = 0x80044011,
  383. WBEMMOF_E_INVALID_PRAGMA = 0x80044012,
  384. WBEMMOF_E_INVALID_NAMESPACE_SYNTAX = 0x80044013,
  385. WBEMMOF_E_EXPECTED_CLASS_NAME = 0x80044014,
  386. WBEMMOF_E_TYPE_MISMATCH = 0x80044015,
  387. WBEMMOF_E_EXPECTED_ALIAS_NAME = 0x80044016,
  388. WBEMMOF_E_INVALID_CLASS_DECLARATION = 0x80044017,
  389. WBEMMOF_E_INVALID_INSTANCE_DECLARATION = 0x80044018,
  390. WBEMMOF_E_EXPECTED_DOLLAR = 0x80044019,
  391. WBEMMOF_E_CIMTYPE_QUALIFIER = 0x8004401A,
  392. WBEMMOF_E_DUPLICATE_PROPERTY = 0x8004401B,
  393. WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION = 0x8004401C,
  394. WBEMMOF_E_OUT_OF_RANGE = 0x8004401D,
  395. WBEMMOF_E_INVALID_FILE = 0x8004401E,
  396. WBEMMOF_E_ALIASES_IN_EMBEDDED = 0x8004401F,
  397. WBEMMOF_E_NULL_ARRAY_ELEM = 0x80044020,
  398. WBEMMOF_E_DUPLICATE_QUALIFIER = 0x80044021,
  399. WBEMMOF_E_EXPECTED_FLAVOR_TYPE = 0x80044022,
  400. WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES = 0x80044023,
  401. WBEMMOF_E_MULTIPLE_ALIASES = 0x80044024,
  402. WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2 = 0x80044025,
  403. WBEMMOF_E_NO_ARRAYS_RETURNED = 0x80044026,
  404. WBEMMOF_E_MUST_BE_IN_OR_OUT = 0x80044027,
  405. WBEMMOF_E_INVALID_FLAGS_SYNTAX = 0x80044028,
  406. WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE = 0x80044029,
  407. WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE = 0x8004402A,
  408. WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE = 0x8004402B,
  409. WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX = 0x8004402C,
  410. WBEMMOF_E_INVALID_QUALIFIER_SYNTAX = 0x8004402D,
  411. WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE = 0x8004402E,
  412. WBEMMOF_E_ERROR_CREATING_TEMP_FILE = 0x8004402F,
  413. WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE = 0x80044030,
  414. WBEMMOF_E_INVALID_DELETECLASS_SYNTAX = 0x80044031
  415. } WBEMSTATUS;
  416. [restricted, uuid(4590f811-1d3a-11d0-891f-00aa004b2e24)]
  417. coclass WbemLocator
  418. {
  419. interface IWbemLocator;
  420. };
  421. [restricted, uuid(674B6698-EE92-11d0-AD71-00C04FD8FDFF)]
  422. coclass WbemContext
  423. {
  424. interface IWbemContext;
  425. };
  426. [uuid(49bd2028-1523-11d1-ad79-00c04fd8fdff)]
  427. coclass UnsecuredApartment
  428. {
  429. interface IUnsecuredApartment;
  430. };
  431. [uuid(9A653086-174F-11d2-B5F9-00104B703EFD)]
  432. coclass WbemClassObject
  433. {
  434. interface IWbemClassObject;
  435. };
  436. [uuid(6daf9757-2e37-11d2-aec9-00c04fb68820)]
  437. coclass MofCompiler
  438. {
  439. interface IMofCompiler;
  440. };
  441. [uuid(eb87e1bd-3233-11d2-aec9-00c04fb68820)]
  442. coclass WbemStatusCodeText
  443. {
  444. interface IWbemStatusCodeText;
  445. };
  446. [uuid(C49E32C6-BC8B-11d2-85D4-00105A1F8304)]
  447. coclass WbemBackupRestore
  448. {
  449. interface IWbemBackupRestoreEx;
  450. };
  451. [restricted, uuid(c71566f2-561e-11d1-ad87-00c04fd8fdff)]
  452. coclass WbemRefresher
  453. {
  454. interface IMarshal;
  455. interface IWbemRefresher;
  456. interface IWbemConfigureRefresher;
  457. };
  458. [restricted, uuid(8D1C559D-84F0-4bb3-A7D5-56A7435A9BA6)]
  459. coclass WbemObjectTextSrc
  460. {
  461. interface IWbemObjectTextSrc;
  462. }
  463. };
  464. #define OPTIONAL in, unique
  465. interface IWbemQualifierSet;
  466. [local, restricted, object, uuid(dc12a681-737f-11cf-884d-00aa004b2e24)]
  467. interface IWbemClassObject : IUnknown
  468. {
  469. HRESULT GetQualifierSet(
  470. [out] IWbemQualifierSet** ppQualSet
  471. );
  472. HRESULT Get(
  473. [in, string] LPCWSTR wszName,
  474. [in] long lFlags,
  475. [out, OPTIONAL] VARIANT* pVal,
  476. [out, OPTIONAL] CIMTYPE* pType,
  477. [out, OPTIONAL] long* plFlavor
  478. );
  479. HRESULT Put(
  480. [in, string] LPCWSTR wszName,
  481. [in] long lFlags,
  482. [in] VARIANT* pVal,
  483. [in] CIMTYPE Type
  484. );
  485. HRESULT Delete(
  486. [in, string] LPCWSTR wszName
  487. );
  488. HRESULT GetNames(
  489. [in, string] LPCWSTR wszQualifierName,
  490. [in] long lFlags,
  491. [in] VARIANT* pQualifierVal,
  492. [out] SAFEARRAY (BSTR)* pNames
  493. );
  494. HRESULT BeginEnumeration([in] long lEnumFlags);
  495. HRESULT Next(
  496. [in] long lFlags,
  497. [out, OPTIONAL] BSTR* strName,
  498. [out, OPTIONAL] VARIANT* pVal,
  499. [out, OPTIONAL] CIMTYPE* pType,
  500. [out, OPTIONAL] long* plFlavor
  501. );
  502. HRESULT EndEnumeration();
  503. HRESULT GetPropertyQualifierSet(
  504. [in, string] LPCWSTR wszProperty,
  505. [out] IWbemQualifierSet** ppQualSet
  506. );
  507. HRESULT Clone(
  508. [out] IWbemClassObject** ppCopy
  509. );
  510. HRESULT GetObjectText(
  511. [in] long lFlags,
  512. [out] BSTR* pstrObjectText
  513. );
  514. HRESULT SpawnDerivedClass(
  515. [in] long lFlags,
  516. [out] IWbemClassObject** ppNewClass
  517. );
  518. HRESULT SpawnInstance(
  519. [in] long lFlags,
  520. [out] IWbemClassObject** ppNewInstance
  521. );
  522. HRESULT CompareTo(
  523. [in] long lFlags,
  524. [in] IWbemClassObject* pCompareTo
  525. );
  526. HRESULT GetPropertyOrigin(
  527. [in, string] LPCWSTR wszName,
  528. [out] BSTR* pstrClassName);
  529. HRESULT InheritsFrom(
  530. [in] LPCWSTR strAncestor
  531. );
  532. // Method manipulation.
  533. // ====================
  534. HRESULT GetMethod(
  535. [in, string] LPCWSTR wszName,
  536. [in] long lFlags,
  537. [out] IWbemClassObject** ppInSignature,
  538. [out] IWbemClassObject** ppOutSignature
  539. );
  540. HRESULT PutMethod(
  541. [in, string] LPCWSTR wszName,
  542. [in] long lFlags,
  543. [in] IWbemClassObject* pInSignature,
  544. [in] IWbemClassObject* pOutSignature
  545. );
  546. HRESULT DeleteMethod(
  547. [in, string] LPCWSTR wszName
  548. );
  549. HRESULT BeginMethodEnumeration([in] long lEnumFlags);
  550. HRESULT NextMethod(
  551. [in] long lFlags,
  552. [out, OPTIONAL] BSTR* pstrName,
  553. [out, OPTIONAL] IWbemClassObject** ppInSignature,
  554. [out, OPTIONAL] IWbemClassObject** ppOutSignature
  555. );
  556. HRESULT EndMethodEnumeration();
  557. HRESULT GetMethodQualifierSet(
  558. [in, string] LPCWSTR wszMethod,
  559. [out] IWbemQualifierSet** ppQualSet
  560. );
  561. HRESULT GetMethodOrigin(
  562. [in, string] LPCWSTR wszMethodName,
  563. [out] BSTR* pstrClassName
  564. );
  565. };
  566. [object, restricted, local, uuid(dc12a680-737f-11cf-884d-00aa004b2e24)]
  567. interface IWbemQualifierSet : IUnknown
  568. {
  569. HRESULT Get(
  570. [in, string] LPCWSTR wszName,
  571. [in] long lFlags,
  572. [out, OPTIONAL] VARIANT* pVal,
  573. [out, OPTIONAL] long* plFlavor
  574. );
  575. HRESULT Put(
  576. [in, string] LPCWSTR wszName,
  577. [in] VARIANT* pVal,
  578. [in] long lFlavor
  579. );
  580. HRESULT Delete(
  581. [in, string] LPCWSTR wszName
  582. );
  583. HRESULT GetNames(
  584. [in] long lFlags,
  585. [out] SAFEARRAY (BSTR)* pNames
  586. );
  587. HRESULT BeginEnumeration(
  588. [in] long lFlags
  589. );
  590. HRESULT Next(
  591. [in] long lFlags,
  592. [out, OPTIONAL] BSTR* pstrName,
  593. [out, OPTIONAL] VARIANT* pVal,
  594. [out, OPTIONAL] long* plFlavor
  595. );
  596. HRESULT EndEnumeration();
  597. };
  598. interface IWbemServices;
  599. [object, restricted, local, uuid(dc12a687-737f-11cf-884d-00aa004b2e24),
  600. pointer_default(unique)]
  601. interface IWbemLocator : IUnknown
  602. {
  603. HRESULT ConnectServer(
  604. [in] const BSTR strNetworkResource,
  605. [in] const BSTR strUser,
  606. [in] const BSTR strPassword,
  607. [in] const BSTR strLocale,
  608. [in] long lSecurityFlags,
  609. [in] const BSTR strAuthority,
  610. [in] IWbemContext* pCtx,
  611. [out] IWbemServices** ppNamespace
  612. );
  613. };
  614. /////////////////////////////////////////////////////////////////
  615. [object, restricted, uuid(7c857801-7381-11cf-884d-00aa004b2e24)]
  616. interface IWbemObjectSink : IUnknown
  617. {
  618. HRESULT Indicate(
  619. [in] long lObjectCount,
  620. [in, size_is(lObjectCount)]
  621. IWbemClassObject** apObjArray
  622. );
  623. HRESULT SetStatus(
  624. [in] long lFlags,
  625. [in] HRESULT hResult,
  626. [in] BSTR strParam,
  627. [in] IWbemClassObject* pObjParam
  628. );
  629. };
  630. [object, restricted, uuid(027947e1-d731-11ce-a357-000000000001)]
  631. interface IEnumWbemClassObject : IUnknown
  632. {
  633. HRESULT Reset();
  634. HRESULT Next(
  635. [in] long lTimeout,
  636. [in] ULONG uCount,
  637. [out, size_is(uCount), length_is(*puReturned)]
  638. IWbemClassObject** apObjects,
  639. [out] ULONG* puReturned
  640. );
  641. HRESULT NextAsync(
  642. [in] ULONG uCount,
  643. [in] IWbemObjectSink* pSink
  644. );
  645. HRESULT Clone(
  646. [out] IEnumWbemClassObject** ppEnum
  647. );
  648. HRESULT Skip(
  649. [in] long lTimeout,
  650. [in] ULONG nCount
  651. );
  652. };
  653. /////////////////////////////////////////////////////////////////////////
  654. [object, restricted, local, uuid(44aca674-e8fc-11d0-a07c-00c04fb68820)]
  655. interface IWbemContext : IUnknown
  656. {
  657. HRESULT Clone([out] IWbemContext** ppNewCopy);
  658. HRESULT GetNames(
  659. [in] long lFlags,
  660. [out] SAFEARRAY (BSTR)* pNames
  661. );
  662. HRESULT BeginEnumeration([in] long lFlags);
  663. HRESULT Next(
  664. [in] long lFlags,
  665. [out] BSTR* pstrName,
  666. [out] VARIANT* pValue
  667. );
  668. HRESULT EndEnumeration();
  669. HRESULT SetValue(
  670. [in, string] LPCWSTR wszName,
  671. [in] long lFlags,
  672. [in] VARIANT* pValue
  673. );
  674. HRESULT GetValue(
  675. [in, string] LPCWSTR wszName,
  676. [in] long lFlags,
  677. [out] VARIANT* pValue
  678. );
  679. HRESULT DeleteValue(
  680. [in, string] LPCWSTR wszName,
  681. [in] long lFlags
  682. );
  683. HRESULT DeleteAll();
  684. };
  685. [object, restricted, uuid(44aca675-e8fc-11d0-a07c-00c04fb68820)]
  686. interface IWbemCallResult : IUnknown
  687. {
  688. HRESULT GetResultObject(
  689. [in] long lTimeout,
  690. [out] IWbemClassObject** ppResultObject
  691. );
  692. HRESULT GetResultString(
  693. [in] long lTimeout,
  694. [out] BSTR* pstrResultString
  695. );
  696. HRESULT GetResultServices(
  697. [in] long lTimeout,
  698. [out] IWbemServices** ppServices
  699. );
  700. HRESULT GetCallStatus(
  701. [in] long lTimeout,
  702. [out] long* plStatus
  703. );
  704. };
  705. /////////////////////////////////////////////////////////////////////////
  706. [object, restricted, uuid(9556dc99-828c-11cf-a37e-00aa003240c7),
  707. pointer_default(unique)]
  708. interface IWbemServices : IUnknown
  709. {
  710. // Context.
  711. // ========
  712. HRESULT OpenNamespace(
  713. [in] const BSTR strNamespace,
  714. [in] long lFlags,
  715. [in] IWbemContext* pCtx,
  716. [out, OPTIONAL] IWbemServices** ppWorkingNamespace,
  717. [out, OPTIONAL] IWbemCallResult** ppResult
  718. );
  719. HRESULT CancelAsyncCall(
  720. [in] IWbemObjectSink* pSink
  721. );
  722. HRESULT QueryObjectSink(
  723. [in] long lFlags,
  724. [out] IWbemObjectSink** ppResponseHandler
  725. );
  726. // Classes and instances.
  727. // ======================
  728. HRESULT GetObject(
  729. [in] const BSTR strObjectPath,
  730. [in] long lFlags,
  731. [in] IWbemContext* pCtx,
  732. [out, OPTIONAL] IWbemClassObject** ppObject,
  733. [out, OPTIONAL] IWbemCallResult** ppCallResult
  734. );
  735. HRESULT GetObjectAsync(
  736. [in] const BSTR strObjectPath,
  737. [in] long lFlags,
  738. [in] IWbemContext* pCtx,
  739. [in] IWbemObjectSink* pResponseHandler
  740. );
  741. // Class manipulation.
  742. // ===================
  743. HRESULT PutClass(
  744. [in] IWbemClassObject* pObject,
  745. [in] long lFlags,
  746. [in] IWbemContext* pCtx,
  747. [out, OPTIONAL] IWbemCallResult** ppCallResult
  748. );
  749. HRESULT PutClassAsync(
  750. [in] IWbemClassObject* pObject,
  751. [in] long lFlags,
  752. [in] IWbemContext* pCtx,
  753. [in] IWbemObjectSink* pResponseHandler
  754. );
  755. HRESULT DeleteClass(
  756. [in] const BSTR strClass,
  757. [in] long lFlags,
  758. [in] IWbemContext* pCtx,
  759. [out, OPTIONAL] IWbemCallResult** ppCallResult
  760. );
  761. HRESULT DeleteClassAsync(
  762. [in] const BSTR strClass,
  763. [in] long lFlags,
  764. [in] IWbemContext* pCtx,
  765. [in] IWbemObjectSink* pResponseHandler
  766. );
  767. HRESULT CreateClassEnum(
  768. [in] const BSTR strSuperclass,
  769. [in] long lFlags,
  770. [in] IWbemContext* pCtx,
  771. [out] IEnumWbemClassObject** ppEnum
  772. );
  773. HRESULT CreateClassEnumAsync(
  774. [in] const BSTR strSuperclass,
  775. [in] long lFlags,
  776. [in] IWbemContext* pCtx,
  777. [in] IWbemObjectSink* pResponseHandler
  778. );
  779. // Instances.
  780. // ==========
  781. HRESULT PutInstance(
  782. [in] IWbemClassObject* pInst,
  783. [in] long lFlags,
  784. [in] IWbemContext* pCtx,
  785. [out, OPTIONAL] IWbemCallResult** ppCallResult
  786. );
  787. HRESULT PutInstanceAsync(
  788. [in] IWbemClassObject* pInst,
  789. [in] long lFlags,
  790. [in] IWbemContext* pCtx,
  791. [in] IWbemObjectSink* pResponseHandler
  792. );
  793. HRESULT DeleteInstance(
  794. [in] const BSTR strObjectPath,
  795. [in] long lFlags,
  796. [in] IWbemContext* pCtx,
  797. [out, OPTIONAL] IWbemCallResult** ppCallResult
  798. );
  799. HRESULT DeleteInstanceAsync(
  800. [in] const BSTR strObjectPath,
  801. [in] long lFlags,
  802. [in] IWbemContext* pCtx,
  803. [in] IWbemObjectSink* pResponseHandler
  804. );
  805. HRESULT CreateInstanceEnum(
  806. [in] const BSTR strFilter, // allow more things than a class name
  807. [in] long lFlags,
  808. [in] IWbemContext* pCtx,
  809. [out] IEnumWbemClassObject** ppEnum
  810. );
  811. HRESULT CreateInstanceEnumAsync(
  812. [in] const BSTR strFilter, // allow more things than a class name
  813. [in] long lFlags,
  814. [in] IWbemContext* pCtx,
  815. [in] IWbemObjectSink* pResponseHandler
  816. );
  817. // Queries.
  818. // ========
  819. HRESULT ExecQuery(
  820. [in] const BSTR strQueryLanguage,
  821. [in] const BSTR strQuery,
  822. [in] long lFlags,
  823. [in] IWbemContext* pCtx,
  824. [out] IEnumWbemClassObject** ppEnum
  825. );
  826. HRESULT ExecQueryAsync(
  827. [in] const BSTR strQueryLanguage,
  828. [in] const BSTR strQuery,
  829. [in] long lFlags,
  830. [in] IWbemContext* pCtx,
  831. [in] IWbemObjectSink* pResponseHandler
  832. );
  833. HRESULT ExecNotificationQuery(
  834. [in] const BSTR strQueryLanguage,
  835. [in] const BSTR strQuery,
  836. [in] long lFlags,
  837. [in] IWbemContext* pCtx,
  838. [out] IEnumWbemClassObject** ppEnum
  839. );
  840. HRESULT ExecNotificationQueryAsync(
  841. [in] const BSTR strQueryLanguage,
  842. [in] const BSTR strQuery,
  843. [in] long lFlags,
  844. [in] IWbemContext* pCtx,
  845. [in] IWbemObjectSink* pResponseHandler
  846. );
  847. // Methods
  848. // =======
  849. HRESULT ExecMethod(
  850. [in] const BSTR strObjectPath,
  851. [in] const BSTR strMethodName,
  852. [in] long lFlags,
  853. [in] IWbemContext* pCtx,
  854. [in] IWbemClassObject* pInParams,
  855. [out, OPTIONAL] IWbemClassObject** ppOutParams,
  856. [out, OPTIONAL] IWbemCallResult** ppCallResult
  857. );
  858. HRESULT ExecMethodAsync(
  859. [in] const BSTR strObjectPath,
  860. [in] const BSTR strMethodName,
  861. [in] long lFlags,
  862. [in] IWbemContext* pCtx,
  863. [in] IWbemClassObject* pInParams,
  864. [in] IWbemObjectSink* pResponseHandler
  865. );
  866. };
  867. [object, restricted, uuid(c1e2d759-cabd-11d3-a11b-00105a1f515a)]
  868. interface IWbemRawSdAccessor : IUnknown
  869. {
  870. HRESULT Get(
  871. [in] long lFlags,
  872. [in] ULONG uBufSize,
  873. [out] ULONG *puSDSize,
  874. [in, out, size_is(uBufSize), length_is(*puSDSize)] byte *pSD
  875. );
  876. HRESULT Put(
  877. [in] long lFlags,
  878. [in] ULONG uBufSize,
  879. [in, size_is(uBufSize)] byte *pSD
  880. );
  881. };
  882. [object, uuid(b7b31df9-d515-11d3-a11c-00105a1f515a)]
  883. interface IWbemShutdown : IUnknown
  884. {
  885. HRESULT Shutdown(
  886. [in] LONG uReason,
  887. [in] ULONG uMaxMilliseconds,
  888. [in] IWbemContext *pCtx
  889. );
  890. };
  891. [object, local, uuid(4212dc47-142e-4c6c-bc49-6ca232dd0959)]
  892. interface IWbemCallStatus : IUnknown
  893. {
  894. HRESULT GetCallStatus(
  895. [in] ULONG uFlags,
  896. [in] LCID lLocale,
  897. [out] HRESULT *phRes,
  898. [out] BSTR *pszMsg,
  899. [in] REFIID riid,
  900. [out, iid_is(riid)] LPVOID *pObj
  901. );
  902. };
  903. /////////////////////////////////////////////////////////////////////////
  904. typedef [v1_enum] enum tag_WMI_OBJ_TEXT
  905. {
  906. WMI_OBJ_TEXT_CIM_DTD_2_0 = 1, // The DTD that corresponds to CIM DTD Version 2.0
  907. WMI_OBJ_TEXT_WMI_DTD_2_0 = 2, // The WMI DTD that corresponds to CIM DTD Version 2.0
  908. WMI_OBJ_TEXT_WMI_EXT1 = 3, // Reserved for WMI future use
  909. WMI_OBJ_TEXT_WMI_EXT2 = 4, // Reserved for WMI future use
  910. WMI_OBJ_TEXT_WMI_EXT3 = 5, // Reserved for WMI future use
  911. WMI_OBJ_TEXT_WMI_EXT4 = 6, // Reserved for WMI future use
  912. WMI_OBJ_TEXT_WMI_EXT5 = 7, // Reserved for WMI future use
  913. WMI_OBJ_TEXT_WMI_EXT6 = 8, // Reserved for WMI future use
  914. WMI_OBJ_TEXT_WMI_EXT7 = 9, // Reserved for WMI future use
  915. WMI_OBJ_TEXT_WMI_EXT8 = 10, // Reserved for WMI future use
  916. WMI_OBJ_TEXT_WMI_EXT9 = 11, // Reserved for WMI future use
  917. WMI_OBJ_TEXT_WMI_EXT10 = 12, // Reserved for WMI future use
  918. WMI_OBJ_TEXT_LAST = 13
  919. } WMI_OBJ_TEXT;
  920. /////////////////////////////////////////////////////////////////////////
  921. //
  922. // CoCreatable
  923. [object, restricted, local, uuid(bfbf883a-cad7-11d3-a11b-00105a1f515a)]
  924. interface IWbemObjectTextSrc : IUnknown
  925. {
  926. HRESULT GetText(
  927. [in] long lFlags,
  928. [in] IWbemClassObject *pObj,
  929. [in] ULONG uObjTextFormat,
  930. [in] IWbemContext *pCtx, // Optional flags
  931. [out] BSTR *strText
  932. );
  933. HRESULT CreateFromText(
  934. [in] long lFlags,
  935. [in] BSTR strText,
  936. [in] ULONG uObjTextFormat,
  937. [in] IWbemContext *pCtx, // Optional flags
  938. [out] IWbemClassObject **pNewObj
  939. );
  940. // Resets the object entirely based on the text.
  941. }
  942. /////////////////////////////////////////////////////////////////////////
  943. [local, restricted, object, uuid(49353c9a-516b-11d1-aea6-00c04fb68820)]
  944. interface IWbemObjectAccess : IWbemClassObject
  945. {
  946. HRESULT GetPropertyHandle(
  947. [in, string] LPCWSTR wszPropertyName,
  948. [out] CIMTYPE* pType,
  949. [out] long* plHandle
  950. );
  951. HRESULT WritePropertyValue(
  952. [in] long lHandle,
  953. [in] long lNumBytes,
  954. [in, size_is(lNumBytes)] const byte* aData
  955. );
  956. HRESULT ReadPropertyValue(
  957. [in] long lHandle,
  958. [in] long lBufferSize,
  959. [out] long* plNumBytes,
  960. [out, size_is(lBufferSize), length_is(*plNumBytes)] byte* aData
  961. );
  962. HRESULT ReadDWORD(
  963. [in] long lHandle,
  964. [out] DWORD* pdw
  965. );
  966. HRESULT WriteDWORD(
  967. [in] long lHandle,
  968. [in] DWORD dw
  969. );
  970. HRESULT ReadQWORD(
  971. [in] long lHandle,
  972. [out] unsigned __int64* pqw
  973. );
  974. HRESULT WriteQWORD(
  975. [in] long lHandle,
  976. [in] unsigned __int64 pw
  977. );
  978. HRESULT GetPropertyInfoByHandle(
  979. [in] long lHandle,
  980. [out] BSTR* pstrName,
  981. [out] CIMTYPE* pType);
  982. HRESULT Lock(
  983. [in] long lFlags
  984. );
  985. HRESULT Unlock(
  986. [in] long lFlags
  987. );
  988. };
  989. //////////////////////////////////////////////////////////
  990. typedef struct tag_CompileStatusInfo
  991. {
  992. long lPhaseError; // 0, 1, 2, or 3 matching current return value
  993. HRESULT hRes; // Actual error
  994. long ObjectNum;
  995. long FirstLine;
  996. long LastLine;
  997. DWORD dwOutFlags;
  998. } WBEM_COMPILE_STATUS_INFO;
  999. typedef [v1_enum] enum tag_WBEM_COMPILER_OPTIONS
  1000. {
  1001. WBEM_FLAG_CHECK_ONLY = 0x1,
  1002. WBEM_FLAG_AUTORECOVER = 0X2,
  1003. WBEM_FLAG_WMI_CHECK = 0X4,
  1004. WBEM_FLAG_CONSOLE_PRINT = 0X8,
  1005. WBEM_FLAG_DONT_ADD_TO_LIST = 0X10,
  1006. WBEM_FLAG_SPLIT_FILES = 0X20,
  1007. } WBEM_COMPILER_OPTIONS;
  1008. typedef [v1_enum] enum tag_WBEM_CONNECT_OPTIONS
  1009. {
  1010. WBEM_FLAG_CONNECT_REPOSITORY_ONLY = 0X40,
  1011. WBEM_FLAG_CONNECT_USE_MAX_WAIT = 0X80,
  1012. } WBEM_CONNECT_OPTIONS;
  1013. [local, object, uuid(6daf974e-2e37-11d2-aec9-00c04fb68820)]
  1014. interface IMofCompiler : IUnknown
  1015. {
  1016. HRESULT CompileFile(
  1017. [in, string] LPWSTR FileName,
  1018. [in, string] LPWSTR ServerAndNamespace,
  1019. [in, string] LPWSTR User,
  1020. [in, string] LPWSTR Authority,
  1021. [in, string] LPWSTR Password,
  1022. [in] LONG lOptionFlags, // autocomp, check, etc
  1023. [in] LONG lClassFlags,
  1024. [in] LONG lInstanceFlags,
  1025. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  1026. );
  1027. // lFlags correspond to all the available command-line flags.
  1028. HRESULT CompileBuffer(
  1029. [in] long BuffSize,
  1030. [in, size_is(BuffSize)]BYTE * pBuffer,
  1031. [in, string] LPWSTR ServerAndNamespace,
  1032. [in, string] LPWSTR User,
  1033. [in, string] LPWSTR Authority,
  1034. [in, string] LPWSTR Password,
  1035. [in] LONG lOptionFlags, // autocomp, check, etc
  1036. [in] LONG lClassFlags,
  1037. [in] LONG lInstanceFlags,
  1038. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  1039. );
  1040. HRESULT CreateBMOF(
  1041. [in, string] LPWSTR TextFileName,
  1042. [in, string] LPWSTR BMOFFileName,
  1043. [in, string] LPWSTR ServerAndNamespace,
  1044. [in] LONG lOptionFlags, // autocomp, check, etc
  1045. [in] LONG lClassFlags,
  1046. [in] LONG lInstanceFlags,
  1047. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  1048. );
  1049. // lFlags correspond to all the available command-line flags.
  1050. };
  1051. [restricted, uuid(1cfaba8c-1523-11d1-ad79-00c04fd8fdff), object]
  1052. interface IUnsecuredApartment : IUnknown
  1053. {
  1054. HRESULT CreateObjectStub(
  1055. [in] IUnknown* pObject,
  1056. [out] IUnknown** ppStub);
  1057. };
  1058. typedef [v1_enum] enum tag_WBEM_INFORMATION_FLAG_TYPE
  1059. {
  1060. WBEM_FLAG_SHORT_NAME = 0x1,
  1061. WBEM_FLAG_LONG_NAME = 0x2
  1062. } WBEM_INFORMATION_FLAG_TYPE;
  1063. [local, object, uuid(eb87e1bc-3233-11d2-aec9-00c04fb68820)]
  1064. interface IWbemStatusCodeText : IUnknown
  1065. {
  1066. HRESULT GetErrorCodeText(
  1067. [in] HRESULT hRes,
  1068. [in] LCID LocaleId,
  1069. [in] long lFlags,
  1070. [out] BSTR * MessageText
  1071. );
  1072. HRESULT GetFacilityCodeText(
  1073. [in] HRESULT hRes,
  1074. [in] LCID LocaleId,
  1075. [in] long lFlags,
  1076. [out] BSTR * MessageText
  1077. );
  1078. };
  1079. [object, restricted, uuid(C49E32C7-BC8B-11d2-85D4-00105A1F8304)]
  1080. interface IWbemBackupRestore : IUnknown
  1081. {
  1082. HRESULT Backup(
  1083. [in, string] LPCWSTR strBackupToFile,
  1084. [in] long lFlags
  1085. );
  1086. HRESULT Restore(
  1087. [in, string] LPCWSTR strRestoreFromFile,
  1088. [in] long lFlags
  1089. );
  1090. };
  1091. [object, restricted, uuid(A359DEC5-E813-4834-8A2A-BA7F1D777D76)]
  1092. interface IWbemBackupRestoreEx : IWbemBackupRestore
  1093. {
  1094. HRESULT Pause();
  1095. HRESULT Resume();
  1096. };
  1097. [local, restricted, object, uuid(49353c99-516b-11d1-aea6-00c04fb68820)]
  1098. interface IWbemRefresher : IUnknown
  1099. {
  1100. HRESULT Refresh([in] long lFlags);
  1101. }
  1102. [local, restricted, object, uuid(2705C288-79AE-11d2-B348-00105A1F8177)]
  1103. interface IWbemHiPerfEnum : IUnknown
  1104. {
  1105. // Add Objects, with assigned ids
  1106. HRESULT AddObjects(
  1107. [in] long lFlags,
  1108. [in] ULONG uNumObjects,
  1109. [in, size_is(uNumObjects)] long* apIds,
  1110. [in, size_is(uNumObjects)] IWbemObjectAccess** apObj
  1111. );
  1112. // Remove objects by id
  1113. HRESULT RemoveObjects(
  1114. [in] long lFlags,
  1115. [in] ULONG uNumObjects,
  1116. [in, size_is(uNumObjects)] long* apIds
  1117. );
  1118. HRESULT GetObjects(
  1119. [in] long lFlags,
  1120. [in] ULONG uNumObjects,
  1121. [out,size_is(uNumObjects),length_is(*puReturned)] IWbemObjectAccess** apObj,
  1122. [out] ULONG* puReturned
  1123. );
  1124. HRESULT RemoveAll(
  1125. [in] long lFlags
  1126. );
  1127. };
  1128. [local, restricted, object, uuid(49353c92-516b-11d1-aea6-00c04fb68820)]
  1129. interface IWbemConfigureRefresher : IUnknown
  1130. {
  1131. HRESULT AddObjectByPath(
  1132. [in] IWbemServices* pNamespace,
  1133. [in, string] LPCWSTR wszPath,
  1134. [in] long lFlags,
  1135. [in] IWbemContext* pContext,
  1136. [out] IWbemClassObject** ppRefreshable,
  1137. [out, OPTIONAL] long* plId);
  1138. HRESULT AddObjectByTemplate(
  1139. [in] IWbemServices* pNamespace,
  1140. [in] IWbemClassObject* pTemplate,
  1141. [in] long lFlags,
  1142. [in] IWbemContext* pContext,
  1143. [out] IWbemClassObject** ppRefreshable,
  1144. [out, OPTIONAL] long* plId);
  1145. HRESULT AddRefresher(
  1146. [in] IWbemRefresher* pRefresher,
  1147. [in] long lFlags,
  1148. [out, OPTIONAL] long* plId);
  1149. HRESULT Remove(
  1150. [in] long lId,
  1151. [in] long lFlags);
  1152. HRESULT AddEnum(
  1153. [in] IWbemServices* pNamespace,
  1154. [in, string] LPCWSTR wszClassName,
  1155. [in] long lFlags,
  1156. [in] IWbemContext* pContext,
  1157. [out] IWbemHiPerfEnum** ppEnum,
  1158. [out, OPTIONAL] long* plId );
  1159. };