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.

1414 lines
45 KiB

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