1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use ctypes::{__uint64, c_long, c_uchar};
7 use shared::minwindef::{BYTE, DWORD, ULONG};
8 use shared::rpcndr::byte;
9 use shared::winerror::HRESULT;
10 use shared::wtypes::BSTR;
11 use um::oaidl::{SAFEARRAY, VARIANT};
12 use um::unknwnbase::{IUnknown, IUnknownVtbl};
13 use um::winnt::{LCID, LONG, LPCWSTR, LPWSTR};
14 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0000_v0_0_c_ifspec;
15 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0000_v0_0_s_ifspec;
16 ENUM!{enum WBEM_GENUS_TYPE {
17     WBEM_GENUS_CLASS = 1,
18     WBEM_GENUS_INSTANCE = 2,
19 }}
20 ENUM!{enum WBEM_CHANGE_FLAG_TYPE {
21     WBEM_FLAG_CREATE_OR_UPDATE = 0,
22     WBEM_FLAG_UPDATE_ONLY = 0x1,
23     WBEM_FLAG_CREATE_ONLY = 0x2,
24     WBEM_FLAG_UPDATE_COMPATIBLE = 0,
25     WBEM_FLAG_UPDATE_SAFE_MODE = 0x20,
26     WBEM_FLAG_UPDATE_FORCE_MODE = 0x40,
27     WBEM_MASK_UPDATE_MODE = 0x60,
28     WBEM_FLAG_ADVISORY = 0x10000,
29 }}
30 ENUM!{enum WBEM_GENERIC_FLAG_TYPE {
31     WBEM_FLAG_RETURN_IMMEDIATELY = 0x10,
32     WBEM_FLAG_RETURN_WBEM_COMPLETE = 0,
33     WBEM_FLAG_BIDIRECTIONAL = 0,
34     WBEM_FLAG_FORWARD_ONLY = 0x20,
35     WBEM_FLAG_NO_ERROR_OBJECT = 0x40,
36     WBEM_FLAG_RETURN_ERROR_OBJECT = 0,
37     WBEM_FLAG_SEND_STATUS = 0x80,
38     WBEM_FLAG_DONT_SEND_STATUS = 0,
39     WBEM_FLAG_ENSURE_LOCATABLE = 0x100,
40     WBEM_FLAG_DIRECT_READ = 0x200,
41     WBEM_FLAG_SEND_ONLY_SELECTED = 0,
42     WBEM_RETURN_WHEN_COMPLETE = 0,
43     WBEM_RETURN_IMMEDIATELY = 0x10,
44     WBEM_MASK_RESERVED_FLAGS = 0x1f000,
45     WBEM_FLAG_USE_AMENDED_QUALIFIERS = 0x20000,
46     WBEM_FLAG_STRONG_VALIDATION = 0x100000,
47 }}
48 ENUM!{enum WBEM_STATUS_TYPE {
49     WBEM_STATUS_COMPLETE = 0,
50     WBEM_STATUS_REQUIREMENTS = 1,
51     WBEM_STATUS_PROGRESS = 2,
52     WBEM_STATUS_LOGGING_INFORMATION = 0x100,
53     WBEM_STATUS_LOGGING_INFORMATION_PROVIDER = 0x200,
54     WBEM_STATUS_LOGGING_INFORMATION_HOST = 0x400,
55     WBEM_STATUS_LOGGING_INFORMATION_REPOSITORY = 0x800,
56     WBEM_STATUS_LOGGING_INFORMATION_ESS = 0x1000,
57 }}
58 ENUM!{enum WBEM_TIMEOUT_TYPE {
59     WBEM_NO_WAIT = 0,
60     WBEM_INFINITE = 0xffffffff,
61 }}
62 ENUM!{enum WBEM_CONDITION_FLAG_TYPE {
63     WBEM_FLAG_ALWAYS = 0,
64     WBEM_FLAG_ONLY_IF_TRUE = 0x1,
65     WBEM_FLAG_ONLY_IF_FALSE = 0x2,
66     WBEM_FLAG_ONLY_IF_IDENTICAL = 0x3,
67     WBEM_MASK_PRIMARY_CONDITION = 0x3,
68     WBEM_FLAG_KEYS_ONLY = 0x4,
69     WBEM_FLAG_REFS_ONLY = 0x8,
70     WBEM_FLAG_LOCAL_ONLY = 0x10,
71     WBEM_FLAG_PROPAGATED_ONLY = 0x20,
72     WBEM_FLAG_SYSTEM_ONLY = 0x30,
73     WBEM_FLAG_NONSYSTEM_ONLY = 0x40,
74     WBEM_MASK_CONDITION_ORIGIN = 0x70,
75     WBEM_FLAG_CLASS_OVERRIDES_ONLY = 0x100,
76     WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES = 0x200,
77     WBEM_MASK_CLASS_CONDITION = 0x300,
78 }}
79 ENUM!{enum WBEM_FLAVOR_TYPE {
80     WBEM_FLAVOR_DONT_PROPAGATE = 0,
81     WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = 0x1,
82     WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = 0x2,
83     WBEM_FLAVOR_MASK_PROPAGATION = 0xf,
84     WBEM_FLAVOR_OVERRIDABLE = 0,
85     WBEM_FLAVOR_NOT_OVERRIDABLE = 0x10,
86     WBEM_FLAVOR_MASK_PERMISSIONS = 0x10,
87     WBEM_FLAVOR_ORIGIN_LOCAL = 0,
88     WBEM_FLAVOR_ORIGIN_PROPAGATED = 0x20,
89     WBEM_FLAVOR_ORIGIN_SYSTEM = 0x40,
90     WBEM_FLAVOR_MASK_ORIGIN = 0x60,
91     WBEM_FLAVOR_NOT_AMENDED = 0,
92     WBEM_FLAVOR_AMENDED = 0x80,
93     WBEM_FLAVOR_MASK_AMENDED = 0x80,
94 }}
95 ENUM!{enum WBEM_QUERY_FLAG_TYPE {
96     WBEM_FLAG_DEEP = 0,
97     WBEM_FLAG_SHALLOW = 1,
98     WBEM_FLAG_PROTOTYPE = 2,
99 }}
100 ENUM!{enum WBEM_SECURITY_FLAGS {
101     WBEM_ENABLE = 1,
102     WBEM_METHOD_EXECUTE = 2,
103     WBEM_FULL_WRITE_REP = 4,
104     WBEM_PARTIAL_WRITE_REP = 8,
105     WBEM_WRITE_PROVIDER = 0x10,
106     WBEM_REMOTE_ACCESS = 0x20,
107     WBEM_RIGHT_SUBSCRIBE = 0x40,
108     WBEM_RIGHT_PUBLISH = 0x80,
109 }}
110 ENUM!{enum WBEM_LIMITATION_FLAG_TYPE {
111     WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS = 0x10,
112     WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS = 0x20,
113 }}
114 ENUM!{enum WBEM_TEXT_FLAG_TYPE {
115     WBEM_FLAG_NO_FLAVORS = 0x1,
116 }}
117 ENUM!{enum WBEM_COMPARISON_FLAG {
118     WBEM_COMPARISON_INCLUDE_ALL = 0,
119     WBEM_FLAG_IGNORE_QUALIFIERS = 0x1,
120     WBEM_FLAG_IGNORE_OBJECT_SOURCE = 0x2,
121     WBEM_FLAG_IGNORE_DEFAULT_VALUES = 0x4,
122     WBEM_FLAG_IGNORE_CLASS = 0x8,
123     WBEM_FLAG_IGNORE_CASE = 0x10,
124     WBEM_FLAG_IGNORE_FLAVOR = 0x20,
125 }}
126 ENUM!{enum WBEM_LOCKING_FLAG_TYPE {
127     WBEM_FLAG_ALLOW_READ = 0x1,
128 }}
129 ENUM!{enum CIMTYPE_ENUMERATION {
130     CIM_ILLEGAL = 0xfff,
131     CIM_EMPTY = 0,
132     CIM_SINT8 = 16,
133     CIM_UINT8 = 17,
134     CIM_SINT16 = 2,
135     CIM_UINT16 = 18,
136     CIM_SINT32 = 3,
137     CIM_UINT32 = 19,
138     CIM_SINT64 = 20,
139     CIM_UINT64 = 21,
140     CIM_REAL32 = 4,
141     CIM_REAL64 = 5,
142     CIM_BOOLEAN = 11,
143     CIM_STRING = 8,
144     CIM_DATETIME = 101,
145     CIM_REFERENCE = 102,
146     CIM_CHAR16 = 103,
147     CIM_OBJECT = 13,
148     CIM_FLAG_ARRAY = 0x2000,
149 }}
150 ENUM!{enum WBEM_BACKUP_RESTORE_FLAGS {
151     WBEM_FLAG_BACKUP_RESTORE_DEFAULT = 0,
152     WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN = 1,
153 }}
154 ENUM!{enum WBEM_REFRESHER_FLAGS {
155     WBEM_FLAG_REFRESH_AUTO_RECONNECT = 0,
156     WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT = 1,
157 }}
158 ENUM!{enum WBEM_SHUTDOWN_FLAGS {
159     WBEM_SHUTDOWN_UNLOAD_COMPONENT = 1,
160     WBEM_SHUTDOWN_WMI = 2,
161     WBEM_SHUTDOWN_OS = 3,
162 }}
163 pub type CIMTYPE = c_long;
164 ENUM!{enum WBEMSTATUS_FORMAT {
165     WBEMSTATUS_FORMAT_NEWLINE = 0,
166     WBEMSTATUS_FORMAT_NO_NEWLINE = 1,
167 }}
168 ENUM!{enum WBEM_LIMITS {
169     WBEM_MAX_IDENTIFIER = 0x1000,
170     WBEM_MAX_QUERY = 0x4000,
171     WBEM_MAX_PATH = 0x2000,
172     WBEM_MAX_OBJECT_NESTING = 64,
173     WBEM_MAX_USER_PROPERTIES = 1024,
174 }}
175 ENUM!{enum WBEMSTATUS {
176     WBEM_NO_ERROR = 0,
177     WBEM_S_NO_ERROR = 0,
178     WBEM_S_SAME = 0,
179     WBEM_S_FALSE = 1,
180     WBEM_S_ALREADY_EXISTS = 0x40001,
181     WBEM_S_RESET_TO_DEFAULT = 0x40002,
182     WBEM_S_DIFFERENT = 0x40003,
183     WBEM_S_TIMEDOUT = 0x40004,
184     WBEM_S_NO_MORE_DATA = 0x40005,
185     WBEM_S_OPERATION_CANCELLED = 0x40006,
186     WBEM_S_PENDING = 0x40007,
187     WBEM_S_DUPLICATE_OBJECTS = 0x40008,
188     WBEM_S_ACCESS_DENIED = 0x40009,
189     WBEM_S_PARTIAL_RESULTS = 0x40010,
190     WBEM_S_SOURCE_NOT_AVAILABLE = 0x40017,
191     WBEM_E_FAILED = 0x80041001,
192     WBEM_E_NOT_FOUND = 0x80041002,
193     WBEM_E_ACCESS_DENIED = 0x80041003,
194     WBEM_E_PROVIDER_FAILURE = 0x80041004,
195     WBEM_E_TYPE_MISMATCH = 0x80041005,
196     WBEM_E_OUT_OF_MEMORY = 0x80041006,
197     WBEM_E_INVALID_CONTEXT = 0x80041007,
198     WBEM_E_INVALID_PARAMETER = 0x80041008,
199     WBEM_E_NOT_AVAILABLE = 0x80041009,
200     WBEM_E_CRITICAL_ERROR = 0x8004100a,
201     WBEM_E_INVALID_STREAM = 0x8004100b,
202     WBEM_E_NOT_SUPPORTED = 0x8004100c,
203     WBEM_E_INVALID_SUPERCLASS = 0x8004100d,
204     WBEM_E_INVALID_NAMESPACE = 0x8004100e,
205     WBEM_E_INVALID_OBJECT = 0x8004100f,
206     WBEM_E_INVALID_CLASS = 0x80041010,
207     WBEM_E_PROVIDER_NOT_FOUND = 0x80041011,
208     WBEM_E_INVALID_PROVIDER_REGISTRATION = 0x80041012,
209     WBEM_E_PROVIDER_LOAD_FAILURE = 0x80041013,
210     WBEM_E_INITIALIZATION_FAILURE = 0x80041014,
211     WBEM_E_TRANSPORT_FAILURE = 0x80041015,
212     WBEM_E_INVALID_OPERATION = 0x80041016,
213     WBEM_E_INVALID_QUERY = 0x80041017,
214     WBEM_E_INVALID_QUERY_TYPE = 0x80041018,
215     WBEM_E_ALREADY_EXISTS = 0x80041019,
216     WBEM_E_OVERRIDE_NOT_ALLOWED = 0x8004101a,
217     WBEM_E_PROPAGATED_QUALIFIER = 0x8004101b,
218     WBEM_E_PROPAGATED_PROPERTY = 0x8004101c,
219     WBEM_E_UNEXPECTED = 0x8004101d,
220     WBEM_E_ILLEGAL_OPERATION = 0x8004101e,
221     WBEM_E_CANNOT_BE_KEY = 0x8004101f,
222     WBEM_E_INCOMPLETE_CLASS = 0x80041020,
223     WBEM_E_INVALID_SYNTAX = 0x80041021,
224     WBEM_E_NONDECORATED_OBJECT = 0x80041022,
225     WBEM_E_READ_ONLY = 0x80041023,
226     WBEM_E_PROVIDER_NOT_CAPABLE = 0x80041024,
227     WBEM_E_CLASS_HAS_CHILDREN = 0x80041025,
228     WBEM_E_CLASS_HAS_INSTANCES = 0x80041026,
229     WBEM_E_QUERY_NOT_IMPLEMENTED = 0x80041027,
230     WBEM_E_ILLEGAL_NULL = 0x80041028,
231     WBEM_E_INVALID_QUALIFIER_TYPE = 0x80041029,
232     WBEM_E_INVALID_PROPERTY_TYPE = 0x8004102a,
233     WBEM_E_VALUE_OUT_OF_RANGE = 0x8004102b,
234     WBEM_E_CANNOT_BE_SINGLETON = 0x8004102c,
235     WBEM_E_INVALID_CIM_TYPE = 0x8004102d,
236     WBEM_E_INVALID_METHOD = 0x8004102e,
237     WBEM_E_INVALID_METHOD_PARAMETERS = 0x8004102f,
238     WBEM_E_SYSTEM_PROPERTY = 0x80041030,
239     WBEM_E_INVALID_PROPERTY = 0x80041031,
240     WBEM_E_CALL_CANCELLED = 0x80041032,
241     WBEM_E_SHUTTING_DOWN = 0x80041033,
242     WBEM_E_PROPAGATED_METHOD = 0x80041034,
243     WBEM_E_UNSUPPORTED_PARAMETER = 0x80041035,
244     WBEM_E_MISSING_PARAMETER_ID = 0x80041036,
245     WBEM_E_INVALID_PARAMETER_ID = 0x80041037,
246     WBEM_E_NONCONSECUTIVE_PARAMETER_IDS = 0x80041038,
247     WBEM_E_PARAMETER_ID_ON_RETVAL = 0x80041039,
248     WBEM_E_INVALID_OBJECT_PATH = 0x8004103a,
249     WBEM_E_OUT_OF_DISK_SPACE = 0x8004103b,
250     WBEM_E_BUFFER_TOO_SMALL = 0x8004103c,
251     WBEM_E_UNSUPPORTED_PUT_EXTENSION = 0x8004103d,
252     WBEM_E_UNKNOWN_OBJECT_TYPE = 0x8004103e,
253     WBEM_E_UNKNOWN_PACKET_TYPE = 0x8004103f,
254     WBEM_E_MARSHAL_VERSION_MISMATCH = 0x80041040,
255     WBEM_E_MARSHAL_INVALID_SIGNATURE = 0x80041041,
256     WBEM_E_INVALID_QUALIFIER = 0x80041042,
257     WBEM_E_INVALID_DUPLICATE_PARAMETER = 0x80041043,
258     WBEM_E_TOO_MUCH_DATA = 0x80041044,
259     WBEM_E_SERVER_TOO_BUSY = 0x80041045,
260     WBEM_E_INVALID_FLAVOR = 0x80041046,
261     WBEM_E_CIRCULAR_REFERENCE = 0x80041047,
262     WBEM_E_UNSUPPORTED_CLASS_UPDATE = 0x80041048,
263     WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE = 0x80041049,
264     WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE = 0x80041050,
265     WBEM_E_TOO_MANY_PROPERTIES = 0x80041051,
266     WBEM_E_UPDATE_TYPE_MISMATCH = 0x80041052,
267     WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED = 0x80041053,
268     WBEM_E_UPDATE_PROPAGATED_METHOD = 0x80041054,
269     WBEM_E_METHOD_NOT_IMPLEMENTED = 0x80041055,
270     WBEM_E_METHOD_DISABLED = 0x80041056,
271     WBEM_E_REFRESHER_BUSY = 0x80041057,
272     WBEM_E_UNPARSABLE_QUERY = 0x80041058,
273     WBEM_E_NOT_EVENT_CLASS = 0x80041059,
274     WBEM_E_MISSING_GROUP_WITHIN = 0x8004105a,
275     WBEM_E_MISSING_AGGREGATION_LIST = 0x8004105b,
276     WBEM_E_PROPERTY_NOT_AN_OBJECT = 0x8004105c,
277     WBEM_E_AGGREGATING_BY_OBJECT = 0x8004105d,
278     WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY = 0x8004105f,
279     WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING = 0x80041060,
280     WBEM_E_QUEUE_OVERFLOW = 0x80041061,
281     WBEM_E_PRIVILEGE_NOT_HELD = 0x80041062,
282     WBEM_E_INVALID_OPERATOR = 0x80041063,
283     WBEM_E_LOCAL_CREDENTIALS = 0x80041064,
284     WBEM_E_CANNOT_BE_ABSTRACT = 0x80041065,
285     WBEM_E_AMENDED_OBJECT = 0x80041066,
286     WBEM_E_CLIENT_TOO_SLOW = 0x80041067,
287     WBEM_E_NULL_SECURITY_DESCRIPTOR = 0x80041068,
288     WBEM_E_TIMED_OUT = 0x80041069,
289     WBEM_E_INVALID_ASSOCIATION = 0x8004106a,
290     WBEM_E_AMBIGUOUS_OPERATION = 0x8004106b,
291     WBEM_E_QUOTA_VIOLATION = 0x8004106c,
292     WBEM_E_RESERVED_001 = 0x8004106d,
293     WBEM_E_RESERVED_002 = 0x8004106e,
294     WBEM_E_UNSUPPORTED_LOCALE = 0x8004106f,
295     WBEM_E_HANDLE_OUT_OF_DATE = 0x80041070,
296     WBEM_E_CONNECTION_FAILED = 0x80041071,
297     WBEM_E_INVALID_HANDLE_REQUEST = 0x80041072,
298     WBEM_E_PROPERTY_NAME_TOO_WIDE = 0x80041073,
299     WBEM_E_CLASS_NAME_TOO_WIDE = 0x80041074,
300     WBEM_E_METHOD_NAME_TOO_WIDE = 0x80041075,
301     WBEM_E_QUALIFIER_NAME_TOO_WIDE = 0x80041076,
302     WBEM_E_RERUN_COMMAND = 0x80041077,
303     WBEM_E_DATABASE_VER_MISMATCH = 0x80041078,
304     WBEM_E_VETO_DELETE = 0x80041079,
305     WBEM_E_VETO_PUT = 0x8004107a,
306     WBEM_E_INVALID_LOCALE = 0x80041080,
307     WBEM_E_PROVIDER_SUSPENDED = 0x80041081,
308     WBEM_E_SYNCHRONIZATION_REQUIRED = 0x80041082,
309     WBEM_E_NO_SCHEMA = 0x80041083,
310     WBEM_E_PROVIDER_ALREADY_REGISTERED = 0x80041084,
311     WBEM_E_PROVIDER_NOT_REGISTERED = 0x80041085,
312     WBEM_E_FATAL_TRANSPORT_ERROR = 0x80041086,
313     WBEM_E_ENCRYPTED_CONNECTION_REQUIRED = 0x80041087,
314     WBEM_E_PROVIDER_TIMED_OUT = 0x80041088,
315     WBEM_E_NO_KEY = 0x80041089,
316     WBEM_E_PROVIDER_DISABLED = 0x8004108a,
317     WBEMESS_E_REGISTRATION_TOO_BROAD = 0x80042001,
318     WBEMESS_E_REGISTRATION_TOO_PRECISE = 0x80042002,
319     WBEMESS_E_AUTHZ_NOT_PRIVILEGED = 0x80042003,
320     WBEMMOF_E_EXPECTED_QUALIFIER_NAME = 0x80044001,
321     WBEMMOF_E_EXPECTED_SEMI = 0x80044002,
322     WBEMMOF_E_EXPECTED_OPEN_BRACE = 0x80044003,
323     WBEMMOF_E_EXPECTED_CLOSE_BRACE = 0x80044004,
324     WBEMMOF_E_EXPECTED_CLOSE_BRACKET = 0x80044005,
325     WBEMMOF_E_EXPECTED_CLOSE_PAREN = 0x80044006,
326     WBEMMOF_E_ILLEGAL_CONSTANT_VALUE = 0x80044007,
327     WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER = 0x80044008,
328     WBEMMOF_E_EXPECTED_OPEN_PAREN = 0x80044009,
329     WBEMMOF_E_UNRECOGNIZED_TOKEN = 0x8004400a,
330     WBEMMOF_E_UNRECOGNIZED_TYPE = 0x8004400b,
331     WBEMMOF_E_EXPECTED_PROPERTY_NAME = 0x8004400c,
332     WBEMMOF_E_TYPEDEF_NOT_SUPPORTED = 0x8004400d,
333     WBEMMOF_E_UNEXPECTED_ALIAS = 0x8004400e,
334     WBEMMOF_E_UNEXPECTED_ARRAY_INIT = 0x8004400f,
335     WBEMMOF_E_INVALID_AMENDMENT_SYNTAX = 0x80044010,
336     WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT = 0x80044011,
337     WBEMMOF_E_INVALID_PRAGMA = 0x80044012,
338     WBEMMOF_E_INVALID_NAMESPACE_SYNTAX = 0x80044013,
339     WBEMMOF_E_EXPECTED_CLASS_NAME = 0x80044014,
340     WBEMMOF_E_TYPE_MISMATCH = 0x80044015,
341     WBEMMOF_E_EXPECTED_ALIAS_NAME = 0x80044016,
342     WBEMMOF_E_INVALID_CLASS_DECLARATION = 0x80044017,
343     WBEMMOF_E_INVALID_INSTANCE_DECLARATION = 0x80044018,
344     WBEMMOF_E_EXPECTED_DOLLAR = 0x80044019,
345     WBEMMOF_E_CIMTYPE_QUALIFIER = 0x8004401a,
346     WBEMMOF_E_DUPLICATE_PROPERTY = 0x8004401b,
347     WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION = 0x8004401c,
348     WBEMMOF_E_OUT_OF_RANGE = 0x8004401d,
349     WBEMMOF_E_INVALID_FILE = 0x8004401e,
350     WBEMMOF_E_ALIASES_IN_EMBEDDED = 0x8004401f,
351     WBEMMOF_E_NULL_ARRAY_ELEM = 0x80044020,
352     WBEMMOF_E_DUPLICATE_QUALIFIER = 0x80044021,
353     WBEMMOF_E_EXPECTED_FLAVOR_TYPE = 0x80044022,
354     WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES = 0x80044023,
355     WBEMMOF_E_MULTIPLE_ALIASES = 0x80044024,
356     WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2 = 0x80044025,
357     WBEMMOF_E_NO_ARRAYS_RETURNED = 0x80044026,
358     WBEMMOF_E_MUST_BE_IN_OR_OUT = 0x80044027,
359     WBEMMOF_E_INVALID_FLAGS_SYNTAX = 0x80044028,
360     WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE = 0x80044029,
361     WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE = 0x8004402a,
362     WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE = 0x8004402b,
363     WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX = 0x8004402c,
364     WBEMMOF_E_INVALID_QUALIFIER_SYNTAX = 0x8004402d,
365     WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE = 0x8004402e,
366     WBEMMOF_E_ERROR_CREATING_TEMP_FILE = 0x8004402f,
367     WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE = 0x80044030,
368     WBEMMOF_E_INVALID_DELETECLASS_SYNTAX = 0x80044031,
369 }}
370 // EXTERN_C const IID LIBID_WbemClient_v1;
371 // EXTERN_C const IID IID_IWbemClassObject;
372 DEFINE_GUID!{IID_IWbemClassObject,
373     0xdc12a681, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24}
374 RIDL!{#[uuid(0xdc12a681, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24)]
375 interface IWbemClassObject(IWbemClassObjectVtbl): IUnknown(IUnknownVtbl) {
376     fn GetQualifierSet(
377         ppQualSet: *mut *mut IWbemQualifierSet,
378     ) -> HRESULT,
379     fn Get(
380         wszName: LPCWSTR,
381         lFlags: c_long,
382         pVal: *mut VARIANT,
383         pType: *mut CIMTYPE,
384         plFlavor: *mut c_long,
385     ) -> HRESULT,
386     fn Put(
387         wszName: LPCWSTR,
388         lFlags: c_long,
389         pVal: *mut VARIANT,
390         Type: CIMTYPE,
391     ) -> HRESULT,
392     fn Delete(
393         wszName: LPCWSTR,
394     ) -> HRESULT,
395     fn GetNames(
396         wszQualifierName: LPCWSTR,
397         lFlags: c_long,
398         pQualifierVal: *mut VARIANT,
399         pNames: *mut *mut SAFEARRAY,
400     ) -> HRESULT,
401     fn BeginEnumeration(
402         lEnumFlags: c_long,
403     ) -> HRESULT,
404     fn Next(
405         lFlags: c_long,
406         strName: *mut BSTR,
407         pVal: *mut VARIANT,
408         pType: *mut CIMTYPE,
409         plFlavor: *mut c_long,
410     ) -> HRESULT,
411     fn EndEnumeration() -> HRESULT,
412     fn GetPropertyQualifierSet(
413         wszProperty: LPCWSTR,
414         ppQualSet: *mut *mut IWbemQualifierSet,
415     ) -> HRESULT,
416     fn Clone(
417         ppCopy: *mut *mut IWbemClassObject,
418     ) -> HRESULT,
419     fn GetObjectText(
420         lFlags: c_long,
421         pstrObjectText: *mut BSTR,
422     ) -> HRESULT,
423     fn SpawnDerivedClass(
424         lFlags: c_long,
425         ppNewClass: *mut *mut IWbemClassObject,
426     ) -> HRESULT,
427     fn SpawnInstance(
428         lFlags: c_long,
429         ppNewInstance: *mut *mut IWbemClassObject,
430     ) -> HRESULT,
431     fn CompareTo(
432         lFlags: c_long,
433         pCompareTo: *mut IWbemClassObject,
434     ) -> HRESULT,
435     fn GetPropertyOrigin(
436         wszName: LPCWSTR,
437         pstrClassName: *mut BSTR,
438     ) -> HRESULT,
439     fn InheritsFrom(
440         strAncestor: LPCWSTR,
441     ) -> HRESULT,
442     fn GetMethod(
443         wszName: LPCWSTR,
444         lFlags: c_long,
445         ppInSignature: *mut *mut IWbemClassObject,
446         ppOutSignature: *mut *mut IWbemClassObject,
447     ) -> HRESULT,
448     fn PutMethod(
449         wszName: LPCWSTR,
450         lFlags: c_long,
451         pInSignature: *mut IWbemClassObject,
452         pOutSignature: *mut IWbemClassObject,
453     ) -> HRESULT,
454     fn DeleteMethod(
455         wszName: LPCWSTR,
456     ) -> HRESULT,
457     fn BeginMethodEnumeration(
458         lEnumFlags: c_long,
459     ) -> HRESULT,
460     fn NextMethod(
461         lFlags: c_long,
462         pstrName: *mut BSTR,
463         ppInSignature: *mut *mut IWbemClassObject,
464         ppOutSignature: *mut *mut IWbemClassObject,
465     ) -> HRESULT,
466     fn EndMethodEnumeration() -> HRESULT,
467     fn GetMethodQualifierSet(
468         wszMethod: LPCWSTR,
469         ppQualSet: *mut *mut IWbemQualifierSet,
470     ) -> HRESULT,
471     fn GetMethodOrigin(
472         wszMethodName: LPCWSTR,
473         pstrClassName: *mut BSTR,
474     ) -> HRESULT,
475 }}
476 // EXTERN_C const IID IID_IWbemObjectAccess;
477 DEFINE_GUID!{IID_IWbemObjectAccess,
478     0x49353c9a, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
479 RIDL!{#[uuid(0x49353c9a, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
480 interface IWbemObjectAccess(IWbemObjectAccessVtbl): IWbemClassObject(IWbemClassObjectVtbl) {
481     fn GetPropertyHandle(
482         wszPropertyName: LPCWSTR,
483         pType: *mut CIMTYPE,
484         plHandle: *mut c_long,
485     ) -> HRESULT,
486     fn WritePropertyValue(
487         lHandle: c_long,
488         lNumBytes: c_long,
489         aData: *const byte,
490     ) -> HRESULT,
491     fn ReadPropertyValue(
492         lHandle: c_long,
493         lBufferSize: c_long,
494         plNumBytes: *mut c_long,
495         aData: *mut byte,
496     ) -> HRESULT,
497     fn ReadDWORD(
498         lHandle: c_long,
499         pdw: *mut DWORD,
500     ) -> HRESULT,
501     fn WriteDWORD(
502         lHandle: c_long,
503         dw: DWORD,
504     ) -> HRESULT,
505     fn ReadQWORD(
506         lHandle: c_long,
507         pqw: *mut __uint64,
508     ) -> HRESULT,
509     fn WriteQWORD(
510         lHandle: c_long,
511         pw: __uint64,
512     ) -> HRESULT,
513     fn GetPropertyInfoByHandle(
514         lHandle: c_long,
515         pstrName: *mut BSTR,
516         pType: *mut CIMTYPE,
517     ) -> HRESULT,
518     fn Lock(
519         lFlags: c_long,
520     ) -> HRESULT,
521     fn Unlock(
522         lFlags: c_long,
523     ) -> HRESULT,
524 }}
525 // EXTERN_C const IID IID_IWbemQualifierSet;
526 DEFINE_GUID!{IID_IWbemQualifierSet,
527     0xdc12a680, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24}
528 RIDL!{#[uuid(0xdc12a680, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24)]
529 interface IWbemQualifierSet(IWbemQualifierSetVtbl): IUnknown(IUnknownVtbl) {
530     fn Get(
531         wszName: LPCWSTR,
532         lFlags: c_long,
533         pVal: *mut VARIANT,
534         plFlavor: *mut c_long,
535     ) -> HRESULT,
536     fn Put(
537         wszName: LPCWSTR,
538         pVal: *mut VARIANT,
539         lFlavor: c_long,
540     ) -> HRESULT,
541     fn Delete(
542         wszName: LPCWSTR,
543     ) -> HRESULT,
544     fn GetNames(
545         lFlags: c_long,
546         pNames: *mut *mut SAFEARRAY,
547     ) -> HRESULT,
548     fn BeginEnumeration(
549         lFlags: c_long,
550     ) -> HRESULT,
551     fn Next(
552         lFlags: c_long,
553         pstrName: *mut BSTR,
554         pVal: *mut VARIANT,
555         plFlavor: *mut c_long,
556     ) -> HRESULT,
557     fn EndEnumeration() -> HRESULT,
558 }}
559 // EXTERN_C const IID IID_IWbemServices;
560 DEFINE_GUID!{IID_IWbemServices,
561     0x9556dc99, 0x828c, 0x11cf, 0xa3, 0x7e, 0x00, 0xaa, 0x00, 0x32, 0x40, 0xc7}
562 RIDL!{#[uuid(0x9556dc99, 0x828c, 0x11cf, 0xa3, 0x7e, 0x00, 0xaa, 0x00, 0x32, 0x40, 0xc7)]
563 interface IWbemServices(IWbemServicesVtbl): IUnknown(IUnknownVtbl) {
564     fn OpenNamespace(
565         strNamespace: BSTR,
566         lFlags: c_long,
567         pCtx: *mut IWbemContext,
568         ppWorkingNamespace: *mut *mut IWbemServices,
569         ppResult: *mut *mut IWbemCallResult,
570     ) -> HRESULT,
571     fn CancelAsyncCall(
572         pSink: *mut IWbemObjectSink,
573     ) -> HRESULT,
574     fn QueryObjectSink(
575         lFlags: c_long,
576         ppResponseHandler: *mut *mut IWbemObjectSink,
577     ) -> HRESULT,
578     fn GetObject(
579         strObjectPath: BSTR,
580         lFlags: c_long,
581         pCtx: *mut IWbemContext,
582         ppObject: *mut *mut IWbemClassObject,
583         ppCallResult: *mut *mut IWbemCallResult,
584     ) -> HRESULT,
585     fn GetObjectAsync(
586         strObjectPath: BSTR,
587         lFlags: c_long,
588         pCtx: *mut IWbemContext,
589         pResponseHandler: *mut IWbemObjectSink,
590     ) -> HRESULT,
591     fn PutClass(
592         pObject: *mut IWbemClassObject,
593         lFlags: c_long,
594         pCtx: *mut IWbemContext,
595         ppCallResult: *mut *mut IWbemCallResult,
596     ) -> HRESULT,
597     fn PutClassAsync(
598         pObject: *mut IWbemClassObject,
599         lFlags: c_long,
600         pCtx: *mut IWbemContext,
601         pResponseHandler: *mut IWbemObjectSink,
602     ) -> HRESULT,
603     fn DeleteClass(
604         strClass: BSTR,
605         lFlags: c_long,
606         pCtx: *mut IWbemContext,
607         ppCallResult: *mut *mut IWbemCallResult,
608     ) -> HRESULT,
609     fn DeleteClassAsync(
610         strClass: BSTR,
611         lFlags: c_long,
612         pCtx: *mut IWbemContext,
613         pResponseHandler: *mut IWbemObjectSink,
614     ) -> HRESULT,
615     fn CreateClassEnum(
616         strSuperclass: BSTR,
617         lFlags: c_long,
618         pCtx: *mut IWbemContext,
619         ppEnum: *mut *mut IEnumWbemClassObject,
620     ) -> HRESULT,
621     fn CreateClassEnumAsync(
622         strSuperclass: BSTR,
623         lFlags: c_long,
624         pCtx: *mut IWbemContext,
625         pResponseHandler: *mut IWbemObjectSink,
626     ) -> HRESULT,
627     fn PutInstance(
628         pInst: *mut IWbemClassObject,
629         lFlags: c_long,
630         pCtx: *mut IWbemContext,
631         ppCallResult: *mut *mut IWbemCallResult,
632     ) -> HRESULT,
633     fn PutInstanceAsync(
634         pInst: *mut IWbemClassObject,
635         lFlags: c_long,
636         pCtx: *mut IWbemContext,
637         pResponseHandler: *mut IWbemObjectSink,
638     ) -> HRESULT,
639     fn DeleteInstance(
640         strObjectPath: BSTR,
641         lFlags: c_long,
642         pCtx: *mut IWbemContext,
643         ppCallResult: *mut *mut IWbemCallResult,
644     ) -> HRESULT,
645     fn DeleteInstanceAsync(
646         strObjectPath: BSTR,
647         lFlags: c_long,
648         pCtx: *mut IWbemContext,
649         pResponseHandler: *mut IWbemObjectSink,
650     ) -> HRESULT,
651     fn CreateInstanceEnum(
652         strFilter: BSTR,
653         lFlags: c_long,
654         pCtx: *mut IWbemContext,
655         ppEnum: *mut *mut IEnumWbemClassObject,
656     ) -> HRESULT,
657     fn CreateInstanceEnumAsync(
658         strFilter: BSTR,
659         lFlags: c_long,
660         pCtx: *mut IWbemContext,
661         pResponseHandler: *mut IWbemObjectSink,
662     ) -> HRESULT,
663     fn ExecQuery(
664         strQueryLanguage: BSTR,
665         strQuery: BSTR,
666         lFlags: c_long,
667         pCtx: *mut IWbemContext,
668         ppEnum: *mut *mut IEnumWbemClassObject,
669     ) -> HRESULT,
670     fn ExecQueryAsync(
671         strQueryLanguage: BSTR,
672         strQuery: BSTR,
673         lFlags: c_long,
674         pCtx: *mut IWbemContext,
675         pResponseHandler: *mut IWbemObjectSink,
676     ) -> HRESULT,
677     fn ExecNotificationQuery(
678         strQueryLanguage: BSTR,
679         strQuery: BSTR,
680         lFlags: c_long,
681         pCtx: *mut IWbemContext,
682         ppEnum: *mut *mut IEnumWbemClassObject,
683     ) -> HRESULT,
684     fn ExecNotificationQueryAsync(
685         strQueryLanguage: BSTR,
686         strQuery: BSTR,
687         lFlags: c_long,
688         pCtx: *mut IWbemContext,
689         pResponseHandler: *mut IWbemObjectSink,
690     ) -> HRESULT,
691     fn ExecMethod(
692         strObjectPath: BSTR,
693         strMethodName: BSTR,
694         lFlags: c_long,
695         pCtx: *mut IWbemContext,
696         pInParams: *mut IWbemClassObject,
697         ppOutParams: *mut *mut IWbemClassObject,
698         ppCallResult: *mut *mut IWbemCallResult,
699     ) -> HRESULT,
700     fn ExecMethodAsync(
701         strObjectPath: BSTR,
702         strMethodName: BSTR,
703         lFlags: c_long,
704         pCtx: *mut IWbemContext,
705         pInParams: *mut IWbemClassObject,
706         pResponseHandler: *mut IWbemObjectSink,
707     ) -> HRESULT,
708 }}
709 // EXTERN_C const IID IID_IWbemLocator;
710 DEFINE_GUID!{IID_IWbemLocator,
711     0xdc12a687, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24}
712 RIDL!{#[uuid(0xdc12a687, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24)]
713 interface IWbemLocator(IWbemLocatorVtbl): IUnknown(IUnknownVtbl) {
714     fn ConnectServer(
715         strNetworkResource: BSTR,
716         strUser: BSTR,
717         strPassword: BSTR,
718         strLocale: BSTR,
719         lSecurityFlags: c_long,
720         strAuthority: BSTR,
721         pCtx: *mut IWbemContext,
722         ppNamespace: *mut *mut IWbemServices,
723     ) -> HRESULT,
724 }}
725 // EXTERN_C const IID IID_IWbemObjectSink;
726 DEFINE_GUID!{IID_IWbemObjectSink,
727     0x7c857801, 0x7381, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24}
728 RIDL!{#[uuid(0x7c857801, 0x7381, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24)]
729 interface IWbemObjectSink(IWbemObjectSinkVtbl): IUnknown(IUnknownVtbl) {
730     fn Indicate(
731         lObjectCount: c_long,
732         apObjArray: *mut *mut IWbemClassObject,
733     ) -> HRESULT,
734     fn SetStatus(
735         lFlags: c_long,
736         hResult: HRESULT,
737         strParam: BSTR,
738         pObjParam: *mut IWbemClassObject,
739     ) -> HRESULT,
740 }}
741 // EXTERN_C const IID IID_IEnumWbemClassObject;
742 DEFINE_GUID!{IID_IEnumWbemClassObject,
743     0x027947e1, 0xd731, 0x11ce, 0xa3, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
744 RIDL!{#[uuid(0x027947e1, 0xd731, 0x11ce, 0xa3, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01)]
745 interface IEnumWbemClassObject(IEnumWbemClassObjectVtbl): IUnknown(IUnknownVtbl) {
746     fn Reset() -> HRESULT,
747     fn Next(
748         lTimeout: c_long,
749         uCount: ULONG,
750         apObjects: *mut *mut IWbemClassObject,
751         puReturned: *mut ULONG,
752     ) -> HRESULT,
753     fn NextAsync(
754         uCount: ULONG,
755         pSink: *mut IWbemObjectSink,
756     ) -> HRESULT,
757     fn Clone(
758         ppEnum: *mut *mut IEnumWbemClassObject,
759     ) -> HRESULT,
760     fn Skip(
761         lTimeout: c_long,
762         nCount: ULONG,
763     ) -> HRESULT,
764 }}
765 // EXTERN_C const IID IID_IWbemCallResult;
766 DEFINE_GUID!{IID_IWbemCallResult,
767     0x44aca675, 0xe8fc, 0x11d0, 0xa0, 0x7c, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
768 RIDL!{#[uuid(0x44aca675, 0xe8fc, 0x11d0, 0xa0, 0x7c, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
769 interface IWbemCallResult(IWbemCallResultVtbl): IUnknown(IUnknownVtbl) {
770     fn GetResultObject(
771         lTimeout: c_long,
772         ppResultObject: *mut *mut IWbemClassObject,
773     ) -> HRESULT,
774     fn GetResultString(
775         lTimeout: c_long,
776         pstrResultString: *mut BSTR,
777     ) -> HRESULT,
778     fn GetResultServices(
779         lTimeout: c_long,
780         ppServices: *mut *mut IWbemServices,
781     ) -> HRESULT,
782     fn GetCallStatus(
783         lTimeout: c_long,
784         plStatus: *mut c_long,
785     ) -> HRESULT,
786 }}
787 // EXTERN_C const IID IID_IWbemContext;
788 DEFINE_GUID!{IID_IWbemContext,
789     0x44aca674, 0xe8fc, 0x11d0, 0xa0, 0x7c, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
790 RIDL!{#[uuid(0x44aca674, 0xe8fc, 0x11d0, 0xa0, 0x7c, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
791 interface IWbemContext(IWbemContextVtbl): IUnknown(IUnknownVtbl) {
792     fn Clone(
793         ppNewCopy: *mut *mut IWbemContext,
794     ) -> HRESULT,
795     fn GetNames(
796         lFlags: c_long,
797         pNames: *mut *mut SAFEARRAY,
798     ) -> HRESULT,
799     fn BeginEnumeration(
800         lFlags: c_long,
801     ) -> HRESULT,
802     fn Next(
803         lFlags: c_long,
804         pstrName: *mut BSTR,
805         pValue: *mut VARIANT,
806     ) -> HRESULT,
807     fn EndEnumeration() -> HRESULT,
808     fn SetValue(
809         wszName: LPCWSTR,
810         lFlags: c_long,
811         pValue: *mut VARIANT,
812     ) -> HRESULT,
813     fn GetValue(
814         wszName: LPCWSTR,
815         lFlags: c_long,
816         pValue: *mut VARIANT,
817     ) -> HRESULT,
818     fn DeleteValue(
819         wszName: LPCWSTR,
820         lFlags: c_long,
821     ) -> HRESULT,
822     fn DeleteAll() -> HRESULT,
823 }}
824 // EXTERN_C const IID IID_IUnsecuredApartment;
825 DEFINE_GUID!{IID_IUnsecuredApartment,
826     0x1cfaba8c, 0x1523, 0x11d1, 0xad, 0x79, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}
827 RIDL!{#[uuid(0x1cfaba8c, 0x1523, 0x11d1, 0xad, 0x79, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff)]
828 interface IUnsecuredApartment(IUnsecuredApartmentVtbl): IUnknown(IUnknownVtbl) {
829     fn CreateObjectStub(
830         pObject: *mut IUnknown,
831         ppStub: *mut *mut IUnknown,
832     ) -> HRESULT,
833 }}
834 // EXTERN_C const IID IID_IWbemUnsecuredApartment;
835 DEFINE_GUID!{IID_IWbemUnsecuredApartment,
836     0x31739d04, 0x3471, 0x4cf4, 0x9a, 0x7c, 0x57, 0xa4, 0x4a, 0xe7, 0x19, 0x56}
837 RIDL!{#[uuid(0x31739d04, 0x3471, 0x4cf4, 0x9a, 0x7c, 0x57, 0xa4, 0x4a, 0xe7, 0x19, 0x56)]
838 interface IWbemUnsecuredApartment(IWbemUnsecuredApartmentVtbl):
839 IUnsecuredApartment(IUnsecuredApartmentVtbl) {
840     fn CreateSinkStub(
841         pSink: *mut IWbemObjectSink,
842         dwFlags: DWORD,
843         wszReserved: LPCWSTR,
844         ppStub: *mut *mut IWbemObjectSink,
845     ) -> HRESULT,
846 }}
847 // EXTERN_C const IID IID_IWbemStatusCodeText;
848 DEFINE_GUID!{IID_IWbemStatusCodeText,
849     0xeb87e1bc, 0x3233, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
850 RIDL!{#[uuid(0xeb87e1bc, 0x3233, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
851 interface IWbemStatusCodeText(IWbemStatusCodeTextVtbl): IUnknown(IUnknownVtbl) {
852     fn GetErrorCodeText(
853         hRes: HRESULT,
854         LocaleId: LCID,
855         lFlags: c_long,
856         MessageText: *mut BSTR,
857     ) -> HRESULT,
858     fn GetFacilityCodeText(
859         hRes: HRESULT,
860         LocaleId: LCID,
861         lFlags: c_long,
862         MessageText: *mut BSTR,
863     ) -> HRESULT,
864 }}
865 // EXTERN_C const IID IID_IWbemBackupRestore;
866 DEFINE_GUID!{IID_IWbemBackupRestore,
867     0xc49e32c7, 0xbc8b, 0x11d2, 0x85, 0xd4, 0x00, 0x10, 0x5a, 0x1f, 0x83, 0x04}
868 RIDL!{#[uuid(0xc49e32c7, 0xbc8b, 0x11d2, 0x85, 0xd4, 0x00, 0x10, 0x5a, 0x1f, 0x83, 0x04)]
869 interface IWbemBackupRestore(IWbemBackupRestoreVtbl): IUnknown(IUnknownVtbl) {
870     fn Backup(
871         strBackupToFile: LPCWSTR,
872         lFlags: c_long,
873     ) -> HRESULT,
874     fn Restore(
875         strRestoreFromFile: LPCWSTR,
876         lFlags: c_long,
877     ) -> HRESULT,
878 }}
879 // EXTERN_C const IID IID_IWbemBackupRestoreEx;
880 DEFINE_GUID!{IID_IWbemBackupRestoreEx,
881     0xa359dec5, 0xe813, 0x4834, 0x8a, 0x2a, 0xba, 0x7f, 0x1d, 0x77, 0x7d, 0x76}
882 RIDL!{#[uuid(0xa359dec5, 0xe813, 0x4834, 0x8a, 0x2a, 0xba, 0x7f, 0x1d, 0x77, 0x7d, 0x76)]
883 interface IWbemBackupRestoreEx(IWbemBackupRestoreExVtbl):
884 IWbemBackupRestore(IWbemBackupRestoreVtbl) {
885     fn Pause() -> HRESULT,
886     fn Resume() -> HRESULT,
887 }}
888 // EXTERN_C const IID IID_IWbemRefresher;
889 DEFINE_GUID!{IID_IWbemRefresher,
890     0x49353c99, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
891 RIDL!{#[uuid(0x49353c99, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
892 interface IWbemRefresher(IWbemRefresherVtbl): IUnknown(IUnknownVtbl) {
893     fn Refresh(
894         lFlags: c_long,
895     ) -> HRESULT,
896 }}
897 // EXTERN_C const IID IID_IWbemHiPerfEnum;
898 DEFINE_GUID!{IID_IWbemHiPerfEnum,
899     0x2705c288, 0x79ae, 0x11d2, 0xb3, 0x48, 0x00, 0x10, 0x5a, 0x1f, 0x81, 0x77}
900 RIDL!{#[uuid(0x2705c288, 0x79ae, 0x11d2, 0xb3, 0x48, 0x00, 0x10, 0x5a, 0x1f, 0x81, 0x77)]
901 interface IWbemHiPerfEnum(IWbemHiPerfEnumVtbl): IUnknown(IUnknownVtbl) {
902     fn AddObjects(
903         lFlags: c_long,
904         uNumObjects: ULONG,
905         apIds: *mut c_long,
906         apObj: *mut *mut IWbemObjectAccess,
907     ) -> HRESULT,
908     fn RemoveObjects(
909         lFlags: c_long,
910         uNumObjects: ULONG,
911         apIds: *mut c_long,
912     ) -> HRESULT,
913     fn GetObjects(
914         lFlags: c_long,
915         uNumObjects: ULONG,
916         apObj: *mut *mut IWbemObjectAccess,
917         puReturned: *mut ULONG,
918     ) -> HRESULT,
919     fn RemoveAll(
920         lFlags: c_long,
921     ) -> HRESULT,
922 }}
923 // EXTERN_C const IID IID_IWbemConfigureRefresher;
924 DEFINE_GUID!{IID_IWbemConfigureRefresher,
925     0x49353c92, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
926 RIDL!{#[uuid(0x49353c92, 0x516b, 0x11d1, 0xae, 0xa6, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
927 interface IWbemConfigureRefresher(IWbemConfigureRefresherVtbl): IUnknown(IUnknownVtbl) {
928     fn AddObjectByPath(
929         pNamespace: *mut IWbemServices,
930         wszPath: LPCWSTR,
931         lFlags: c_long,
932         pContext: *mut IWbemContext,
933         ppRefreshable: *mut *mut IWbemClassObject,
934         plId: *mut c_long,
935     ) -> HRESULT,
936     fn AddObjectByTemplate(
937         pNamespace: *mut IWbemServices,
938         pTemplate: *mut IWbemClassObject,
939         lFlags: c_long,
940         pContext: *mut IWbemContext,
941         ppRefreshable: *mut *mut IWbemClassObject,
942         plId: *mut c_long,
943     ) -> HRESULT,
944     fn AddRefresher(
945         pRefresher: *mut IWbemRefresher,
946         lFlags: c_long,
947         plId: *mut c_long,
948     ) -> HRESULT,
949     fn Remove(
950         lId: c_long,
951         lFlags: c_long,
952     ) -> HRESULT,
953     fn AddEnum(
954         pNamespace: *mut IWbemServices,
955         wszClassName: LPCWSTR,
956         lFlags: c_long,
957         pContext: *mut IWbemContext,
958         ppEnum: *mut *mut IWbemHiPerfEnum,
959         plId: *mut c_long,
960     ) -> HRESULT,
961 }}
962 DEFINE_GUID!{CLSID_WbemLocator,
963     0x4590f811, 0x1d3a, 0x11d0, 0x89, 0x1f, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24}
964 RIDL!{#[uuid(0x4590f811, 0x1d3a, 0x11d0, 0x89, 0x1f, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24)]
965 class WbemLocator;}
966 DEFINE_GUID!{CLSID_WbemContext,
967     0x674B6698, 0xEE92, 0x11d0, 0xAD, 0x71, 0x00, 0xC0, 0x4F, 0xD8, 0xFD, 0xFF}
968 // class DECLSPEC_UUID("674B6698-EE92-11d0-AD71-00C04FD8FDFF")
969 // WbemContext;
970 DEFINE_GUID!{CLSID_UnsecuredApartment,
971     0x49bd2028, 0x1523, 0x11d1, 0xad, 0x79, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}
972 // class DECLSPEC_UUID("49bd2028-1523-11d1-ad79-00c04fd8fdff")
973 // UnsecuredApartment;
974 DEFINE_GUID!{CLSID_WbemClassObject,
975     0x9A653086, 0x174F, 0x11d2, 0xB5, 0xF9, 0x00, 0x10, 0x4B, 0x70, 0x3E, 0xFD}
976 // class DECLSPEC_UUID("9A653086-174F-11d2-B5F9-00104B703EFD")
977 // WbemClassObject;
978 DEFINE_GUID!{CLSID_MofCompiler,
979     0x6daf9757, 0x2e37, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
980 // class DECLSPEC_UUID("6daf9757-2e37-11d2-aec9-00c04fb68820")
981 // MofCompiler;
982 DEFINE_GUID!{CLSID_WbemStatusCodeText,
983     0xeb87e1bd, 0x3233, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
984 // class DECLSPEC_UUID("eb87e1bd-3233-11d2-aec9-00c04fb68820")
985 // WbemStatusCodeText;
986 DEFINE_GUID!{CLSID_WbemBackupRestore,
987     0xC49E32C6, 0xBC8B, 0x11d2, 0x85, 0xD4, 0x00, 0x10, 0x5A, 0x1F, 0x83, 0x04}
988 // class DECLSPEC_UUID("C49E32C6-BC8B-11d2-85D4-00105A1F8304")
989 // WbemBackupRestore;
990 DEFINE_GUID!{CLSID_WbemRefresher,
991     0xc71566f2, 0x561e, 0x11d1, 0xad, 0x87, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}
992 // class DECLSPEC_UUID("c71566f2-561e-11d1-ad87-00c04fd8fdff")
993 // WbemRefresher;
994 DEFINE_GUID!{CLSID_WbemObjectTextSrc,
995     0x8D1C559D, 0x84F0, 0x4bb3, 0xA7, 0xD5, 0x56, 0xA7, 0x43, 0x5A, 0x9B, 0xA6}
996 // class DECLSPEC_UUID("8D1C559D-84F0-4bb3-A7D5-56A7435A9BA6")
997 // WbemObjectTextSrc;
998 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0001_v0_0_c_ifspec;
999 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0001_v0_0_s_ifspec;
1000 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0003_v0_0_c_ifspec;
1001 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0003_v0_0_s_ifspec;
1002 // EXTERN_C const IID IID_IWbemObjectSinkEx;
1003 DEFINE_GUID!{IID_IWbemObjectSinkEx,
1004     0xe7d35cfa, 0x348b, 0x485e, 0xb5, 0x24, 0x25, 0x27, 0x25, 0xd6, 0x97, 0xca}
1005 RIDL!{#[uuid(0xe7d35cfa, 0x348b, 0x485e, 0xb5, 0x24, 0x25, 0x27, 0x25, 0xd6, 0x97, 0xca)]
1006 interface IWbemObjectSinkEx(IWbemObjectSinkExVtbl): IWbemObjectSink(IWbemObjectSinkVtbl) {
1007     fn WriteMessage(
1008         uChannel: ULONG,
1009         strMessage: BSTR,
1010     ) -> HRESULT,
1011     fn WriteError(
1012         pObjError: *mut IWbemClassObject,
1013         puReturned: *mut c_uchar,
1014     ) -> HRESULT,
1015     fn PromptUser(
1016         strMessage: BSTR,
1017         uPromptType: c_uchar,
1018         puReturned: *mut c_uchar,
1019     ) -> HRESULT,
1020     fn WriteProgress(
1021         strActivity: BSTR,
1022         strCurrentOperation: BSTR,
1023         strStatusDescription: BSTR,
1024         uPercentComplete: ULONG,
1025         uSecondsRemaining: ULONG,
1026     ) -> HRESULT,
1027     fn WriteStreamParameter(
1028         strName: BSTR,
1029         vtValue: *mut VARIANT,
1030         ulType: ULONG,
1031         ulFlags: ULONG,
1032     ) -> HRESULT,
1033 }}
1034 // EXTERN_C const IID IID_IWbemShutdown;
1035 DEFINE_GUID!{IID_IWbemShutdown,
1036     0xb7b31df9, 0xd515, 0x11d3, 0xa1, 0x1c, 0x00, 0x10, 0x5a, 0x1f, 0x51, 0x5a}
1037 RIDL!{#[uuid(0xb7b31df9, 0xd515, 0x11d3, 0xa1, 0x1c, 0x00, 0x10, 0x5a, 0x1f, 0x51, 0x5a)]
1038 interface IWbemShutdown(IWbemShutdownVtbl): IUnknown(IUnknownVtbl) {
1039     fn Shutdown(
1040         uReason: LONG,
1041         uMaxMilliseconds: ULONG,
1042         pCtx: *mut IWbemContext,
1043     ) -> HRESULT,
1044 }}
1045 ENUM!{enum WMI_OBJ_TEXT {
1046     WMI_OBJ_TEXT_CIM_DTD_2_0 = 1,
1047     WMI_OBJ_TEXT_WMI_DTD_2_0 = 2,
1048     WMI_OBJ_TEXT_WMI_EXT1 = 3,
1049     WMI_OBJ_TEXT_WMI_EXT2 = 4,
1050     WMI_OBJ_TEXT_WMI_EXT3 = 5,
1051     WMI_OBJ_TEXT_WMI_EXT4 = 6,
1052     WMI_OBJ_TEXT_WMI_EXT5 = 7,
1053     WMI_OBJ_TEXT_WMI_EXT6 = 8,
1054     WMI_OBJ_TEXT_WMI_EXT7 = 9,
1055     WMI_OBJ_TEXT_WMI_EXT8 = 10,
1056     WMI_OBJ_TEXT_WMI_EXT9 = 11,
1057     WMI_OBJ_TEXT_WMI_EXT10 = 12,
1058     WMI_OBJ_TEXT_LAST = 13,
1059 }}
1060 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0011_v0_0_c_ifspec;
1061 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0011_v0_0_s_ifspec;
1062 // EXTERN_C const IID IID_IWbemObjectTextSrc;
1063 DEFINE_GUID!{IID_IWbemObjectTextSrc,
1064     0xbfbf883a, 0xcad7, 0x11d3, 0xa1, 0x1b, 0x00, 0x10, 0x5a, 0x1f, 0x51, 0x5a}
1065 RIDL!{#[uuid(0xbfbf883a, 0xcad7, 0x11d3, 0xa1, 0x1b, 0x00, 0x10, 0x5a, 0x1f, 0x51, 0x5a)]
1066 interface IWbemObjectTextSrc(IWbemObjectTextSrcVtbl): IUnknown(IUnknownVtbl) {
1067     fn GetText(
1068         lFlags: c_long,
1069         pObj: *mut IWbemClassObject,
1070         uObjTextFormat: ULONG,
1071         pCtx: *mut IWbemContext,
1072         strText: *mut BSTR,
1073     ) -> HRESULT,
1074     fn CreateFromText(
1075         lFlags: c_long,
1076         strText: BSTR,
1077         uObjTextFormat: ULONG,
1078         pCtx: *mut IWbemContext,
1079         pNewObj: *mut *mut IWbemClassObject,
1080     ) -> HRESULT,
1081 }}
1082 STRUCT!{struct WBEM_COMPILE_STATUS_INFO {
1083     lPhaseError: c_long,
1084     hRes: HRESULT,
1085     ObjectNum: c_long,
1086     FirstLine: c_long,
1087     LastLine: c_long,
1088     dwOutFlags: DWORD,
1089 }}
1090 ENUM!{enum WBEM_COMPILER_OPTIONS {
1091     WBEM_FLAG_CHECK_ONLY = 0x1,
1092     WBEM_FLAG_AUTORECOVER = 0x2,
1093     WBEM_FLAG_WMI_CHECK = 0x4,
1094     WBEM_FLAG_CONSOLE_PRINT = 0x8,
1095     WBEM_FLAG_DONT_ADD_TO_LIST = 0x10,
1096     WBEM_FLAG_SPLIT_FILES = 0x20,
1097     WBEM_FLAG_STORE_FILE = 0x100,
1098 }}
1099 ENUM!{enum WBEM_CONNECT_OPTIONS {
1100     WBEM_FLAG_CONNECT_REPOSITORY_ONLY = 0x40,
1101     WBEM_FLAG_CONNECT_USE_MAX_WAIT = 0x80,
1102     WBEM_FLAG_CONNECT_PROVIDERS = 0x100,
1103 }}
1104 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0013_v0_0_c_ifspec;
1105 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0013_v0_0_s_ifspec;
1106 // EXTERN_C const IID IID_IMofCompiler;
1107 DEFINE_GUID!{IID_IMofCompiler,
1108     0x6daf974e, 0x2e37, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
1109 RIDL!{#[uuid(0x6daf974e, 0x2e37, 0x11d2, 0xae, 0xc9, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
1110 interface IMofCompiler(IMofCompilerVtbl): IUnknown(IUnknownVtbl) {
1111     fn CompileFile(
1112         FileName: LPWSTR,
1113         ServerAndNamespace: LPWSTR,
1114         User: LPWSTR,
1115         Authority: LPWSTR,
1116         Password: LPWSTR,
1117         lOptionFlags: LONG,
1118         lClassFlags: LONG,
1119         lInstanceFlags: LONG,
1120         pInfo: *mut WBEM_COMPILE_STATUS_INFO,
1121     ) -> HRESULT,
1122     fn CompileBuffer(
1123         BuffSize: c_long,
1124         pBuffer: *mut BYTE,
1125         ServerAndNamespace: LPWSTR,
1126         User: LPWSTR,
1127         Authority: LPWSTR,
1128         Password: LPWSTR,
1129         lOptionFlags: LONG,
1130         lClassFlags: LONG,
1131         lInstanceFlags: LONG,
1132         pInfo: *mut WBEM_COMPILE_STATUS_INFO,
1133     ) -> HRESULT,
1134     fn CreateBMOF(
1135         TextFileName: LPWSTR,
1136         BMOFFileName: LPWSTR,
1137         ServerAndNamespace: LPWSTR,
1138         lOptionFlags: LONG,
1139         lClassFlags: LONG,
1140         lInstanceFlags: LONG,
1141         pInfo: *mut WBEM_COMPILE_STATUS_INFO,
1142     ) -> HRESULT,
1143 }}
1144 ENUM!{enum WBEM_UNSECAPP_FLAG_TYPE {
1145     WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS = 0,
1146     WBEM_FLAG_UNSECAPP_CHECK_ACCESS = 1,
1147     WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS = 2,
1148 }}
1149 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0015_v0_0_c_ifspec;
1150 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0015_v0_0_s_ifspec;
1151 ENUM!{enum WBEM_INFORMATION_FLAG_TYPE {
1152     WBEM_FLAG_SHORT_NAME = 0x1,
1153     WBEM_FLAG_LONG_NAME = 0x2,
1154 }}
1155 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0016_v0_0_c_ifspec;
1156 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0016_v0_0_s_ifspec;
1157 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0022_v0_0_c_ifspec;
1158 // extern RPC_IF_HANDLE __MIDL_itf_wbemcli_0000_0022_v0_0_s_ifspec;
1159 // unsigned c_long             __RPC_USER  BSTR_UserSize( __RPC__in unsigned c_long *, unsigned c_long            , __RPC__in BSTR * );
1160 // unsigned char * __RPC_USER  BSTR_UserMarshal( __RPC__in unsigned c_long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
1161 // unsigned char * __RPC_USER  BSTR_UserUnmarshal(__RPC__in unsigned c_long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
1162 // void                      __RPC_USER  BSTR_UserFree( __RPC__in unsigned c_long *, __RPC__in BSTR * );
1163 // unsigned c_long             __RPC_USER  VARIANT_UserSize( __RPC__in unsigned c_long *, unsigned c_long            , __RPC__in VARIANT * );
1164 // unsigned char * __RPC_USER  VARIANT_UserMarshal( __RPC__in unsigned c_long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
1165 // unsigned char * __RPC_USER  VARIANT_UserUnmarshal(__RPC__in unsigned c_long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
1166 // void                      __RPC_USER  VARIANT_UserFree( __RPC__in unsigned c_long *, __RPC__in VARIANT * );
1167 // unsigned c_long             __RPC_USER  BSTR_UserSize64( __RPC__in unsigned c_long *, unsigned c_long            , __RPC__in BSTR * );
1168 // unsigned char * __RPC_USER  BSTR_UserMarshal64( __RPC__in unsigned c_long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
1169 // unsigned char * __RPC_USER  BSTR_UserUnmarshal64(__RPC__in unsigned c_long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
1170 // void                      __RPC_USER  BSTR_UserFree64( __RPC__in unsigned c_long *, __RPC__in BSTR * );
1171 // unsigned c_long             __RPC_USER  VARIANT_UserSize64( __RPC__in unsigned c_long *, unsigned c_long            , __RPC__in VARIANT * );
1172 // unsigned char * __RPC_USER  VARIANT_UserMarshal64( __RPC__in unsigned c_long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
1173 // unsigned char * __RPC_USER  VARIANT_UserUnmarshal64(__RPC__in unsigned c_long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
1174 // void                      __RPC_USER  VARIANT_UserFree64( __RPC__in unsigned c_long *, __RPC__in VARIANT * );
1175