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.

4743 lines
128 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. WBEMINT.IDL
  5. Abstract:
  6. WMI Core Internal Interfaces
  7. History:
  8. --*/
  9. import "objidl.idl";
  10. import "oleidl.idl";
  11. import "oaidl.idl";
  12. import "wmiutils.idl";
  13. import "wbemtran.idl";
  14. import "wbemcli.idl";
  15. import "wbemprov.idl";
  16. typedef VARIANT WBEM_VARIANT;
  17. typedef [string] WCHAR* WBEM_WSTR;
  18. typedef [string] const WCHAR* WBEM_CWSTR;
  19. #define OPTIONAL in, unique
  20. //==============================================================================
  21. //
  22. // IWbemPropertySource
  23. //
  24. // Makes the object look like a property set to enable condition testing
  25. // (see IWbemCondition below). It is useful when a provider wants to test a
  26. // a condition without the expense of constructing IWbemClassObject.
  27. //
  28. // Used: by WBEMOM inside standard IWbemCondition implementation
  29. // Implemented: by providers who wish to check if their objects satisfy a
  30. // condition without constructing IWbemClassObjects.
  31. //
  32. //==============================================================================
  33. //
  34. // GetPropertyValue
  35. //
  36. // Retrieves the value of a property by name. In the case where embedded
  37. // objects may be present, the name can be a complex one, e.g.
  38. // "OldVersion.Manufacturer".
  39. //
  40. // PARAMETERS:
  41. //
  42. // WCHAR wszPropertyName The name of the property to retrieve
  43. // long lFlags Reserved. For future compatibility, use 0.
  44. // WBEM_VARIANT* pvValue Destination for the value of the property. The
  45. // caller must VariantClear it on success.
  46. // RETURNS:
  47. //
  48. // WBEM_S_NO_ERROR On Success
  49. // WBEM_E_NOT_FOUND No such property
  50. // WBEM_E_NOT_AVAILABLE The value is not available. Condition
  51. // evaluators should attempt to evaluate the
  52. // condition without it.
  53. // WBEM_E_FAILED Other critical error.
  54. //
  55. //==============================================================================
  56. interface _IWmiCoreHandle;
  57. interface _IWmiObject;
  58. typedef [v1_enum] enum tag_WBEM_GENERIC_FLAG_TYPE_INT
  59. {
  60. WBEM_FLAG_USE_SECURITY_DESCRIPTOR = 0x40000
  61. } WBEM_GENERIC_FLAG_TYPE_INT;
  62. typedef [v1_enum] enum tag_CIMTYPE_ENUMERATION_INT
  63. {
  64. CIM_IUNKNOWN = 104
  65. } CIMTYPE_ENUMERATION_INT;
  66. typedef enum
  67. {
  68. WBEM_NAME_ELEMENT_TYPE_PROPERTY = 0,
  69. WBEM_NAME_ELEMENT_TYPE_INDEX = 1
  70. } WBEM_NAME_ELEMENT_TYPE;
  71. typedef enum
  72. {
  73. WBEM_CONN_TYPE_ADMINISTRATIVE = 1, // Always conncts, doesnt add to client count
  74. WBEM_CONN_TYPE_UNAUTHENTICATED = 2, // User is check for access, doesnt add to client list
  75. } WBEM_CONNECTION_TYPE;
  76. typedef [v1_enum] enum tag_WBEM_GET_SYSTEM_OBJECTS_FLAG
  77. {
  78. GET_SYSTEM_STD_OBJECTS = 0x1, // the normal list of std classes
  79. GET_SYSTEM_SECURITY_OBJECTS = 0x2, // old root\security namespace classes
  80. GET_SYSTEM_ROOT_OBJECTS = 0x4, // root specific objects
  81. GET_SYSTEM_STD_INSTANCES = 0x8, // __systemSecurity and __thisnamespace
  82. } tag_WBEM_GET_SYSTEM_OBJECTS_FLAG;
  83. typedef [switch_type(short)] union tag_NameElementUnion
  84. {
  85. [case(WBEM_NAME_ELEMENT_TYPE_PROPERTY)] WBEM_WSTR m_wszPropertyName;
  86. [case(WBEM_NAME_ELEMENT_TYPE_INDEX)] long m_lArrayIndex;
  87. } WBEM_NAME_ELEMENT_UNION;
  88. typedef struct tag_NameElement
  89. {
  90. short m_nType;
  91. [switch_is(m_nType)] WBEM_NAME_ELEMENT_UNION Element;
  92. } WBEM_NAME_ELEMENT;
  93. typedef struct _tag_WbemPropertyName
  94. {
  95. long m_lNumElements;
  96. [size_is(m_lNumElements)] WBEM_NAME_ELEMENT* m_aElements;
  97. } WBEM_PROPERTY_NAME;
  98. [restricted, object, uuid(e2451054-b06e-11d0-ad61-00c04fd8fdff)]
  99. interface IWbemPropertySource : IUnknown
  100. {
  101. HRESULT GetPropertyValue(
  102. [in] WBEM_PROPERTY_NAME* pName,
  103. [in] long lFlags,
  104. [in, unique, out] WBEM_WSTR* pwszCimType,
  105. [out] WBEM_VARIANT* pvValue);
  106. HRESULT InheritsFrom([in] WBEM_CWSTR wszClassName);
  107. };
  108. //==============================================================================
  109. //
  110. // QL operators
  111. //
  112. //==============================================================================
  113. typedef enum _tag_Ql1ComparisonOperator
  114. {
  115. QL1_OPERATOR_NONE = 0,
  116. QL1_OPERATOR_EQUALS = 1,
  117. QL1_OPERATOR_NOTEQUALS,
  118. QL1_OPERATOR_GREATER,
  119. QL1_OPERATOR_LESS,
  120. QL1_OPERATOR_LESSOREQUALS,
  121. QL1_OPERATOR_GREATEROREQUALS,
  122. QL1_OPERATOR_LIKE,
  123. QL1_OPERATOR_UNLIKE,
  124. QL1_OPERATOR_ISA,
  125. QL1_OPERATOR_ISNOTA,
  126. QL1_OPERATOR_INV_ISA,
  127. QL1_OPERATOR_INV_ISNOTA,
  128. } WBEM_QL1_COMPARISON_OPERATOR;
  129. typedef enum _tag_Ql1Function
  130. {
  131. QL1_FUNCTION_NONE = 0,
  132. QL1_FUNCTION_UPPER,
  133. QL1_FUNCTION_LOWER
  134. } WBEM_QL1_FUNCTION;
  135. typedef enum _tag_Ql1TokenType
  136. {
  137. QL1_NONE = 0,
  138. QL1_OR = 1,
  139. QL1_AND,
  140. QL1_NOT,
  141. QL1_OP_EXPRESSION
  142. } WBEM_QL1_TOKEN_TYPE;
  143. typedef struct _tag_WbemQl1Token
  144. {
  145. long m_lTokenType; // WbemSql1TokenType
  146. WBEM_PROPERTY_NAME m_PropertyName;
  147. WBEM_PROPERTY_NAME m_PropertyName2;
  148. long m_lOperator; // WbemSql1ComparisonOperator
  149. WBEM_VARIANT m_vConstValue;
  150. long m_lPropertyFunction; // WbemSql1Function
  151. long m_lConstFunction; // WbemSql1Function
  152. long m_bQuoted;
  153. long m_bPropComp;
  154. } WBEM_QL1_TOKEN;
  155. typedef struct _tag_WbemQl1Tolerance
  156. {
  157. boolean m_bExact;
  158. double m_fTolerance;
  159. } WBEM_QL1_TOLERANCE;
  160. typedef enum tag_WBEM_EVENT_TYPE{
  161. WBEM_EVENTTYPE_Invalid = 0,
  162. WBEM_EVENTTYPE_Extrinsic = 5,
  163. WBEM_EVENTTYPE_Timer,
  164. WBEM_EVENTTYPE_NamespaceCreation,
  165. WBEM_EVENTTYPE_NamespaceDeletion,
  166. WBEM_EVENTTYPE_NamespaceModification,
  167. WBEM_EVENTTYPE_ClassCreation,
  168. WBEM_EVENTTYPE_ClassDeletion,
  169. WBEM_EVENTTYPE_ClassModification,
  170. WBEM_EVENTTYPE_InstanceCreation,
  171. WBEM_EVENTTYPE_InstanceDeletion,
  172. WBEM_EVENTTYPE_InstanceModification,
  173. WBEM_EVENTTYPE_System
  174. } WBEM_EVENT_TYPE;
  175. typedef enum tag_WBEM_HOOK_FLAGS
  176. {
  177. WBEM_FLAG_INST_PUT = 1 ,
  178. WBEM_FLAG_INST_DELETE = 2 ,
  179. WBEM_FLAG_CLASS_PUT = 4 ,
  180. WBEM_FLAG_CLASS_DELETE = 8
  181. } WBEM_HOOK_FLAGS ;
  182. typedef [v1_enum] enum tag_WMI_THREAD_SECURITY_ORIGIN
  183. {
  184. WMI_ORIGIN_UNDEFINED = 0x0,
  185. WMI_ORIGIN_RPC = 0x1, // Obtain token from RPC server security
  186. WMI_ORIGIN_THREAD = 0x2, // Obtain token from thread/process
  187. WMI_ORIGIN_EXISTING = 0x4 // Obtain token from existing internal server security
  188. } WMI_THREAD_SECURITY_ORIGIN ;
  189. typedef [v1_enum] enum tag_WMI_CORE_HANDLE
  190. {
  191. WMI_HANDLE_TASK = 0x1,
  192. WMI_HANDLE_USER = 0x2,
  193. WMI_HANDLE_THREAD_SECURITY = 0x3
  194. } WMI_CORE_HANDLE ;
  195. typedef enum tag_WMI_TASK_TYPE
  196. {
  197. WMICORE_TASK_NULL = 0,
  198. WMICORE_TASK_GET_OBJECT = 1,
  199. WMICORE_TASK_GET_INSTANCE = 2,
  200. WMICORE_TASK_PUT_INSTANCE = 3,
  201. WMICORE_TASK_DELETE_INSTANCE = 4,
  202. WMICORE_TASK_ENUM_INSTANCES = 5,
  203. WMICORE_TASK_GET_CLASS = 6,
  204. WMICORE_TASK_PUT_CLASS = 7,
  205. WMICORE_TASK_DELETE_CLASS = 8,
  206. WMICORE_TASK_ENUM_CLASSES = 9,
  207. WMICORE_TASK_EXEC_QUERY = 10,
  208. WMICORE_TASK_EXEC_METHOD = 11,
  209. WMICORE_TASK_OPEN = 12,
  210. WMICORE_TASK_OPEN_SCOPE = 13,
  211. WMICORE_TASK_OPEN_NAMESPACE = 14,
  212. WMICORE_TASK_OPEN_COLLECTION = 15,
  213. WMICORE_TASK_ADD = 16,
  214. WMICORE_TASK_REMOVE = 17,
  215. WMICORE_TASK_REFRESH_OBJECT = 18,
  216. WMICORE_TASK_RENAME_OBJECT = 19,
  217. WMICORE_TASK_ATOMIC_DYN_INST_GET = 20,
  218. WMICORE_TASK_ATOMIC_DYN_INST_ENUM = 21,
  219. WMICORE_TASK_ATOMIC_DYN_INST_QUERY = 22,
  220. WMICORE_TASK_ATOMIC_DYN_INST_PUT = 23,
  221. WMICORE_TASK_DYN_CLASS_ENUM = 24,
  222. WMICORE_TASK_EXEC_NOTIFICATION_QUERY = 25,
  223. // Bit mask ORed with above values.
  224. // ================================
  225. WMICORE_TASK_TYPE_SYNC = 0x01000000,
  226. WMICORE_TASK_TYPE_SEMISYNC = 0x02000000,
  227. WMICORE_TASK_TYPE_ASYNC = 0x04000000,
  228. WMICORE_TASK_TYPE_PRIMARY = 0x10000000,
  229. WMICORE_TASK_TYPE_SUBTASK = 0x20000000,
  230. WMICORE_TASK_TYPE_DEPENDENT = 0x40000000
  231. } WMI_TASK_TYPE;
  232. typedef enum tag_WMICORE_TASK_STATUS
  233. {
  234. WMICORE_TASK_STATUS_NEW = 1, // Uncommitted
  235. WMICORE_TASK_STATUS_VALIDATED, // Added to task list
  236. WMICORE_TASK_STATUS_SUSPENDED, // Asleep
  237. WMICORE_TASK_STATUS_EXECUTING, // Busy
  238. WMICORE_TASK_STATUS_WAITING_ON_SUBTASKS, // Waiting for subtasks
  239. WMICORE_TASK_STATUS_TIMED_OUT, // Failed
  240. WMICORE_TASK_STATUS_CORE_COMPLETED, // Successful
  241. WMICORE_TASK_STATUS_CLIENT_COMPLETED,
  242. WMICORE_TASK_STATUS_CANCELLED, // Cancelled
  243. WMICORE_TASK_STATUS_FAILED // Failed with error
  244. } WMICORE_TASK_STATUS;
  245. typedef [v1_enum] enum tag_WBEM_NOTIFICATION_FLAG_TYPE
  246. {
  247. WBEM_FLAG_MONITOR = 0x800
  248. } WBEM_NOTIFICATION_FLAG_TYPE;
  249. typedef [v1_enum] enum tag_WBEM_CONNECT
  250. {
  251. WBEM_FLAG_CREDENTIALS_SPECIFIED = 0x1,
  252. WBEM_FLAG_CONNECT_SETUP_MODE = 0x2,
  253. WBEM_FLAG_CONNECT_CIM_COMPLIANCE_MODE = 0x4,
  254. WBEM_FLAG_OPEN_COLLECTION = 0x10,
  255. WBEM_FLAG_OPEN_SCOPE = 0x20,
  256. WBEM_FLAG_OPEN_NESTED_ONLY = 0x40,
  257. WBEM_FLAG_OPEN_NAMESPACE = 0x80,
  258. WBEM_FLAG_OPEN_VECTOR = 0x100,
  259. WBEM_FLAG_OPEN_ALLOW_NS_TRAVERSAL = 0x200,
  260. WBEM_FLAG_OPEN_ALLOW_MACHINE_TRAVERSAL = 0x400,
  261. } WBEM_CONNECT_FLAG_TYPE;
  262. typedef [v1_enum] enum tag_WBEM_GET_FLAGS
  263. {
  264. WBEM_FLAG_GET_DEFAULT = 0x0,
  265. WBEM_FLAG_SPAWN_INSTANCE = 0x1
  266. } WBEM_GET_FLAGS;
  267. typedef [v1_enum] enum tag_WBEM_PUT_FLAGS
  268. {
  269. WBEM_FLAG_USE_CURRENT_TIME = 0x1,
  270. } WBEM_PUT_FLAGS;
  271. typedef [v1_enum] enum tag_WBEM_PUTEX_FLAGS
  272. {
  273. WBEM_FLAG_PUTEX_APPEND = 0x0,
  274. WBEM_FLAG_PUTEX_INSERTAT = 0x1,
  275. WBEM_MASK_PUTEX_OPERATION = 0x1
  276. } WBEM_PUTEX_FLAGS;
  277. typedef [v1_enum] enum tag_WBEM_DELETEEX_FLAGS
  278. {
  279. WBEM_FLAG_PUTEX_DELETE = 0x0,
  280. WBEM_FLAG_PUTEX_DELETE_FIRST_MATCH = 0x1,
  281. WBEM_FLAG_DELETE_ALL_MATCHES = 0x2,
  282. WBEM_MASK_DELETEEX_OPERATION = 0x2
  283. } WBEM_DELETEEX_FLAGS;
  284. typedef [v1_enum] enum tag_WBEM_MULTI_FLAG
  285. {
  286. WBEM_MULTI_FLAG_NO_OP = 0x0,
  287. WBEM_MULTI_FLAG_ARRAY_ALL = 0x1,
  288. WBEM_MULTI_FLAG_ARRAY_SUBRANGE = 0x2
  289. } WBEM_MULTI_FLAG;
  290. typedef [v1_enum] enum tag_WBEMINTERNALSTATUS
  291. {
  292. // Non-error status codes.
  293. // ~~~~~~~~~~~~~~~~~~~~~~
  294. WBEM_S_ARB_NOTHROTTLING = 0x41000,
  295. // Errors.
  296. // ~~~~~~~
  297. WBEM_E_ARB_THROTTLE = 0x80043001,
  298. WBEM_E_ARB_CANCEL = 0x80043002,
  299. WBEM_E_CALL_CANCELLED_CLIENT = 0x80043003
  300. } WBEMINTERNALSTATUS;
  301. typedef struct _tag_WmiInternalContext
  302. {
  303. unsigned __int64 m_IdentifyHandle ;
  304. unsigned long m_ProcessIdentifier ;
  305. } WmiInternalContext ;
  306. [object, restricted, uuid(c1e2d758-cabd-11d3-a11b-00105a1f515a)]
  307. interface IWbemCallResultEx : IWbemCallResult
  308. {
  309. HRESULT GetResult(
  310. [in] long lTimeout,
  311. [in] long lFlags,
  312. [in] REFIID riid,
  313. [out, iid_is(riid)] void **ppvResult
  314. );
  315. };
  316. [object, restricted, uuid(dd0be256-50dc-48a8-9866-b559f279d0f6)]
  317. interface IWbemObjectSinkEx : IWbemObjectSink
  318. {
  319. HRESULT Set(
  320. [in] long lFlags,
  321. [in] REFIID riid,
  322. [in, iid_is(riid)] void *pComObject
  323. );
  324. };
  325. [object, local, uuid(180d6598-e042-4b71-b0a2-6e2d16daf293)]
  326. interface IWbemConnection : IUnknown
  327. {
  328. HRESULT Open(
  329. [in] const BSTR strObject,
  330. [in] const BSTR strUser,
  331. [in] const BSTR strPassword,
  332. [in] const BSTR strLocale,
  333. [in] long lFlags,
  334. [in] IWbemContext *pCtx,
  335. [in] REFIID riid,
  336. [out, iid_is(riid)] void **pInterface,
  337. [out] IWbemCallResultEx **pCallRes
  338. );
  339. HRESULT OpenAsync(
  340. [in] const BSTR strObject,
  341. [in] const BSTR strUser,
  342. [in] const BSTR strPassword,
  343. [in] const BSTR strLocale,
  344. [in] long lFlags,
  345. [in] IWbemContext *pCtx,
  346. [in] REFIID riid,
  347. [in] IWbemObjectSinkEx *pResponseHandler
  348. );
  349. HRESULT Cancel(
  350. [in] long lFlags,
  351. [in] IWbemObjectSinkEx *pHandler
  352. );
  353. };
  354. [object, restricted, local, uuid(0E130F89-81D9-4386-B3BE-092651D04588)]
  355. interface IWbemClassObjectEx : IUnknown
  356. {
  357. HRESULT PutEx(
  358. [in] LPCWSTR wszName,
  359. [in] long lFlags,
  360. [in] VARIANT* pvFilter,
  361. [in] VARIANT* pvInVals
  362. );
  363. HRESULT DeleteEx(
  364. [in] LPCWSTR wszName,
  365. [in] long lFlags,
  366. [in] VARIANT* pvFilter,
  367. [in] VARIANT* pvInVals
  368. );
  369. HRESULT GetEx(
  370. [in] LPCWSTR wszName,
  371. [in] long lFlags,
  372. [in] VARIANT* pvFilter,
  373. [in] VARIANT* pvInVals,
  374. [out,OPTIONAL] CIMTYPE* pCimType,
  375. [out,OPTIONAL] long* plFlavor
  376. );
  377. };
  378. [object, restricted, uuid(6D54E7AD-7583-4d53-BC14-CE2678F73DB3), pointer_default(unique)]
  379. interface IWbemServicesEx : IWbemServices
  380. {
  381. // Opening namespaces, scopes, collections
  382. // =======================================
  383. HRESULT Open(
  384. [in] const BSTR strScope,
  385. [in] const BSTR strSelector,
  386. [in] long lFlags,
  387. [in] IWbemContext* pCtx,
  388. [out, OPTIONAL] IWbemServicesEx** ppScope,
  389. [out, OPTIONAL] IWbemCallResultEx** ppResult
  390. );
  391. HRESULT OpenAsync(
  392. [in] const BSTR strScope,
  393. [in] const BSTR strSelector,
  394. [in] long lFlags,
  395. [in] IWbemContext* pCtx,
  396. [in] IWbemObjectSinkEx *pResponseHandler
  397. );
  398. // Association linking/unlinking
  399. // =============================
  400. HRESULT Add(
  401. [in] const BSTR strObjectPath,
  402. [in] long lFlags,
  403. [in] IWbemContext* pCtx,
  404. [out, OPTIONAL] IWbemCallResultEx** ppCallResult
  405. );
  406. HRESULT AddAsync(
  407. [in] const BSTR strObjectPath,
  408. [in] long lFlags,
  409. [in] IWbemContext* pCtx,
  410. [in] IWbemObjectSink* pResponseHandler
  411. );
  412. HRESULT Remove(
  413. [in] const BSTR strObjectPath,
  414. [in] long lFlags,
  415. [in] IWbemContext* pCtx,
  416. [out, OPTIONAL] IWbemCallResultEx** ppCallResult
  417. );
  418. HRESULT RemoveAsync(
  419. [in] const BSTR strObjectPath,
  420. [in] long lFlags,
  421. [in] IWbemContext* pCtx,
  422. [in] IWbemObjectSink* pResponseHandler
  423. );
  424. // Refresh, rename
  425. // ===============
  426. HRESULT RefreshObject(
  427. [in, out] IWbemClassObject **pTarget,
  428. [in] long lFlags,
  429. [in] IWbemContext* pCtx,
  430. [out, OPTIONAL] IWbemCallResultEx** ppCallResult
  431. );
  432. HRESULT RefreshObjectAsync(
  433. [in, out] IWbemClassObject **pTarget,
  434. [in] long lFlags,
  435. [in] IWbemContext* pCtx,
  436. [in] IWbemObjectSinkEx* pResponseHandler
  437. );
  438. HRESULT RenameObject(
  439. [in] const BSTR strOldObjectPath,
  440. [in] const BSTR strNewObjectPath,
  441. [in] long lFlags,
  442. [in] IWbemContext* pCtx,
  443. [out, OPTIONAL] IWbemCallResultEx** ppCallResult
  444. );
  445. HRESULT RenameObjectAsync(
  446. [in] const BSTR strOldObjectPath,
  447. [in] const BSTR strNewObjectPath,
  448. [in] long lFlags,
  449. [in] IWbemContext* pCtx,
  450. [in] IWbemObjectSink* pResponseHandler
  451. );
  452. HRESULT DeleteObject(
  453. [in] const BSTR strObjectPath,
  454. [in] long lFlags,
  455. [in] IWbemContext* pCtx,
  456. [out, OPTIONAL] IWbemCallResult** ppCallResult
  457. );
  458. HRESULT DeleteObjectAsync(
  459. [in] const BSTR strObjectPath,
  460. [in] long lFlags,
  461. [in] IWbemContext* pCtx,
  462. [in] IWbemObjectSink* pResponseHandler
  463. );
  464. HRESULT PutObject(
  465. [in] IWbemClassObject* pObj,
  466. [in] long lFlags,
  467. [in] IWbemContext* pCtx,
  468. [out, OPTIONAL] IWbemCallResult** ppCallResult
  469. );
  470. HRESULT PutObjectAsync(
  471. [in] IWbemClassObject* pObj,
  472. [in] long lFlags,
  473. [in] IWbemContext* pCtx,
  474. [in] IWbemObjectSink* pResponseHandler
  475. );
  476. };
  477. midl_pragma warning ( default : 2456 )
  478. [object, restricted, local, uuid(B4AF2F3C-5FE3-405e-8A9F-D275E3079F6D), pointer_default(unique)]
  479. interface IWbemInitComBinding : IUnknown
  480. {
  481. HRESULT Initialize(
  482. [in] ULONG ulFlags,
  483. [in] IWbemServicesEx *pSvcEx,
  484. [in] IWbemContext *pCtx,
  485. [in] IWbemClassObject *pObject
  486. );
  487. }
  488. [object, restricted, local, uuid(974CAB5F-D7FD-4c52-958F-E3D94D6CB505), pointer_default(unique)]
  489. interface IWbemComBinding : IUnknown
  490. {
  491. // Returns all matching CLSIDs for requested IID as array of BSTRs
  492. HRESULT GetCLSIDArrayForIID(
  493. [in] IWbemServicesEx*pSvcEx,
  494. [in] IWbemClassObject* pObject,
  495. [in] REFIID riid,
  496. [in] long lFlags,
  497. [in] IWbemContext* pCtx,
  498. [out] SAFEARRAY(BSTR) *pArray
  499. );
  500. // Gets the requested object and creates the supplied CLSID, requesting
  501. // the specified interface, and returning that in pObj
  502. HRESULT BindComObject(
  503. [in] IWbemServicesEx *pSvcEx,
  504. [in] IWbemClassObject* pObject,
  505. [in] CLSID ClsId,
  506. [in] IWbemContext *pCtx,
  507. [in] long lFlags,
  508. [in] IUnknown *pUnkOuter,
  509. [in] DWORD dwClsCntxt,
  510. [in] REFIID riid,
  511. [out, iid_is(riid)] LPVOID *pInterface
  512. );
  513. // Provides DISPIDs for Names and the CLSID for the object that supports them
  514. // Returned as a SAFEARRAY of IUnknowns.
  515. HRESULT GetCLSIDArrayForNames(
  516. [in] IWbemServicesEx *pSvcEx,
  517. [in] IWbemClassObject* pObject,
  518. [in, size_is(cNames)] LPCWSTR * rgszNames,
  519. [in] UINT cNames,
  520. [in] LCID lcid,
  521. [in] IWbemContext* pCtx,
  522. [in] long lFlags,
  523. [out] SAFEARRAY(IUnknown*) *pArray
  524. );
  525. };
  526. //==============================================================================
  527. //==============================================================================
  528. //
  529. // Event-provider specific interfaces.
  530. //
  531. //==============================================================================
  532. //==============================================================================
  533. [restricted, object, local, uuid(a658b5d6-021d-11d1-ad74-00c04fd8fdff)]
  534. interface IWbemDecorator : IUnknown
  535. {
  536. HRESULT DecorateObject([in] IWbemClassObject* pObject,
  537. WBEM_CWSTR wszNamespace);
  538. HRESULT UndecorateObject([in] IWbemClassObject* pObject);
  539. };
  540. [restricted, object, local, uuid(a658b6d6-021d-11d1-ad74-00c04fd8fdff)]
  541. interface IWbemLifeControl : IUnknown
  542. {
  543. HRESULT AddRefCore();
  544. HRESULT ReleaseCore();
  545. };
  546. [restricted, object, uuid(a553f3f0-3805-11d0-b6b2-00aa003240c7)]
  547. interface IWbemEventSubsystem_m4 : IUnknown
  548. {
  549. HRESULT ProcessInternalEvent(
  550. [in] LONG lSendType,
  551. [in] LPCWSTR strReserved1,
  552. [in] LPCWSTR strReserved2,
  553. [in] LPCWSTR strGuidParam,
  554. [in] unsigned long dwReserved1,
  555. [in] unsigned long dwReserved2,
  556. [in] unsigned long dwNumObjects,
  557. [in, size_is(dwNumObjects)] _IWmiObject** apObjects,
  558. [in] IWbemContext* pContext
  559. );
  560. HRESULT VerifyInternalEvent(
  561. [in] LONG lSendType,
  562. [in] LPCWSTR strReserved1,
  563. [in] LPCWSTR strReserved2,
  564. [in] LPCWSTR strReserved3,
  565. [in] unsigned long dwReserved1,
  566. [in] unsigned long dwReserved2,
  567. [in] unsigned long dwNumObjects,
  568. [in, size_is(dwNumObjects)] _IWmiObject** apObjects,
  569. [in] IWbemContext* pContext
  570. );
  571. HRESULT RegisterNotificationSink(
  572. [in] LPCWSTR wszNamespace,
  573. [in] LPCWSTR wszQueryLanguage,
  574. [in] LPCWSTR wszQuery,
  575. [in] long lFlags,
  576. [in] IWbemContext* pContext,
  577. [in] IWbemObjectSink* pSink
  578. );
  579. HRESULT RemoveNotificationSink(
  580. [in] IWbemObjectSink* pSink);
  581. HRESULT GetNamespaceSink(
  582. [in] LPCWSTR wszNamespace,
  583. [out] IWbemObjectSink** ppNamespaceSink
  584. );
  585. HRESULT Initialize(
  586. [in] LPCWSTR wszServerName,
  587. [in] IWbemLocator* pAdminLocator,
  588. [in] IUnknown* pServices)
  589. ;
  590. HRESULT Shutdown();
  591. HRESULT LastCallForCore([in] LONG lSystemShutDown);
  592. };
  593. [object, restricted, uuid(6c19be32-7500-11d1-ad94-00c04fd8fdff)]
  594. interface IWbemMetaData : IUnknown
  595. {
  596. HRESULT GetClass(
  597. [in, string] LPCWSTR wszClassName,
  598. [in] IWbemContext* pContext,
  599. [out] IWbemClassObject** ppClass);
  600. };
  601. typedef DWORD WBEM_REMOTE_TARGET_ID_TYPE;
  602. typedef struct tag_WBEM_REM_TARGETS
  603. {
  604. long m_lNumTargets;
  605. [size_is(m_lNumTargets)] WBEM_REMOTE_TARGET_ID_TYPE* m_aTargets;
  606. } WBEM_REM_TARGETS;
  607. [object, restricted, uuid(755f9da6-7508-11d1-ad94-00c04fd8fdff)]
  608. interface IWbemMultiTarget : IUnknown
  609. {
  610. HRESULT DeliverEvent(
  611. [in] ULONG dwNumEvents,
  612. [in, size_is(dwNumEvents)] IWbemClassObject** aEvents,
  613. [in, size_is(dwNumEvents)] WBEM_REM_TARGETS* aTargets,
  614. [in] long lSDLength,
  615. [in, size_is(lSDLength)] BYTE* pSD);
  616. HRESULT DeliverStatus(
  617. [in] long lFlags,
  618. [in] HRESULT hresStatus,
  619. [in, string] LPCWSTR wszStatus,
  620. [in] IWbemClassObject* pErrorObj,
  621. [in] WBEM_REM_TARGETS* pTargets,
  622. [in] long lSDLength,
  623. [in, size_is(lSDLength)] BYTE* pSD);
  624. };
  625. [object, restricted, uuid(755f9da7-7508-11d1-ad94-00c04fd8fdff)]
  626. interface IWbemEventProviderRequirements : IUnknown
  627. {
  628. HRESULT DeliverProviderRequest(
  629. [in] long lFlags);
  630. };
  631. // Smart MultiTarget Interface for removal of redundant
  632. // class data
  633. [object, restricted, uuid(37196B38-CCCF-11d2-B35C-00105A1F8177)]
  634. interface IWbemSmartMultiTarget : IUnknown
  635. {
  636. HRESULT DeliverEvent(
  637. [in] ULONG dwNumEvents,
  638. [in] ULONG dwBuffSize,
  639. [in, size_is(dwBuffSize)] byte* pBuffer,
  640. [in, size_is(dwNumEvents)] WBEM_REM_TARGETS* pTargets,
  641. [in] long lSDLength,
  642. [in, size_is(lSDLength)] BYTE* pSD);
  643. };
  644. //
  645. // IWbemFetchSmartMultiTarget
  646. //
  647. // This Interface is used to return a smart multi-target. It assists
  648. // us when we need to get an enumerator but want to do so without
  649. // causing AddRef problem with the Proxy Manager.
  650. //
  651. [restricted, object, uuid(37196B39-CCCF-11d2-B35C-00105A1F8177)]
  652. interface IWbemFetchSmartMultiTarget : IUnknown
  653. {
  654. HRESULT GetSmartMultiTarget(
  655. [out] IWbemSmartMultiTarget** ppSmartMultiTarget
  656. );
  657. };
  658. /* NO LONGER SUPPORTED AS OF M3
  659. typedef enum tag_WBEM_FILTER_TARGET_TYPE
  660. {
  661. WBEM_FILTER_TARGET_TYPE_NONE,
  662. WBEM_FILTER_TARGET_TYPE_INTERNAL,
  663. WBEM_FILTER_TARGET_TYPE_MARSHALLED,
  664. WBEM_FILTER_TARGET_TYPE_LOADABLE,
  665. } WBEM_FILTER_TARGET_TYPE;
  666. typedef struct tag_WBEM_FILTER_TARGET_LOAD_INFO
  667. {
  668. CLSID m_clsidConsumerProvider;
  669. IWbemClassObject* m_pLogicalConsumer;
  670. IWbemUnboundObjectSink* m_pCached;
  671. } WBEM_FILTER_TARGET_LOAD_INFO;
  672. typedef struct tag_WBEM_FILTER_TARGET_MARSHALLED_INFO
  673. {
  674. IWbemUnboundObjectSink* m_pSink;
  675. IWbemClassObject* m_pLogicalConsumer;
  676. } WBEM_FILTER_TARGET_MARSHALLED_INFO;
  677. typedef [switch_type(long)] union tag_WBEM_FILTER_TARGET_DATA
  678. {
  679. [case(WBEM_FILTER_TARGET_TYPE_INTERNAL)]
  680. WBEM_REMOTE_TARGET_ID_TYPE m_ID;
  681. [case(WBEM_FILTER_TARGET_TYPE_MARSHALLED)]
  682. WBEM_FILTER_TARGET_MARSHALLED_INFO m_MarshInfo;
  683. [case(WBEM_FILTER_TARGET_TYPE_LOADABLE)]
  684. WBEM_FILTER_TARGET_LOAD_INFO m_LoadInfo;
  685. [default]
  686. ;
  687. } WBEM_FILTER_TARGET_DATA;
  688. typedef struct tag_WBEM_FILTER_TARGET
  689. {
  690. long m_lType;
  691. [switch_is(m_lType)] WBEM_FILTER_TARGET_DATA m_Data;
  692. boolean m_bSynch;
  693. } WBEM_FILTER_TARGET;
  694. typedef struct tag_WBEM_FILTER_TARGETS
  695. {
  696. long m_lNumTargets;
  697. [size_is(m_lNumTargets)] WBEM_FILTER_TARGET* m_aTargets;
  698. } WBEM_FILTER_TARGETS;
  699. */
  700. [object, restricted, uuid(60e512d4-c47b-11d2-b338-00105a1f4aaf)]
  701. interface IWbemFilterProxy : IUnknown
  702. {
  703. HRESULT Initialize(
  704. [in] IWbemMetaData* pMetaData,
  705. [in] IWbemMultiTarget* pMultiTarget);
  706. HRESULT Lock();
  707. HRESULT Unlock();
  708. HRESULT AddFilter(
  709. [in] IWbemContext* pContext,
  710. [in, string] LPCWSTR wszQuery,
  711. [in] WBEM_REMOTE_TARGET_ID_TYPE Id);
  712. HRESULT RemoveFilter(
  713. [in] IWbemContext* pContext,
  714. [in] WBEM_REMOTE_TARGET_ID_TYPE Id);
  715. HRESULT RemoveAllFilters(
  716. [in] IWbemContext* pContext);
  717. HRESULT AddDefinitionQuery(
  718. [in] IWbemContext* pContext,
  719. [in] LPCWSTR wszQuery);
  720. HRESULT RemoveAllDefinitionQueries(
  721. [in] IWbemContext* pContext);
  722. //
  723. // Only allow utilization of the guarantee if the proxy's definition
  724. // matches the provider's definition. In other words, only when
  725. // the provider's registration has been successfully processed,
  726. // and the proxies are set up to reflect it, should utilization of
  727. // the guarantee be allowed. The reason for this is that an incomplete
  728. // source definition can cause bad things to happen when events are
  729. // evaluated using a filter that was optimized for that definition.
  730. //
  731. HRESULT AllowUtilizeGuarantee();
  732. HRESULT Disconnect();
  733. };
  734. interface IWbemFilterStub;
  735. [object, local, uuid(dddaa3dc-2907-41ad-9e74-a91b5af092d4)]
  736. interface IWbemLocalFilterProxy : IWbemFilterProxy
  737. {
  738. HRESULT SetStub(
  739. [in] IWbemFilterStub* pStub);
  740. HRESULT LocalAddFilter(
  741. [in] IWbemContext* pContext,
  742. [in, string] LPCWSTR wszQuery,
  743. [in] void* pParsedQuery,
  744. [in] WBEM_REMOTE_TARGET_ID_TYPE Id);
  745. HRESULT GetMainSink(
  746. [out] IWbemEventSink** ppSink);
  747. };
  748. [object, restricted, uuid(6c19be34-7500-11d1-ad94-00c04fd8fdff)]
  749. interface IWbemFilterStub : IUnknown
  750. {
  751. HRESULT RegisterProxy(
  752. [in] IWbemFilterProxy* pProxy);
  753. HRESULT UnregisterProxy(
  754. [in] IWbemFilterProxy* pProxy);
  755. };
  756. typedef GUID REQUESTID;
  757. [restricted, object, uuid(a57be31e-efe3-11d0-ad71-00c04fd8fdff)]
  758. interface IWbemCausalityAccess : IUnknown
  759. {
  760. HRESULT GetRequestId([out] REQUESTID* pId);
  761. HRESULT IsChildOf([in] REQUESTID Id);
  762. HRESULT CreateChild([out] IWbemCausalityAccess** ppChild);
  763. HRESULT GetParentId([out] REQUESTID* pId);
  764. HRESULT GetHistoryInfo([out] long* plNumParents, [out] long* plNumSiblings);
  765. HRESULT MakeSpecial();
  766. HRESULT IsSpecial();
  767. };
  768. //==============================================================================
  769. //==============================================================================
  770. //
  771. // Hi-perf specific interfaces.
  772. //
  773. //==============================================================================
  774. //==============================================================================
  775. interface _IWbemRefresherMgr;
  776. // Client and server side version
  777. typedef enum _WBEM_REFR_VERSION_NUMBER
  778. {
  779. WBEM_REFRESHER_VERSION = 2
  780. } WBEM_REFR_VERSION_NUMBER;
  781. typedef enum _WBEM_INSTANCE_BLOB_TYPE
  782. {
  783. WBEM_BLOB_TYPE_DATA_TABLE_ONLY,
  784. WBEM_BLOB_TYPE_DATA_AND_HEAP,
  785. WBEM_BLOB_TYPE_ALL,
  786. WBEM_BLOB_TYPE_ERROR, // m_lBlobLength contains error code
  787. WBEM_BLOB_TYPE_ENUM
  788. } WBEM_INSTANCE_BLOB_TYPE;
  789. typedef struct _WBEM_REFRESHED_OBJECT
  790. {
  791. long m_lRequestId;
  792. long m_lBlobType;
  793. long m_lBlobLength;
  794. [size_is(m_lBlobLength)] byte* m_pbBlob;
  795. } WBEM_REFRESHED_OBJECT;
  796. [restricted, uuid(F1E9C5B2-F59B-11d2-B362-00105A1F8177)]
  797. interface IWbemRemoteRefresher : IUnknown
  798. {
  799. HRESULT RemoteRefresh(
  800. [in] long lFlags,
  801. [out] long* plNumObjects,
  802. [out, size_is(,*plNumObjects)] WBEM_REFRESHED_OBJECT** paObjects);
  803. HRESULT StopRefreshing(
  804. [in] long lNumIds,
  805. [in,size_is(lNumIds)] long* aplIds,
  806. [in] long lFlags);
  807. HRESULT GetGuid(
  808. [in] long lFlags,
  809. [out] GUID* pGuid );
  810. };
  811. typedef struct _WBEM_REFRESH_DIRECT_NAMES
  812. {
  813. [string] WCHAR* m_wszNamespace;
  814. [string] WCHAR* m_wszProviderName;
  815. } WBEM_REFRESH_DIRECT_NAMES;
  816. typedef struct _WBEM_REFRESH_INFO_CLIENT_LOADABLE
  817. {
  818. CLSID m_clsid;
  819. [string] WCHAR* m_wszNamespace;
  820. IWbemObjectAccess* m_pTemplate;
  821. } WBEM_REFRESH_INFO_CLIENT_LOADABLE;
  822. typedef struct _WBEM_REFRESH_INFO_REMOTE
  823. {
  824. IWbemRemoteRefresher* m_pRefresher;
  825. IWbemObjectAccess* m_pTemplate;
  826. GUID m_guid;
  827. } WBEM_REFRESH_INFO_REMOTE;
  828. typedef struct _WBEM_REFRESH_INFO_SHARED
  829. {
  830. [string] WCHAR* m_wszSharedMemoryName;
  831. IWbemRefresher* m_pRefresher;
  832. } WBEM_REFRESH_INFO_SHARED;
  833. typedef struct _WBEM_REFRESH_INFO_CONTINUOUS
  834. {
  835. [string] WCHAR* m_wszSharedMemoryName;
  836. } WBEM_REFRESH_INFO_CONTINUOUS;
  837. typedef struct _WBEM_REFRESH_INFO_DIRECT
  838. {
  839. CLSID m_clsid;
  840. WBEM_REFRESH_DIRECT_NAMES* m_pDirectNames;
  841. IWbemObjectAccess* m_pTemplate;
  842. _IWbemRefresherMgr* m_pRefrMgr;
  843. } WBEM_REFRESH_INFO_DIRECT;
  844. typedef struct _WBEM_REFRESH_INFO_NON_HIPERF
  845. {
  846. [string] WCHAR* m_wszNamespace;
  847. IWbemObjectAccess* m_pTemplate;
  848. } WBEM_REFRESH_INFO_NON_HIPERF;
  849. typedef enum _WBEM_REFRESH_TYPE
  850. {
  851. WBEM_REFRESH_TYPE_INVALID,
  852. WBEM_REFRESH_TYPE_DIRECT,
  853. WBEM_REFRESH_TYPE_CLIENT_LOADABLE,
  854. WBEM_REFRESH_TYPE_REMOTE,
  855. WBEM_REFRESH_TYPE_SHARED,
  856. WBEM_REFRESH_TYPE_CONTINUOUS,
  857. WBEM_REFRESH_TYPE_NON_HIPERF
  858. } WBEM_REFRESH_TYPE;
  859. typedef enum _WBEM_RECONNECT_TYPE
  860. {
  861. WBEM_RECONNECT_TYPE_OBJECT,
  862. WBEM_RECONNECT_TYPE_ENUM,
  863. WBEM_RECONNECT_TYPE_LAST,
  864. } WBEM_RECONNECT_TYPE;
  865. typedef [switch_type(long)] union _WBEM_REFRESH_INFO_UNION
  866. {
  867. [case (WBEM_REFRESH_TYPE_CLIENT_LOADABLE)]
  868. WBEM_REFRESH_INFO_CLIENT_LOADABLE m_ClientLoadable;
  869. [case (WBEM_REFRESH_TYPE_REMOTE)]
  870. WBEM_REFRESH_INFO_REMOTE m_Remote;
  871. [case (WBEM_REFRESH_TYPE_SHARED)]
  872. WBEM_REFRESH_INFO_SHARED m_Shared;
  873. [case (WBEM_REFRESH_TYPE_CONTINUOUS)]
  874. WBEM_REFRESH_INFO_CONTINUOUS m_Continuous;
  875. [case (WBEM_REFRESH_TYPE_DIRECT)]
  876. WBEM_REFRESH_INFO_DIRECT m_Direct;
  877. [case (WBEM_REFRESH_TYPE_NON_HIPERF)]
  878. WBEM_REFRESH_INFO_NON_HIPERF m_NonHiPerf;
  879. [case (WBEM_REFRESH_TYPE_INVALID)]
  880. HRESULT m_hres;
  881. } WBEM_REFRESH_INFO_UNION;
  882. typedef struct _WBEM_REFRESH_INFO
  883. {
  884. long m_lType;
  885. [switch_is(m_lType)] WBEM_REFRESH_INFO_UNION m_Info;
  886. long m_lCancelId;
  887. } WBEM_REFRESH_INFO;
  888. typedef struct _WBEM_REFRESHER_ID
  889. {
  890. [string] LPSTR m_szMachineName;
  891. DWORD m_dwProcessId;
  892. GUID m_guidRefresherId;
  893. } WBEM_REFRESHER_ID;
  894. typedef struct _WBEM_RECONNECT_INFO
  895. {
  896. long m_lType;
  897. [string] LPCWSTR m_pwcsPath;
  898. } WBEM_RECONNECT_INFO;
  899. typedef struct _WBEM_RECONNECT_RESULTS
  900. {
  901. long m_lId;
  902. HRESULT m_hr;
  903. } WBEM_RECONNECT_RESULTS;
  904. [restricted, uuid(2C9273E0-1DC3-11d3-B364-00105A1F8177)]
  905. interface IWbemRefreshingServices : IUnknown
  906. {
  907. HRESULT AddObjectToRefresher(
  908. [in] WBEM_REFRESHER_ID* pRefresherId,
  909. [in, string] LPCWSTR wszPath,
  910. [in] long lFlags,
  911. [in] IWbemContext* pContext,
  912. [in] DWORD dwClientRefrVersion,
  913. [out] WBEM_REFRESH_INFO* pInfo,
  914. [out] DWORD* pdwSvrRefrVersion);
  915. HRESULT AddObjectToRefresherByTemplate(
  916. [in] WBEM_REFRESHER_ID* pRefresherId,
  917. [in] IWbemClassObject* pTemplate,
  918. [in] long lFlags,
  919. [in] IWbemContext* pContext,
  920. [in] DWORD dwClientRefrVersion,
  921. [out] WBEM_REFRESH_INFO* pInfo,
  922. [out] DWORD* pdwSvrRefrVersion);
  923. HRESULT AddEnumToRefresher(
  924. [in] WBEM_REFRESHER_ID* pRefresherId,
  925. [in, string] LPCWSTR wszClass,
  926. [in] long lFlags,
  927. [in] IWbemContext* pContext,
  928. [in] DWORD dwClientRefrVersion,
  929. [out] WBEM_REFRESH_INFO* pInfo,
  930. [out] DWORD* pdwSvrRefrVersion);
  931. HRESULT RemoveObjectFromRefresher(
  932. [in] WBEM_REFRESHER_ID* pRefresherId,
  933. [in] long lId,
  934. [in] long lFlags,
  935. [in] DWORD dwClientRefrVersion,
  936. [out] DWORD* pdwSvrRefrVersion);
  937. HRESULT GetRemoteRefresher( [in] WBEM_REFRESHER_ID* pRefresherId,
  938. [in] long lFlags,
  939. [in] DWORD dwClientRefrVersion,
  940. [out] IWbemRemoteRefresher** ppRemRefresher,
  941. [out] GUID* pGuid,
  942. [out] DWORD* pdwSvrRefrVersion);
  943. HRESULT ReconnectRemoteRefresher(
  944. [in] WBEM_REFRESHER_ID* pRefresherId,
  945. [in] long lFlags,
  946. [in] long lNumObjects,
  947. [in] DWORD dwClientRefrVersion,
  948. [in, size_is(lNumObjects)] WBEM_RECONNECT_INFO* apReconnectInfo,
  949. [in, out, size_is(lNumObjects)] WBEM_RECONNECT_RESULTS* apReconnectResults ,
  950. [out] DWORD* pdwSvrRefrVersion);
  951. };
  952. [restricted, local, uuid(504e6fe4-dfcd-11d1-adb4-00c04fd8fdff)]
  953. interface IWbemUnloadingControl : IUnknown
  954. {
  955. HRESULT SetMustPreventUnloading([in] boolean bPrevent);
  956. };
  957. [restricted, local, uuid(61d629e4-e546-11d2-b33a-00105a1f4aaf)]
  958. interface IWbemInternalServices : IUnknown
  959. {
  960. HRESULT FindKeyRoot(
  961. [in, string] LPCWSTR wszClassName,
  962. [out] IWbemClassObject** ppKeyRootClass);
  963. HRESULT InternalGetClass(
  964. [in, string] LPCWSTR wszClassName,
  965. [out] IWbemClassObject** ppClass);
  966. HRESULT InternalGetInstance(
  967. [in, string] LPCWSTR wszPath,
  968. [out] IWbemClassObject** ppInstance);
  969. HRESULT InternalExecQuery(
  970. [in, string] LPCWSTR wszQueryLanguage,
  971. [in, string] LPCWSTR wszQuery,
  972. [in] long lFlags,
  973. [in] IWbemObjectSink* pSink);
  974. HRESULT InternalCreateInstanceEnum(
  975. [in, string] LPCWSTR wszClassName,
  976. [in] long lFlags,
  977. [in] IWbemObjectSink* pSink);
  978. HRESULT GetDbInstance(
  979. [in, string] LPCWSTR wszDbKey,
  980. [out] IWbemClassObject** ppInstance);
  981. HRESULT GetDbReferences(
  982. [in] IWbemClassObject* pEndpoint,
  983. [in] IWbemObjectSink* pSink);
  984. HRESULT InternalPutInstance(
  985. [in] IWbemClassObject* pInstance);
  986. HRESULT GetNormalizedPath(
  987. [in] BSTR pstrPath,
  988. [out] BSTR* pstrStandardPath);
  989. };
  990. //
  991. // IWbemWCOSmartEnum
  992. //
  993. // This Interface is intended to provide alternate synchronous enumeration of
  994. // objects for IEnumWbemClassObject. If this is called, it calls the normal
  995. // ::Next function, then repackages the data into a BYTE array which must
  996. // be appropriateky unmarshaled on the receiving end.
  997. //
  998. //
  999. [restricted, object, uuid(423EC01E-2E35-11d2-B604-00104B703EFD)]
  1000. interface IWbemWCOSmartEnum : IUnknown
  1001. {
  1002. HRESULT Next(
  1003. [in] REFGUID proxyGUID,
  1004. [in] LONG lTimeout,
  1005. [in] ULONG uCount,
  1006. [out] ULONG* puReturned,
  1007. [out] ULONG* pdwBuffSize,
  1008. [out, size_is(,*pdwBuffSize)] byte** pBuffer
  1009. );
  1010. };
  1011. //
  1012. // IWbemFetchSmartEnum
  1013. //
  1014. // This Interface is used to return a smart enumerator. It assists
  1015. // us when we need to get an enumerator but want to do so without
  1016. // causing AddRef problem with the Proxy Manager.
  1017. //
  1018. [restricted, object, uuid(1C1C45EE-4395-11d2-B60B-00104B703EFD)]
  1019. interface IWbemFetchSmartEnum : IUnknown
  1020. {
  1021. HRESULT GetSmartEnum(
  1022. [out] IWbemWCOSmartEnum** ppSmartEnum
  1023. );
  1024. };
  1025. //
  1026. // IWbemLoginHelper
  1027. //
  1028. // This Interface is used to verify if a connection is on the same
  1029. // machine.
  1030. //
  1031. [restricted, object, uuid(541679AB-2E5F-11d3-B34E-00104BCC4B4A)]
  1032. interface IWbemLoginHelper : IUnknown
  1033. {
  1034. HRESULT SetEvent([in] LPCSTR sEventToSet);
  1035. };
  1036. //
  1037. // IWbemLoginClientID
  1038. //
  1039. // This Interface is used to verify if a connection is on the same
  1040. // machine.
  1041. //
  1042. [restricted, object, uuid(d4781cd6-e5d3-44df-ad94-930efe48a887)]
  1043. interface IWbemLoginClientID : IUnknown
  1044. {
  1045. HRESULT SetClientInfo(
  1046. [in, unique, string] LPWSTR wszClientMachine,
  1047. [in] LONG lClientProcId,
  1048. [in] LONG lReserved );
  1049. };
  1050. //
  1051. // ICreateSecondaryStub
  1052. //
  1053. // This Interface by unsecapp and winmgmt
  1054. //
  1055. [restricted, object, uuid(6468FE15-412D-11d3-B350-00104BCC4B4A)]
  1056. interface IWbemCreateSecondaryStub : IUnknown
  1057. {
  1058. HRESULT CreateSecondaryStub([out] IUnknown** ppSecondaryStub);
  1059. };
  1060. //
  1061. // IWinmgmtMofCompiler
  1062. //
  1063. //
  1064. //
  1065. [local, object, uuid(C10B4772-4DA0-11d2-A2F5-00C04F86FB7D)]
  1066. interface IWinmgmtMofCompiler : IUnknown
  1067. {
  1068. HRESULT WinmgmtCompileFile(
  1069. [in, string] LPWSTR FileName,
  1070. [in, string] LPWSTR ServerAndNamespace,
  1071. [in] LONG lOptionFlags, // autocomp, check, etc
  1072. [in] LONG lClassFlags,
  1073. [in] LONG lInstanceFlags,
  1074. [in] IWbemServices * pOverride,
  1075. [in] IWbemContext * pCtx,
  1076. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  1077. );
  1078. // lFlags correspond to all the available command-line flags.
  1079. HRESULT WinmgmtCompileBuffer(
  1080. [in] long BuffSize,
  1081. [in, size_is(BuffSize)]BYTE * pBuffer,
  1082. [in] LONG lOptionFlags, // autocomp, check, etc
  1083. [in] LONG lClassFlags,
  1084. [in] LONG lInstanceFlags,
  1085. [in] IWbemServices * pOverride,
  1086. [in] IWbemContext * pCtx,
  1087. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  1088. );
  1089. // lFlags correspond to all the available command-line flags.
  1090. };
  1091. // Are strings ASCII or UNICODE?
  1092. typedef enum tagWMI_STRING_FLAGS
  1093. {
  1094. WMIOBJECT_STRING_FLAG_ASCII = 0,
  1095. WMIOBJECT_STRING_FLAG_UNICODE = 0x1,
  1096. WMIOBJECT_STRING_FLAG_MASK = 0x1,
  1097. } WMIOBJECT_STRING_FLAGS;
  1098. // Get Object Flags, LoPart of 64-bit value
  1099. typedef enum tagWMIOBJECT_GETOBJECT_LOFLAGS
  1100. {
  1101. WMIOBJECT_GETOBJECT_LOFLAG_ASSOCIATION = 0x1,
  1102. WMIOBJECT_GETOBJECT_LOFLAG_DYNAMIC = 0x2,
  1103. WMIOBJECT_GETOBJECT_LOFLAG_SINGLETON = 0x4,
  1104. WMIOBJECT_GETOBJECT_LOFLAG_AMENDMENT = 0x8,
  1105. WMIOBJECT_GETOBJECT_LOFLAG_LOCALIZED = 0x10,
  1106. WMIOBJECT_GETOBJECT_LOFLAG_KEYED = 0x20,
  1107. WMIOBJECT_GETOBJECT_LOFLAG_ABSTRACT = 0x40,
  1108. WMIOBJECT_GETOBJECT_LOFLAG_HIPERF = 0x80,
  1109. WMIOBJECT_GETOBJECT_LOFLAG_AUTOCOOK = 0x100,
  1110. WMIOBJECT_GETOBJECT_LOFLAG_DECORATED = 0x200,
  1111. WMIOBJECT_GETOBJECT_LOFLAG_LIMITED = 0x400,
  1112. WMIOBJECT_GETOBJECT_LOFLAG_CLIENTONLY = 0x800,
  1113. WMIOBJECT_GETOBJECT_LOFLAG_TINY = 0x1000,
  1114. WMIOBJECT_GETOBJECT_LOFLAG_ALL = 0xFFFFFFFF
  1115. } WMIOBJECT_GETOBJECT_LOFLAGS;
  1116. // Get Property Flags, LoPart of 64-bit value
  1117. typedef enum tagWMIOBJECT_GETPROPERTY_LOFLAGS
  1118. {
  1119. WMIOBJECT_GETPROPERTY_LOFLAG_KEY = 0x1,
  1120. WMIOBJECT_GETPROPERTY_LOFLAG_INDEX = 0x2,
  1121. WMIOBJECT_GETPROPERTY_LOFLAG_DYNAMIC = 0x4,
  1122. WMIOBJECT_GETPROPERTY_LOFLAG_ALL = 0xFFFFFFFF
  1123. } WMIOBJECT_GETPROPERTY_LOFLAGS;
  1124. // Set Object Flags, LoPart of 64-bit value
  1125. typedef enum tagWMIOBJECT_SETOBJECT_LOFLAGS
  1126. {
  1127. WMIOBJECT_SETOBJECT_LOFLAG_LIMITED = 0x1,
  1128. WMIOBJECT_SETOBJECT_LOFLAG_CLIENTONLY = 0x2,
  1129. WMIOBJECT_SETOBJECT_LOFLAG_LOCALIZED = 0x4,
  1130. WMIOBJECT_SETOBJECT_LOFLAG_TINY = 0x8,
  1131. WMIOBJECT_SETOBJECT_LOFLAG_ALL = 0xFFFFFFFF
  1132. } WMIOBJECT_SETOBJECT_LOFLAGS;
  1133. typedef enum tagWMIARRAY_FLAGS
  1134. {
  1135. WMIARRAY_FLAG_ALLELEMENTS = 0x1
  1136. } WMIARRAY_FLAGS;
  1137. typedef enum tagWMIOBJECT_MERGEAMENDED_FLAGS
  1138. {
  1139. WMIOBJECT_MERGEAMENDED_FLAG_PARENTLOCALIZED = 0x1
  1140. } WMIOBJECT_MERGEAMENDED_FLAGS;
  1141. typedef enum tagWMIOBJECT_FREEFORM_FLAGS
  1142. {
  1143. WMIOBJECT_FREEFORM_FLAG_WRITE_TO_INSTANCE = 0x1
  1144. } WMIOBJECT_FREEFORM_FLAGS;
  1145. typedef enum tagWBEM_OBJINTERNALPARTS_INFO
  1146. {
  1147. WBEM_OBJ_DECORATION_PART = 0x1,
  1148. WBEM_OBJ_INSTANCE_PART = 0x2,
  1149. WBEM_OBJ_CLASS_PART = 0x4,
  1150. WBEM_OBJ_CLASS_PART_INTERNAL = 0x8,
  1151. WBEM_OBJ_CLASS_PART_SHARED = 0x10
  1152. } WBEM_OBJINTERNALPARTS_INFO;
  1153. typedef enum tagWMIOBJECT_RECONCILE_FLAGS
  1154. {
  1155. WMIOBJECT_RECONCILE_FLAG_TESTRECONCILE = 0x1
  1156. } WMIOBJECT_RECONCILE_FLAGS;
  1157. typedef enum tagWMIOBJECT_MERGE_FLAGS
  1158. {
  1159. WMIOBJECT_MERGE_FLAG_CLASS = 0x0,
  1160. WMIOBJECT_MERGE_FLAG_INSTANCE = 0x1
  1161. } WMIOBJECT_MERGE_FLAGS;
  1162. typedef enum tagWMIOBJECT_ENCODING_FLAGS
  1163. {
  1164. WMIOBJECT_FLAG_ENCODING_V1 = 0x1
  1165. } WMIOBJECT_ENCODING_FLAGS;
  1166. typedef enum tagWMIOBJECT_BEGINENUMEX_FLAGS
  1167. {
  1168. WMIOBJECT_BEGINENUMEX_FLAG_GETEXTPROPS = 0x1
  1169. } WMIOBJECT_BEGINENUMEX_FLAGS;
  1170. typedef enum tagWMIOBJECT_VALIDATEOBJECT_FLAGS
  1171. {
  1172. WMIOBJECT_VALIDATEOBJECT_FLAG_FORCE = 0x1
  1173. } WMIOBJECT_VALIDATEOBJECT_FLAGS;
  1174. //***************************************************************************
  1175. //
  1176. // _IWmiArray - Private Array Access interface -- DO NOT MODIFY THIS
  1177. // WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1178. [restricted, object, local, uuid(D471B667-6CF7-4a55-9B29-4F1E9FC06C72)]
  1179. interface _IWmiArray : IUnknown
  1180. {
  1181. HRESULT Initialize(
  1182. [in] long lFlags,
  1183. [in] CIMTYPE cimtype,
  1184. [in] ULONG uNumElements
  1185. );
  1186. // Initializes the array. Number of initial elements as well
  1187. // as the type (determines the size of each element) and dimension
  1188. // currently only 1 is supported.
  1189. HRESULT GetInfo(
  1190. [in] long lFlags,
  1191. [out] CIMTYPE* pcimtype, // Optional
  1192. [out] ULONG* puNumElements // Optional
  1193. );
  1194. // Initializes the array. Number of initial elements as well
  1195. // as the type (determines the size of each element).
  1196. HRESULT Empty(
  1197. [in] long lFlags
  1198. );
  1199. // Clears the array as well as internal data.
  1200. HRESULT GetAt(
  1201. [in] long lFlags,
  1202. [in] ULONG uStartIndex, // Which Element
  1203. [in] ULONG uNumElements, // How many Elements
  1204. [in] ULONG uBuffSize, // Buffer Size in BYTES, not chars.
  1205. [out] ULONG* puNumReturned, // Number of elements returned.
  1206. [out] ULONG* puBuffSizeUsed, // Amount of buffer used
  1207. [out] LPVOID pDest // Data Buffer
  1208. );
  1209. // Returns the requested elements. Buffer must be large enough to hold
  1210. // the element. Embedded objects returned as AddRef'd _IWmiObject pointers.
  1211. // Strings are copied directly into the specified buffer and null-terminatead. UNICODE only.
  1212. HRESULT SetAt(
  1213. [in] long lFlags,
  1214. [in] ULONG uStartIndex, // Which Element
  1215. [in] ULONG uNumElements, // How many Elements
  1216. [in] ULONG uBuffSize, // Buffer Size in BYTES, not chars.
  1217. [in] LPVOID pDest // Data Buffer
  1218. );
  1219. // Sets the specified elements. Buffer must supply data matching the CIMTYPE
  1220. // of the Array. Embedded objects set as _IWmiObject pointers.
  1221. // Strings accessed as LPCWSTRs and the 2-byte null is copied.
  1222. HRESULT Append(
  1223. [in] long lFlags,
  1224. [in] ULONG uNumElements, // How many Elements
  1225. [in] ULONG uBuffSize, // Buffer Size
  1226. [in] LPVOID pDest // Data Buffer
  1227. );
  1228. // Appends the specified elements. Buffer must supply data matching
  1229. // the CIMTYPE of the Array. Embedded objects set as _IWmiObject pointers.
  1230. // Strings accessed as LPCWSTRs and the 2-byte null is copied.
  1231. HRESULT RemoveAt(
  1232. [in] long lFlags,
  1233. [in] ULONG uStartIndex, // Starting endex
  1234. [in] ULONG uNumElements // How many Elements
  1235. );
  1236. // Removes the specified elements from the array. Subseqent elements are copied back
  1237. // to the starting point
  1238. };
  1239. //***************************************************************************
  1240. //
  1241. // _IWmiObjectAccessEx - internal interface exposing guts of our object BLOBs
  1242. // Inherits from IWbemObjectAccess so regular functionality is available.
  1243. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1244. [restricted, object, local, uuid(235FE06E-00E6-4990-A624-2D4DCD5EB63A)]
  1245. interface _IWmiObjectAccessEx : IWbemObjectAccess
  1246. {
  1247. HRESULT GetPropertyHandleEx(
  1248. [in] LPCWSTR pszPropName,
  1249. [in] long lFlags,
  1250. [out] CIMTYPE* puCimType, // optional
  1251. [out] long* plHandle
  1252. );
  1253. // Returns property handle for ALL types
  1254. HRESULT SetPropByHandle(
  1255. [in] long lHandle,
  1256. [in] long lFlags,
  1257. [in] ULONG uDataSize,
  1258. [in] LPVOID pvData
  1259. );
  1260. // Sets properties using a handle. If pvData is NULL, it NULLs the property.
  1261. // Can set an array to NULL. To set actual data use the corresponding array
  1262. // function
  1263. HRESULT GetPropAddrByHandle(
  1264. [in] long lHandle,
  1265. [in] long lFlags,
  1266. [out] ULONG* puFlags, // Datatype dependent flags
  1267. [out] LPVOID *pAddress
  1268. );
  1269. // Returns a pointer to a memory address containing the requested data
  1270. // Caller should not write into the memory address. The memory address is
  1271. // not guaranteed to be valid if the object is modified.
  1272. // For String properties, puFlags will contain info on the string
  1273. // For object properties, LPVOID will get back an _IWmiObject pointer
  1274. // that must be released by the caller. Does not return arrays.
  1275. // Supports __CLASS and __SUPERCLASS
  1276. HRESULT GetArrayPropAddrByHandle(
  1277. [in] long lHandle,
  1278. [in] long lFlags,
  1279. [out] ULONG* puNumElements,
  1280. [out] LPVOID* pAddress
  1281. );
  1282. // Returns a pointer directly to a memory address containing contiguous
  1283. // elements. Limited to non-string/obj types
  1284. HRESULT GetArrayPropInfoByHandle(
  1285. [in] long lHandle,
  1286. [in] long lFlags,
  1287. [out] BSTR* pstrName,
  1288. [out] CIMTYPE* pct,
  1289. [out] ULONG* puNumElements // How many elements are available
  1290. );
  1291. // Returns the number of elements available in an array property.
  1292. HRESULT GetArrayPropElementByHandle(
  1293. [in] long lHandle,
  1294. [in] long lFlags,
  1295. [in] ULONG uElement,
  1296. [out] ULONG* puFlags, // Datatype dependent flags
  1297. [out] ULONG* puNumElements, // How many elements are available
  1298. [out] LPVOID* pAddress
  1299. );
  1300. // Returns a pointer to a memory address containing the requested data
  1301. // Caller should not write into the memory address. The memory address is
  1302. // not guaranteed to be valid if the object is modified.
  1303. // For String properties, puFlags will contain info on the string
  1304. // For object properties, LPVOID will get back an _IWmiObject pointer
  1305. // that must be released by the caller.
  1306. HRESULT SetArrayPropElementByHandle(
  1307. [in] long lHandle, // Property Handle
  1308. [in] long lFlags, // Must be 0L
  1309. [in] ULONG uElement, // Which element to set
  1310. [in] ULONG uBuffSize, // The actual buffer size in bytes (ignored for CIM_OBJECT)
  1311. [in] LPVOID pData // The actual data buffer
  1312. );
  1313. // Sets the data at the specified array element. BuffSize must be appropriate based on the
  1314. // actual element being set. Object properties require an _IWmiObject pointer. Strings must
  1315. // be WCHAR null-terminated
  1316. HRESULT RemoveArrayPropElementByHandle(
  1317. [in] long lHandle, // Property Handle
  1318. [in] long lFlags, // Must be 0L
  1319. [in] ULONG uElement // Which element to remove
  1320. );
  1321. // Removes the data at the specified array element.
  1322. HRESULT GetArrayPropRangeByHandle(
  1323. [in] long lHandle,
  1324. [in] long lFlags,
  1325. [in] ULONG uStartIndex, // Range Start Index
  1326. [in] ULONG uNumElements, // Number of elements to get
  1327. [in] ULONG uBuffSize, // Size of the buffer in bytes
  1328. [out] ULONG* puNumReturned, // Number of elements returned
  1329. [out] ULONG* puBuffUsed, // How much buffer was used
  1330. [in,out] LPVOID pData // Storage to copy into
  1331. );
  1332. // Gets a range of elements from inside an array. BuffSize must reflect uNumElements of the size of
  1333. // element being set. Strings must be linear WCHAR strings separated by NULLs. Object properties
  1334. // must consist of an array of _IWmiObject pointers. The range MUST fit within the bounds
  1335. // of the current array. If lFlags is WMIARRAY_FLAG_ALLELEMENTS, we get all elements
  1336. // from the starting index on
  1337. HRESULT SetArrayPropRangeByHandle(
  1338. [in] long lHandle,
  1339. [in] long lFlags,
  1340. [in] ULONG uStartIndex, // Range Start Index
  1341. [in] ULONG uNumElements, // Number of elements to set
  1342. [in] ULONG uBuffSize, // Size of the buffer in bytes
  1343. [in] LPVOID pData // Storage to copy from
  1344. );
  1345. // Sets a range of elements inside an array. BuffSize must reflect uNumElements of the size of
  1346. // element being set. Strings must be linear WCHAR strings separated by NULLs. Object properties
  1347. // must consist of an array of _IWmiObject pointers. The range MUST fit within the bounds
  1348. // of the current array. If lFlags is WMIARRAY_FLAG_ALLELEMENTS, and the start index is 0, the
  1349. // array will be sized/resized/etc. as needed to fit the requested range
  1350. HRESULT RemoveArrayPropRangeByHandle(
  1351. [in] long lHandle,
  1352. [in] long lFlags,
  1353. [in] ULONG uStartIndex, // Range Start Index
  1354. [in] ULONG uNumElements // Number of elements to remove
  1355. );
  1356. // Removes a range of elements from an array. The range MUST fit within the bounds
  1357. // of the current array
  1358. HRESULT AppendArrayPropRangeByHandle(
  1359. [in] long lHandle,
  1360. [in] long lFlags,
  1361. [in] ULONG uNumElements, // Number of elements to append
  1362. [in] ULONG uBuffSize, // Size of the buffer in bytes
  1363. [in] LPVOID pData // Storage to copy from
  1364. );
  1365. // Appends elements to the end of an array. BuffSize must reflect uNumElements of the size of
  1366. // element being set. Strings must be linear WCHAR strings separated by NULLs. Object properties
  1367. // must consist of an array of _IWmiObject pointers.
  1368. HRESULT ReadProp(
  1369. [in] LPCWSTR pszPropName,
  1370. [in] long lFlags,
  1371. [in] ULONG uBufSize,
  1372. [out] CIMTYPE *puCimType, // optional
  1373. [out] long *plFlavor, // optional
  1374. [out] BOOL *pfIsNull,
  1375. [out] ULONG *puBuffSizeUsed,
  1376. [in, out] LPVOID pUserBuf
  1377. );
  1378. // Assumes caller knows prop type; Supports all CIMTYPES
  1379. // Strings are copied in-place WCHAR and null-terminated.
  1380. // Objects come out as _IWmiObject pointers
  1381. // Arrays come out as a pointer to _IWmiArray
  1382. HRESULT WriteProp(
  1383. [in] LPCWSTR pszPropName,
  1384. [in] long lFlags,
  1385. [in] ULONG uBufSize, // Size of the buffer
  1386. [in] ULONG uNumElements, // Number of array elements
  1387. [in] CIMTYPE uCimType,
  1388. [in] LPVOID pUserBuf
  1389. );
  1390. // Assumes caller knows prop type; Supports all CIMTYPES.
  1391. // Strings MUST be null-terminated wchar_t arrays.
  1392. // Objects are passed in as _IWmiObject pointers
  1393. // Using a NULL buffer will set the property to NULL
  1394. // Array properties must conform to array guidelines. Will
  1395. // completely blow away an old array.
  1396. HRESULT GetObjQual(
  1397. [in] LPCWSTR pszQualName,
  1398. [in] long lFlags,
  1399. [in] ULONG uBufSize,
  1400. [out] CIMTYPE *puCimType, // optional
  1401. [out] ULONG *puQualFlavor, // optional
  1402. [out] ULONG* puBuffSizeUsed, // optional
  1403. [out] LPVOID pDestBuf
  1404. );
  1405. // Limited to numeric, simple null terminated string types and simple arrays
  1406. // Strings are copied in-place and null-terminated.
  1407. // Arrays come out as a pointer to IWmiArray
  1408. HRESULT SetObjQual(
  1409. [in] LPCWSTR pszQualName,
  1410. [in] long lFlags,
  1411. [in] ULONG uBufSize,
  1412. [in] ULONG uNumElements,
  1413. [in] CIMTYPE uCimType,
  1414. [in] ULONG uQualFlavor,
  1415. [in] LPVOID pUserBuf
  1416. );
  1417. // Limited to numeric, simple null terminated string types and simple arrays
  1418. // Strings MUST be WCHAR
  1419. // Arrays are set using _IWmiArray interface from Get
  1420. HRESULT GetPropQual(
  1421. [in] LPCWSTR pszPropName,
  1422. [in] LPCWSTR pszQualName,
  1423. [in] long lFlags,
  1424. [in] ULONG uBufSize,
  1425. [out] CIMTYPE *puCimType,
  1426. [out] ULONG *puQualFlavor,
  1427. [out] ULONG* puBuffSizeUsed, // optional
  1428. [in, out] LPVOID pDestBuf
  1429. );
  1430. // Limited to numeric, simple null terminated string types and simple arrays
  1431. // Strings MUST be WCHAR
  1432. HRESULT SetPropQual(
  1433. [in] LPCWSTR pszPropName,
  1434. [in] LPCWSTR pszQualName,
  1435. [in] long lFlags,
  1436. [in] ULONG uBufSize,
  1437. [in] ULONG uNumElements,
  1438. [in] CIMTYPE uCimType,
  1439. [in] ULONG uQualFlavor,
  1440. [in] LPVOID pUserBuf
  1441. );
  1442. // Limited to numeric, simple null terminated string types and simple arrays
  1443. // Strings MUST be WCHAR
  1444. // Arrays are set using _IWmiArray interface from Get
  1445. HRESULT GetMethodQual(
  1446. [in] LPCWSTR pszMethodName,
  1447. [in] LPCWSTR pszQualName,
  1448. [in] long lFlags,
  1449. [in] ULONG uBufSize,
  1450. [out] CIMTYPE *puCimType,
  1451. [out] ULONG *puQualFlavor,
  1452. [out] ULONG* puBuffSizeUsed, // optional
  1453. [in, out] LPVOID pDestBuf
  1454. );
  1455. // Limited to numeric, simple null terminated string types and simple arrays
  1456. // Strings MUST be WCHAR
  1457. HRESULT SetMethodQual(
  1458. [in] LPCWSTR pszMethodName,
  1459. [in] LPCWSTR pszQualName,
  1460. [in] long lFlags,
  1461. [in] ULONG uBufSize,
  1462. [in] ULONG uNumElements,
  1463. [in] CIMTYPE uCimType,
  1464. [in] ULONG uQualFlavor,
  1465. [in] LPVOID pUserBuf
  1466. );
  1467. // Limited to numeric, simple null terminated string types and simple arrays
  1468. // Strings MUST be WCHAR
  1469. // Arrays are set using _IWmiArray interface from Get
  1470. };
  1471. //***************************************************************************
  1472. //
  1473. // _IWmiObject - internal interface exposing guts of our object BLOBs
  1474. // Inherits from _IWmiObjectAccessEx so regular functionality is available.
  1475. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1476. [restricted, object, local, uuid(B308C72B-7FEA-4c98-A459-7F5FCC3ED39F)]
  1477. interface _IWmiObject : _IWmiObjectAccessEx
  1478. {
  1479. HRESULT CloneEx(
  1480. [in] long lFlags,
  1481. [in] _IWmiObject* pDestObject
  1482. );
  1483. // Clones the current object into the supplied one. Reuses memory as
  1484. // needed
  1485. HRESULT CopyInstanceData(
  1486. [in] long lFlags,
  1487. [in] _IWmiObject* pSourceInstance
  1488. );
  1489. // Copies instance data from source instance into current instance
  1490. // Class Data must be exactly the same
  1491. HRESULT QueryObjectFlags(
  1492. [in] long lFlags,
  1493. [in] unsigned __int64 qObjectInfoMask,
  1494. [out] unsigned __int64 *pqObjectInfo
  1495. );
  1496. // Returns flags indicating singleton, dynamic, association, etc.
  1497. HRESULT SetObjectFlags(
  1498. [in] long lFlags,
  1499. [in] unsigned __int64 qObjectInfoOnFlags,
  1500. [in] unsigned __int64 qObjectInfoOffFlags
  1501. );
  1502. // Sets flags, including internal ones normally inaccessible.
  1503. HRESULT QueryPropertyFlags(
  1504. [in] long lFlags,
  1505. [in] LPCWSTR pszPropertyName,
  1506. [in] unsigned __int64 qPropertyInfoMask,
  1507. [out] unsigned __int64 *pqPropertyInfo
  1508. );
  1509. // Returns flags indicating key, index, etc.
  1510. HRESULT IsParentClass(
  1511. [in] long lFlags,
  1512. [in] _IWmiObject* pClass
  1513. );
  1514. // Checks if the current object is a child of the specified class (i.e. is Instance of,
  1515. // or is Child of )
  1516. HRESULT CompareDerivedMostClass(
  1517. [in] long lFlags,
  1518. [in] _IWmiObject* pClass
  1519. );
  1520. // Compares the derived most class information of two class objects.
  1521. HRESULT MergeAmended(
  1522. [in] long lFlags,
  1523. [in] _IWmiObject* pAmendedClass
  1524. );
  1525. // Merges in amended qualifiers from the amended class object into the
  1526. // current object. If lFlags is WMIOBJECT_MERGEAMENDED_FLAG_PARENTLOCALIZED,
  1527. // this means that the parent object was localized, but not the current,
  1528. // so we need to prevent certain qualifiers from "moving over."
  1529. HRESULT GetDerivation(
  1530. [in] long lFlags,
  1531. [in] ULONG uBufferSize,
  1532. [out] ULONG* puNumAntecedents,
  1533. [out] ULONG* puBuffSizeUsed,
  1534. [out] LPWSTR pwstrUserBuffer
  1535. );
  1536. // Retrieves the derivation of an object as an array of LPCWSTR's, each one
  1537. // terminated by a NULL. Leftmost class is at the top of the chain
  1538. HRESULT _GetCoreInfo(
  1539. [in] long lFlags,
  1540. [out] void** pvData
  1541. );
  1542. // Returns core data. See SANJES or RAYMCC before implementing or calling
  1543. // Old IWbemObjectInternals methods
  1544. HRESULT QueryPartInfo(
  1545. [out] DWORD *pdwResult
  1546. );
  1547. HRESULT SetObjectMemory(
  1548. [in] LPVOID pMem,
  1549. [in] DWORD dwMemSize
  1550. );
  1551. HRESULT GetObjectMemory(
  1552. [out] LPVOID pDestination,
  1553. [in] DWORD dwDestBufSize,
  1554. [out] DWORD *pdwUsed
  1555. );
  1556. HRESULT SetObjectParts(
  1557. [in] LPVOID pMem,
  1558. [in] DWORD dwDestBufSize,
  1559. [in] DWORD dwParts
  1560. );
  1561. HRESULT GetObjectParts(
  1562. [out] LPVOID pDestination,
  1563. [in] DWORD dwDestBufSize,
  1564. [in] DWORD dwParts,
  1565. [out] DWORD *pdwUsed
  1566. );
  1567. HRESULT StripClassPart();
  1568. HRESULT SetClassPart(
  1569. [in] LPVOID pClassPart,
  1570. [in] DWORD dwSize
  1571. );
  1572. HRESULT MergeClassPart(
  1573. [in] IWbemClassObject *pClassPart
  1574. );
  1575. HRESULT IsObjectInstance();
  1576. HRESULT SetDecoration(
  1577. [in, string] LPCWSTR pwcsServer,
  1578. [in, string] LPCWSTR pwcsNamespace
  1579. );
  1580. HRESULT RemoveDecoration();
  1581. HRESULT CompareClassParts(
  1582. [in] IWbemClassObject* pObj,
  1583. [in] long lFlags
  1584. );
  1585. HRESULT ClearWriteOnlyProperties();
  1586. HRESULT GetClassSubset(
  1587. [in] DWORD dwNumNames,
  1588. [in] LPCWSTR *pPropNames,
  1589. [out] _IWmiObject **pNewClass
  1590. );
  1591. // Creates a limited representation class for projection queries
  1592. HRESULT MakeSubsetInst(
  1593. [in] _IWmiObject *pInstance,
  1594. [out] _IWmiObject** pNewInstance
  1595. );
  1596. // Creates a limited representation instance for projection queries
  1597. // "this" _IWmiObject must be a limited class
  1598. HRESULT Unmerge(
  1599. [in] long lFlags,
  1600. [in] ULONG uBuffSize,
  1601. [out] ULONG* puBuffSizeUsed,
  1602. [in,out] LPVOID pData
  1603. );
  1604. // Returns a BLOB of memory containing minimal data (local)
  1605. HRESULT Merge(
  1606. [in] long lFlags,
  1607. [in] ULONG uBuffSize,
  1608. [in] LPVOID pbData,
  1609. [out] _IWmiObject** ppNewObj
  1610. );
  1611. // Merges a blob with the current object memory and creates a new object
  1612. HRESULT ReconcileWith(
  1613. [in] long lFlags,
  1614. [out] _IWmiObject* pNewObj
  1615. );
  1616. // Reconciles an object with the current one. If WMIOBJECT_RECONCILE_FLAG_TESTRECONCILE
  1617. // is specified this will only perform a test
  1618. HRESULT GetKeyOrigin(
  1619. [in] long lFlags,
  1620. [in] DWORD dwNumChars,
  1621. [out] DWORD* pdwNumUsed,
  1622. [out] LPWSTR pwzClassName );
  1623. // Returns the name of the class where the keys were defined
  1624. HRESULT GetKeyString(
  1625. [in] long lFlags,
  1626. [out] BSTR* pwzKeyString );
  1627. // Returns the key of the instance
  1628. HRESULT GetNormalizedPath(
  1629. [in] long lFlags,
  1630. BSTR* pstrStandardPath
  1631. );
  1632. // Returns a normalized path from the object
  1633. HRESULT Upgrade(
  1634. [in] _IWmiObject* pNewParentClass,
  1635. [in] long lFlags,
  1636. [out] _IWmiObject** ppNewChild
  1637. );
  1638. // Upgrades class and instance objects
  1639. HRESULT Update(
  1640. [in] _IWmiObject* pOldChildClass,
  1641. [in] long lFlags,
  1642. [out] _IWmiObject** ppNewChildClass
  1643. );
  1644. // Updates derived class object using the safe/force mode logic
  1645. HRESULT BeginEnumerationEx(
  1646. [in] long lFlags,
  1647. [in] long lExtFlags
  1648. );
  1649. // Allows special filtering when enumerating properties outside the
  1650. // bounds of those allowed via BeginEnumeration().
  1651. HRESULT CIMTYPEToVARTYPE(
  1652. [in] CIMTYPE ct,
  1653. [out] VARTYPE* pvt
  1654. );
  1655. // Returns a VARTYPE from a CIMTYPE
  1656. HRESULT SpawnKeyedInstance(
  1657. [in] long lFlags,
  1658. [in] LPCWSTR pwszPath,
  1659. [out] _IWmiObject** ppInst
  1660. );
  1661. HRESULT ValidateObject(
  1662. [in] long lFlags
  1663. );
  1664. // Validates an object blob
  1665. HRESULT GetParentClassFromBlob(
  1666. [in] long lFlags,
  1667. [in] ULONG uBuffSize,
  1668. [in] LPVOID pbData,
  1669. [out] BSTR* pbstrParentClass
  1670. );
  1671. // Returns the parent class name from a BLOB
  1672. };
  1673. //
  1674. // _IWmiFreeFormObject - internal interface allowing for creation of "on the fly"
  1675. // objects which declare classness or instanceness as specified by the caller.
  1676. // Inherits from _IWmiObject so regular and extended functionality is available.
  1677. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1678. [restricted, object, local, uuid(28E1AE0A-20EA-406c-BDB6-011B76E0DDE9)]
  1679. interface _IWmiFreeFormObject : IUnknown
  1680. {
  1681. HRESULT SetPropertyOrigin(
  1682. [in] long lFlags,
  1683. [in] LPCWSTR pszPropName,
  1684. [in] LPCWSTR pszClassName
  1685. );
  1686. // Specifies a property origin (in case we have properties originating in classes
  1687. // which we know nothing about).
  1688. HRESULT SetMethodOrigin(
  1689. [in] long lFlags,
  1690. [in] LPCWSTR pszMethodName,
  1691. [in] LPCWSTR pszClassName
  1692. );
  1693. // Specifies a method origin (in case we have methods originating in classes
  1694. // which we know nothing about).
  1695. HRESULT SetDerivation(
  1696. [in] long lFlags,
  1697. [in] ULONG uNumClasses,
  1698. [in] LPCWSTR pwszInheritanceChain
  1699. );
  1700. // Specifies the inheritance chain - Only valid while object is a class and class name has
  1701. // NOT been set. This will cause a derived class to be generated. All properties and
  1702. // classes must have been set prior to setting the actual class name. The class in the
  1703. // last position will be set as the current class name, and the remainder will be set as the
  1704. // actual chain and then a derived class will be spawned.
  1705. HRESULT SetClassName(
  1706. [in] long lFlags,
  1707. [in] LPCWSTR pszClassName
  1708. );
  1709. // Specifies the class name - Only valid while object is a class and no pevious name has
  1710. // been set.
  1711. HRESULT MakeInstance(
  1712. [in] long lFlags
  1713. );
  1714. // Converts the current object into an instance. If it is already an instance, this will
  1715. // fail. Writes properties assigned to instance during AddProperty operations
  1716. HRESULT AddProperty(
  1717. [in] LPCWSTR pszPropName,
  1718. [in] long lFlags,
  1719. [in] ULONG uBufSize, // Size of the buffer
  1720. [in] ULONG uNumElements, // Number of array elements
  1721. [in] CIMTYPE uCimType,
  1722. [in] LPVOID pUserBuf
  1723. );
  1724. // Assumes caller knows prop type; Supports all CIMTYPES.
  1725. // Strings MUST be null-terminated wchar_t arrays.
  1726. // Objects are passed in as _IWmiObject pointers
  1727. // Using a NULL buffer will set the property to NULL
  1728. // Array properties must conform to array guidelines.
  1729. // Only works when the object is not an instance.
  1730. // If WMIOBJECT_FREEFORM_FLAG_WRITE_TO_INSTANCE is set
  1731. // then property will only be added and the value will
  1732. // be assigned when MakeInstance() is called
  1733. HRESULT Reset(
  1734. [in] long lFlags
  1735. );
  1736. // Resets the object to a clean state
  1737. };
  1738. //
  1739. // _IWmiObjectFactory - internal object factory, allowing for creation of
  1740. // specific types of WMI objects.
  1741. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1742. [restricted, object, local, uuid(855A71D0-E5CD-46de-9707-17F2BD1ED694)]
  1743. interface _IWmiObjectFactory : IUnknown
  1744. {
  1745. HRESULT Create(
  1746. [in] IUnknown* pUnkOuter,
  1747. [in] ULONG ulFlags,
  1748. [in] REFCLSID rclsid,
  1749. [in] REFIID riid,
  1750. [out,iid_is(riid)] LPVOID* ppObj
  1751. );
  1752. };
  1753. // UMI Object wrapper flags
  1754. typedef enum tagUMIOBJECT_WRAPPER_FLAGS
  1755. {
  1756. UMIOBJECT_WRAPPER_FLAG_SECURITY = 0x10,
  1757. UMIOBJECT_WRAPPER_FLAG_CONTAINER = 0x20
  1758. } UMIOBJECT_WRAPPER_FLAGS;
  1759. //
  1760. // _IWbemUMIObjectWrapper - Wrapper Interface to hide IUMIObject interface
  1761. // implementations behind IWbemClassObject
  1762. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1763. // UMI definitions declared as IUnknowns due to UMI.IDL problems with importing.
  1764. [restricted, object, local, uuid(91DF7ACE-7A22-4cd7-99C6-23B713CDF47C)]
  1765. interface _IWbemUMIObjectWrapper : IUnknown
  1766. {
  1767. HRESULT SetObject(
  1768. [in] long lFlags,
  1769. [in] IUnknown* pUnk
  1770. );
  1771. // Sets the underlying UMI Object interface pointer
  1772. // Connects the wrapper to
  1773. HRESULT ConnectToProvider(
  1774. [in] LPCWSTR pwszUser,
  1775. [in] LPCWSTR pwszPassword,
  1776. [in] IUnknown* pPath, // IUmiUrl
  1777. [in] REFCLSID rclsid,
  1778. [in] IWbemContext* pCtx
  1779. );
  1780. // Sets the underlying UMI Object interface pointer
  1781. };
  1782. typedef enum tagUMISVCEX_WRAPPER_FLAGS
  1783. {
  1784. UMISVCEX_WRAPPER_FLAG_SETDIRECT = 0x10
  1785. } UMISVCEX_WRAPPER_FLAGS;
  1786. // UMI definitions declared as IUnknowns due to UMI.IDL problems with importing.
  1787. [restricted, object, local, uuid(D83B6FC3-8489-478f-BC4A-AD0C9E375ED6)]
  1788. interface _IUmiSvcExWrapper : IUnknown
  1789. {
  1790. HRESULT ConnectToProvider(
  1791. [in] LPCWSTR pwszUser,
  1792. [in] LPCWSTR pwszPassword,
  1793. [in] IUnknown* pPath, // IUmiUrl
  1794. [in] REFCLSID rclsid,
  1795. [in] IWbemContext* pCtx,
  1796. [out] IUnknown** pUnk // IUmiContainer
  1797. );
  1798. // Connects to the actual provider and returns a proper
  1799. // IUmiContainer
  1800. HRESULT SetContainer(
  1801. [in] long lFlags,
  1802. [in] IUnknown* pContainer // IUmiContainer
  1803. );
  1804. // Hands the connection to the wrapper
  1805. };
  1806. [restricted, object, local, uuid(F8604208-0F90-4d33-B9D4-E00540DBE018)]
  1807. interface _IUmiDsWrapper : IUnknown
  1808. {
  1809. // Returns he real container pointer
  1810. HRESULT GetRealContainer(
  1811. [out] IUnknown** pUnk // IUmiContainer
  1812. );
  1813. };
  1814. //
  1815. // _IWbemUMIContextWrapper - Wrapper Interface to pull UMI related
  1816. // properties from an IWbemContext and apply them to appropriate
  1817. // interfaces.
  1818. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1819. [restricted, object, local, uuid(90F22E4D-3266-4eac-A1B1-837AF5FEDEDD)]
  1820. interface _IWbemUMIContextWrapper : IUnknown
  1821. {
  1822. HRESULT SetConnectionProps(
  1823. [in] long lFlags,
  1824. [in] IWbemContext* pContext,
  1825. [in,out] IUnknown* pUnk
  1826. );
  1827. // Sets the specified System Properties on a connection object
  1828. HRESULT SetQueryProps(
  1829. [in] long lFlags,
  1830. [in] IWbemContext* pContext,
  1831. [in,out] IUnknown* pUnk
  1832. );
  1833. // Sets the specified System Properties on a UMI Query object
  1834. HRESULT SetPropertyListProps(
  1835. [in] long lFlags,
  1836. [in] LPCWSTR pwszName,
  1837. [in] IWbemContext* pContext,
  1838. [in,out] IUnknown* pUnk
  1839. );
  1840. // Sets the specified System Properties on a UMI Query object, filtering on the
  1841. // specified name.
  1842. };
  1843. //
  1844. // _IWmiErrorObject - Wrapper Interface for creating generic WMI
  1845. // error objects. Creates an __ExtendedStatus object, with values
  1846. // we can set.
  1847. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1848. [restricted, object, local, uuid(2EAA0B00-3E3C-4472-8273-67B150267ABB)]
  1849. interface _IWmiErrorObject : IUnknown
  1850. {
  1851. HRESULT SetErrorInfo(
  1852. [in] GUID* pGuidSource,
  1853. [in] DWORD dwHelpContext,
  1854. [in] LPCWSTR pwszHelpFile,
  1855. [in] LPCWSTR pwszSource,
  1856. [in] LPCWSTR pwszDescription,
  1857. [in] LPCWSTR pwszOperation,
  1858. [in] LPCWSTR pwszParameterInfo,
  1859. [in] LPCWSTR pwszProviderName,
  1860. [in] DWORD dwStatusCode
  1861. );
  1862. };
  1863. //
  1864. // _IUmiErrorObject - Wrapper Interface for creating generic UMI based
  1865. // error objects. Creates an __ExtendedStatus object, with values
  1866. // we can set.
  1867. // -- DO NOT MODIFY THIS WITHOUT CHECKING WITH SANJES AND/OR RAYMCC!
  1868. [restricted, object, local, uuid(7B1A99AC-E164-4d25-8DC0-CC4CA89F1BA1)]
  1869. interface _IUmiErrorObject : IUnknown
  1870. {
  1871. HRESULT SetExtendedStatus(
  1872. [in] GUID* pGuidSource,
  1873. [in] IUnknown* pUnk,
  1874. [in] LPCWSTR pwszDescription,
  1875. [in] LPCWSTR pwszOperation,
  1876. [in] LPCWSTR pwszParameterInfo,
  1877. [in] LPCWSTR pwszProviderName
  1878. );
  1879. };
  1880. //***************************************************************************
  1881. //
  1882. //
  1883. interface _IWmiCoreServices;
  1884. interface _IWmiProvSS;
  1885. interface _IWmiESS;
  1886. interface _IWmiFinalizer;
  1887. typedef enum
  1888. {
  1889. WMIESS_INIT_REPOSITORY_RECOVERED = 1
  1890. } WMIESS_FLAGS;
  1891. [object, local, uuid(c0e3eeb3-b2ce-4a6a-9284-f38475cee099)]
  1892. interface _IWmiESS : IUnknown
  1893. {
  1894. HRESULT Initialize(
  1895. [in] long lFlags,
  1896. [in] IWbemContext *pCtx,
  1897. [in] _IWmiCoreServices *pSvc
  1898. );
  1899. HRESULT ExecNotificationQuery(
  1900. [in] LPCWSTR pszNamespace,
  1901. [in] LPCWSTR pszQueryText,
  1902. [in] long lFlags,
  1903. [in] IWbemContext* pContext,
  1904. [in] IWbemObjectSink* pSink
  1905. );
  1906. HRESULT CancelAsyncCall(
  1907. [in] IWbemObjectSink* pSink
  1908. );
  1909. HRESULT QueryObjectSink(
  1910. [in] LPCWSTR pszNamespace,
  1911. [out] IWbemObjectSink** ppNamespaceSink
  1912. );
  1913. };
  1914. // UMI Object wrapper flags
  1915. typedef enum _IWMIPROVSSSINK_FLAGS
  1916. {
  1917. _IWMIPROVSSSINK_FLAGS_LOAD = 0x1 ,
  1918. _IWMIPROVSSSINK_FLAGS_UNLOAD = 0x2 ,
  1919. _IWMIPROVSSSINK_FLAGS_RELOAD = 0x3
  1920. } _IWMIPROVSSSINK_FLAGS;
  1921. [object, uuid(2a504ca2-ca90-4731-87bc-6e99ca2019af) ]
  1922. interface _IWmiProvSSSink : IUnknown
  1923. {
  1924. HRESULT Synchronize (
  1925. long lFlags,
  1926. IWbemContext* pContext,
  1927. LPCWSTR wszNamespace,
  1928. LPCWSTR wszProvider
  1929. );
  1930. };
  1931. [object, uuid(e8107bdf-baaf-4c7c-bb5f-9d732e8d8f07)]
  1932. interface _IWmiProvSS: IUnknown
  1933. {
  1934. HRESULT Initialize(
  1935. [in] long lFlags,
  1936. [in] IWbemContext *pCtx,
  1937. [in] _IWmiCoreServices *pSvc
  1938. );
  1939. HRESULT Create(
  1940. [in] IWbemServices *pCore, // Namespace ptr
  1941. [in] long lFlags,
  1942. [in] IWbemContext *pContext,
  1943. [in,string] LPCWSTR pNamespacePath,
  1944. [in] REFIID riid,
  1945. [out, iid_is(riid)] void **pInterface
  1946. );
  1947. HRESULT RegisterNotificationSink(
  1948. [in] long lFlags,
  1949. [in] IWbemContext *pContext,
  1950. [in] _IWmiProvSSSink* pSink
  1951. );
  1952. HRESULT UnRegisterNotificationSink(
  1953. [in] long lFlags,
  1954. [in] IWbemContext *pContext,
  1955. [in] _IWmiProvSSSink* pSink
  1956. );
  1957. HRESULT CreateRefresherManager(
  1958. [in] IWbemServices *pCore, // Namespace ptr
  1959. [in] long lFlags,
  1960. [in] IWbemContext *pContext,
  1961. [in] REFIID riid,
  1962. [out, iid_is(riid)] void **pInterface
  1963. );
  1964. };
  1965. //***************************************************************************
  1966. [object, local, restricted, uuid(6d8d984b-9965-4023-921a-610b348ee54e)]
  1967. interface _IWmiUserHandle : _IWmiCoreHandle
  1968. {
  1969. };
  1970. [object, local, restricted, uuid(52631080-ab99-46f4-b3c4-da127b94bed5)]
  1971. interface _IWmiConnectionHandle : _IWmiCoreHandle
  1972. {
  1973. };
  1974. //***************************************************************************
  1975. [object, local, uuid(dc9a2bf5-c244-4a01-9206-f28cd51a3c3d)]
  1976. interface _IWmiThreadSecHandle : _IWmiCoreHandle
  1977. {
  1978. HRESULT GetTokenOrigin ( [out] WMI_THREAD_SECURITY_ORIGIN *a_Origin ) ;
  1979. /*
  1980. * Analyzes the stored security token, tells caller what
  1981. * impersonation level would occur
  1982. */
  1983. HRESULT GetImpersonation ( [out] DWORD *a_Level ) ;
  1984. /*
  1985. * Analyzes the stored security token, tells caller what
  1986. * impersonation level would occur
  1987. */
  1988. HRESULT GetAuthentication ( [out] DWORD *a_Level ) ;
  1989. /*
  1990. * Domain\user of the thread.security handle
  1991. */
  1992. HRESULT GetUser ( [in,out] ULONG *a_Size , [in,out] LPWSTR a_Buffer ) ;
  1993. /*
  1994. * Sid of the thread.security handle
  1995. */
  1996. HRESULT GetUserSid ( [in,out] ULONG *a_Size , [in,out] PSID a_Sid ) ;
  1997. /*
  1998. * This is actually a PLUID, but LUID isn't defined in std idls yet
  1999. */
  2000. HRESULT GetAuthenticationLuid ( [out] LPVOID a_Luid ) ;
  2001. /*
  2002. * Returns the 'real' thread token
  2003. * Caller must call CloseHandle ().
  2004. * return WBEM_E_NO_TOKEN if no token
  2005. */
  2006. HRESULT GetToken ( [out] HANDLE *a_ThreadToken ) ;
  2007. } ;
  2008. //***************************************************************************
  2009. [object, local, uuid(b19f2ce0-5df4-40e5-8b1d-dc5f3cf39d65)]
  2010. interface _IWmiCallSec : IUnknown
  2011. {
  2012. /*
  2013. * Analyzes the calling thread, tells caller the
  2014. * current impersonation level
  2015. */
  2016. HRESULT GetImpersonation ( [out] DWORD *a_Level ) ;
  2017. /*
  2018. * Domain\user of the calling thread
  2019. */
  2020. HRESULT GetUser ( [in,out] ULONG *a_Size , [in,out] LPWSTR a_Buffer ) ;
  2021. /*
  2022. * Sid of the calling thread.
  2023. */
  2024. HRESULT GetUserSid ( [in,out] ULONG *a_Size , [in,out] PSID a_Sid ) ;
  2025. /*
  2026. * This is actually a PLUID, but LUID isn't defined in std idls yet
  2027. */
  2028. HRESULT GetAuthenticationLuid ( [out] LPVOID a_Luid ) ;
  2029. /*
  2030. * Get or manufacture an internal thread security token
  2031. */
  2032. HRESULT GetThreadSecurity ( [in] WMI_THREAD_SECURITY_ORIGIN a_Origin , [out] _IWmiThreadSecHandle **a_ThreadSecurity ) ;
  2033. /*
  2034. * Set the current internal thread security.token
  2035. */
  2036. HRESULT SetThreadSecurity ( [in] _IWmiThreadSecHandle *a_ThreadSecurity ) ;
  2037. } ;
  2038. //***************************************************************************
  2039. [object,uuid(07435309-D440-41B7-83F3-EB82DB6C622F)]
  2040. interface _IWmiProviderHost : IUnknown
  2041. {
  2042. HRESULT GetObject (
  2043. [in] REFCLSID rclsid ,
  2044. [in] long lFlags,
  2045. [in] IWbemContext *pContext,
  2046. [in] REFIID riid,
  2047. [out, iid_is(riid)] void **pInterface
  2048. ) ;
  2049. HRESULT GetProcessIdentifier ( [out] DWORD *a_ProcessIdentifier ) ;
  2050. } ;
  2051. //***************************************************************************
  2052. [object,uuid(21CD80A2-B305-4f37-9D4C-4534A8D9B568)]
  2053. interface _IWmiProviderFactory : IUnknown
  2054. {
  2055. HRESULT GetHostedProvider (
  2056. [in] long lFlags,
  2057. [in] IWbemContext *pContext ,
  2058. [in,unique] GUID *a_TransactionIdentifier,
  2059. [in,string,unique] LPCWSTR pszUser,
  2060. [in,string,unique] LPCWSTR pszLocale,
  2061. [in,string,unique] LPCWSTR pPath,
  2062. [in,string] LPCWSTR pName,
  2063. [in] ULONG uHost,
  2064. [in,string,unique] LPCWSTR pHostingGroup,
  2065. [in] REFIID riid,
  2066. [out, iid_is(riid)] void **pInterface
  2067. );
  2068. HRESULT GetClassProvider (
  2069. [in] long lFlags,
  2070. [in] IWbemContext *pContext ,
  2071. [in,string,unique] LPCWSTR pszUser,
  2072. [in,string,unique] LPCWSTR pszLocale,
  2073. [in,string] LPCWSTR pPath,
  2074. [in] IWbemClassObject *pSuperclass,
  2075. [in] REFIID riid,
  2076. [out, iid_is(riid)] void **pInterface
  2077. );
  2078. HRESULT GetProvider (
  2079. [in] WmiInternalContext a_InternalContext ,
  2080. [in] long lFlags,
  2081. [in] IWbemContext *pContext ,
  2082. [in,unique] GUID *a_TransactionIdentifier,
  2083. [in,string,unique] LPCWSTR pszUser,
  2084. [in,string,unique] LPCWSTR pszLocale,
  2085. [in,string,unique] LPCWSTR pPath,
  2086. [in,string] LPCWSTR pName,
  2087. [in] REFIID riid,
  2088. [out, iid_is(riid)] void **pInterface
  2089. );
  2090. HRESULT GetDynamicPropertyResolver (
  2091. [in] long lFlags,
  2092. [in] IWbemContext *pContext,
  2093. [in,string,unique] LPCWSTR pszUser,
  2094. [in,string,unique] LPCWSTR pszLocale,
  2095. [in] REFIID riid,
  2096. [out, iid_is(riid)] void **pInterface
  2097. );
  2098. HRESULT GetDecoupledProvider (
  2099. [in] long lFlags,
  2100. [in] IWbemContext *pContext ,
  2101. [in,string,unique] LPCWSTR pszUser,
  2102. [in,string,unique] LPCWSTR pszLocale,
  2103. [in,string] LPCWSTR pPath,
  2104. [in,string] LPCWSTR pName,
  2105. [in] REFIID riid,
  2106. [out, iid_is(riid)] void **pInterface
  2107. );
  2108. };
  2109. [object, uuid(BAC6B661-167E-4957-AD77-286AB256585E)]
  2110. interface _IWmiDynamicPropertyResolver : IUnknown
  2111. {
  2112. HRESULT Read(
  2113. [in] IWbemContext *a_Context,
  2114. [in] IWbemClassObject *a_Class,
  2115. [in,out] IWbemClassObject **a_Instance
  2116. );
  2117. HRESULT Write(
  2118. [in] IWbemContext *a_Context,
  2119. [in] IWbemClassObject *a_Class,
  2120. [in] IWbemClassObject *a_Instance
  2121. );
  2122. } ;
  2123. [object,uuid(5fba5051-3124-4112-b723-46bfbaf1d622)]
  2124. interface _IWmiProviderInitialize : IUnknown
  2125. {
  2126. HRESULT Initialize (
  2127. [in] long a_Flags ,
  2128. [in] IWbemContext *a_Context ,
  2129. [in,unique] GUID *a_TransactionIdentifier,
  2130. [in,string,unique] LPCWSTR a_User,
  2131. [in,string,unique] LPCWSTR a_Locale,
  2132. [in,string] LPCWSTR a_Namespace ,
  2133. [in] IWbemServices *a_Repository ,
  2134. [in,unique] IWbemServices *a_Service ,
  2135. [in] IWbemProviderInitSink *a_InitializeSink
  2136. ) ;
  2137. HRESULT WaitProvider (
  2138. [in] IWbemContext *a_Context ,
  2139. [in] ULONG a_Timeout
  2140. ) ;
  2141. HRESULT GetInitializeResult () ;
  2142. HRESULT IsPerUserInitialization ( [out] BOOL *a_Value ) ;
  2143. HRESULT IsPerLocaleInitialization ( [out] BOOL *a_Value ) ;
  2144. HRESULT GetHosting ( [out] ULONG *a_Value ) ;
  2145. HRESULT GetHostingGroup ( [out,string] BSTR *a_Value ) ;
  2146. HRESULT IsInternal ( [out] BOOL *a_Value ) ;
  2147. } ;
  2148. [object,uuid(b1b55910-8ba0-47a5-a16e-2b733b1d987c)]
  2149. interface _IWmiProviderStack : IUnknown
  2150. {
  2151. HRESULT DownLevel (
  2152. [in] long a_Flags ,
  2153. [in] IWbemContext *a_Context ,
  2154. [in] REFIID riid,
  2155. [out, iid_is(riid)] void **pInterface
  2156. ) ;
  2157. } ;
  2158. [object,uuid(06413D98-405C-4a5a-8D6F-19B8B7C6ACF7)]
  2159. interface _IWmiProviderFactoryInitialize : IUnknown
  2160. {
  2161. HRESULT Initialize (
  2162. [in,unique] _IWmiProvSS *a_SubSystem ,
  2163. [in,unique] _IWmiProviderFactory *a_OuterFactory ,
  2164. [in] long a_Flags ,
  2165. [in] IWbemContext *a_Context ,
  2166. [in,string] LPCWSTR a_Namespace ,
  2167. [in] IWbemServices *a_Repository ,
  2168. [in,unique] IWbemServices *a_Service
  2169. ) ;
  2170. } ;
  2171. [object,uuid(fec1b0ac-5808-4033-a915-c0185934581e)]
  2172. interface _IWmiProviderSite : IUnknown
  2173. {
  2174. HRESULT GetSite ( [out] DWORD *a_ProcessIdentifier ) ;
  2175. HRESULT SetContainer ( [in,unique] IUnknown *a_Container ) ;
  2176. } ;
  2177. [object,uuid(eb658b8a-7a64-4ddc-9b8d-a92610db0206)]
  2178. interface _IWmiProviderQuota : IUnknown
  2179. {
  2180. HRESULT Violation (
  2181. [in] long a_Flags ,
  2182. [in] IWbemContext *a_Context ,
  2183. [in] IWbemClassObject *a_Object
  2184. ) ;
  2185. } ;
  2186. [object,uuid(48ff3109-a366-4b56-b340-01fae758ba64)]
  2187. interface _IWmiProviderAbnormalShutdown : IUnknown
  2188. {
  2189. HRESULT AbnormalShutdown () ;
  2190. } ;
  2191. [object,uuid(f0e4edde-475a-498a-93d7-d4347f68a8f3)]
  2192. interface _IWmiProviderCache : IUnknown
  2193. {
  2194. HRESULT Expel (
  2195. [in] long a_Flags ,
  2196. [in] IWbemContext *a_Context
  2197. ) ;
  2198. HRESULT ForceReload () ;
  2199. } ;
  2200. typedef enum
  2201. {
  2202. WBEM_PROVIDER_CONFIGURATION_CLASS_ID_INSTANCE_PROVIDER_REGISTRATION = 0
  2203. } WBEM_PROVIDER_CONFIGURATION_CLASS_ID ;
  2204. typedef enum
  2205. {
  2206. WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID_EXTENDEDQUERY_SUPPORT = 0
  2207. } WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID ;
  2208. [object,uuid(6b3fc272-bf37-4968-933a-6df9222a2607)]
  2209. interface _IWmiProviderConfiguration : IUnknown
  2210. {
  2211. HRESULT Get (
  2212. [in,unique] IWbemServices *a_Service ,
  2213. [in] long a_Flags ,
  2214. [in] IWbemContext *a_Context ,
  2215. [in,string] LPCWSTR a_Class ,
  2216. [in,string] LPCWSTR a_Path ,
  2217. [in] IWbemObjectSink *a_Sink
  2218. ) ;
  2219. HRESULT Enumerate (
  2220. [in,unique] IWbemServices *a_Service ,
  2221. [in] long a_Flags ,
  2222. [in] IWbemContext *a_Context ,
  2223. [in,string] LPCWSTR a_Class ,
  2224. [in] IWbemObjectSink *a_Sink
  2225. ) ;
  2226. HRESULT Set (
  2227. [in,unique] IWbemServices *a_Service ,
  2228. [in] long a_Flags ,
  2229. [in] IWbemContext *a_Context ,
  2230. [in,string] LPCWSTR a_Provider ,
  2231. [in,string] LPCWSTR a_Class ,
  2232. [in,string] LPCWSTR a_Path ,
  2233. [in] IWbemClassObject *a_OldObject ,
  2234. [in] IWbemClassObject *a_NewObject
  2235. ) ;
  2236. HRESULT Deleted (
  2237. [in,unique] IWbemServices *a_Service ,
  2238. [in] long a_Flags ,
  2239. [in] IWbemContext *a_Context ,
  2240. [in,string] LPCWSTR a_Provider ,
  2241. [in,string] LPCWSTR a_Class ,
  2242. [in,string] LPCWSTR a_Path ,
  2243. [in] IWbemClassObject *a_Object
  2244. ) ;
  2245. HRESULT Shutdown (
  2246. [in,unique] IWbemServices *a_Service ,
  2247. [in] long a_Flags ,
  2248. [in] IWbemContext *a_Context ,
  2249. [in,string] LPCWSTR a_Provider ,
  2250. [in] ULONG a_MilliSeconds
  2251. ) ;
  2252. HRESULT Call (
  2253. [in,unique] IWbemServices *a_Service ,
  2254. [in] long a_Flags ,
  2255. [in] IWbemContext *a_Context ,
  2256. [in,string] LPCWSTR a_Class ,
  2257. [in,string] LPCWSTR a_Path ,
  2258. [in,string] LPCWSTR a_Method,
  2259. [in] IWbemClassObject *a_InParams,
  2260. [in] IWbemObjectSink *a_Sink
  2261. ) ;
  2262. HRESULT Query (
  2263. [in,unique] IWbemServices *a_Service ,
  2264. [in] long a_Flags ,
  2265. [in] IWbemContext *a_Context ,
  2266. [in] WBEM_PROVIDER_CONFIGURATION_CLASS_ID a_ClassIdentifier ,
  2267. [in] WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID a_PropertyIdentifer ,
  2268. [in,out] VARIANT *a_Value
  2269. ) ;
  2270. } ;
  2271. [object,uuid(484e3ece-1f81-4591-b9d4-943ba13b609d)]
  2272. interface _IWmiProviderLoad : IUnknown
  2273. {
  2274. HRESULT Unload (
  2275. [in] long a_Flags ,
  2276. [in] IWbemContext *a_Context
  2277. ) ;
  2278. HRESULT Load (
  2279. [in] long a_Flags ,
  2280. [in] IWbemContext *a_Context
  2281. ) ;
  2282. }
  2283. [object,uuid(41aa40e6-2fba-4e80-ade9-34306567206d)]
  2284. interface _IWmiProviderSubsystemRegistrar : IUnknown
  2285. {
  2286. HRESULT Register (
  2287. [in] long a_Flags ,
  2288. [in] IWbemContext *a_Context ,
  2289. [in,unique] LPCWSTR a_User ,
  2290. [in,unique] LPCWSTR a_Locale ,
  2291. [in] LPCWSTR a_Scope ,
  2292. [in] LPCWSTR a_Registration ,
  2293. [in] DWORD a_ProcessIdentifier ,
  2294. [in] IUnknown *a_Unknown ,
  2295. [in] GUID a_Identity
  2296. ) ;
  2297. HRESULT UnRegister (
  2298. [in] long a_Flags ,
  2299. [in] IWbemContext *a_Context ,
  2300. [in,unique] LPCWSTR a_User ,
  2301. [in,unique] LPCWSTR a_Locale ,
  2302. [in] LPCWSTR a_Scope ,
  2303. [in] LPCWSTR a_Registration ,
  2304. [in] GUID a_Identity
  2305. ) ;
  2306. } ;
  2307. //***************************************************************************
  2308. // This is obtained by a QI from IWbemContext
  2309. typedef enum
  2310. {
  2311. WMI_CTX_ID_ORIGIN = 1,
  2312. WMI_CTX_CLIENT_TYPE = 2,
  2313. } WMI_CTX_ID_TYPE;
  2314. typedef enum
  2315. {
  2316. // FOR WMI_CTX_ID_ORIGIN
  2317. WMI_CTX_INF_ORIGINAL = 1,
  2318. WMI_CTX_INF_DEPENDENT = 2,
  2319. WMI_CTX_INF_TASK_ID = 3,
  2320. // FOR WMI_CTX_ID_CLIENT_TYPE
  2321. WMI_CTX_INF_CORE = 1,
  2322. WMI_CTX_INF_INPROC_PROVIDER = 2,
  2323. WMI_CTX_INF_REMOTE_PROVIDER = 3,
  2324. WMI_CTX_INF_CLIENT = 4,
  2325. WMI_CTX_INF_ESS = 5,
  2326. WMI_CTX_INF_PROVSS = 6
  2327. } WMI_CTX_INFO;
  2328. [object, uuid(1999cb72-c88d-40a3-a5aa-35eaed377e61)]
  2329. interface _IWmiContext : IUnknown
  2330. {
  2331. HRESULT Set(
  2332. [in] ULONG uID,
  2333. [in] ULONG uValue
  2334. );
  2335. HRESULT Get(
  2336. [in] ULONG uID,
  2337. [out] ULONG *puValue
  2338. );
  2339. };
  2340. //***************************************************************************
  2341. typedef enum
  2342. {
  2343. WMI_HOOK_FLAG_ORIGINAL_OBJECT = 1,
  2344. WMI_HOOK_FLAG_NEW_OBJECT = 2,
  2345. WMI_CORE_FLAG_INSTANCE_HOOK = 0x1,
  2346. WMI_CORE_FLAG_CLASS_HOOK = 0x2
  2347. } WMI_HOOK_FLAG_TYPE;
  2348. // Hook status enum values
  2349. // Moved here from wbemcli.idl (RAID 278480).
  2350. typedef [v1_enum] enum tag_WBEMHOOKSTATUS
  2351. {
  2352. WBEM_S_NO_POSTHOOK = 0x40011,
  2353. WBEM_S_POSTHOOK_WITH_BOTH = 0x40012,
  2354. WBEM_S_POSTHOOK_WITH_NEW = 0x40013,
  2355. WBEM_S_POSTHOOK_WITH_STATUS = 0x40014,
  2356. WBEM_S_POSTHOOK_WITH_OLD = 0x40015,
  2357. WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT = 0x40016
  2358. } WBEM_HOOK_STATUS;
  2359. [object, local, uuid(76cc24d6-e776-42bc-9a09-025920f4f486)]
  2360. interface _IWmiCoreWriteHook : IUnknown
  2361. {
  2362. HRESULT PrePut(
  2363. [in] long lFlags, // WBEM_FLAG_INST_PUT, WBEM_FLAG_CLASS_PUT
  2364. [in] long lUserFlags, // Copy of flags in user API
  2365. [in] IWbemContext *pCtx, // Copy of context object, may be NULL
  2366. [in] IWbemPath *pPath, // Optional
  2367. [in] LPCWSTR pszNamespace, // Always present
  2368. [in] LPCWSTR pszClass, // Always present
  2369. [in] _IWmiObject *pCopy // Always present
  2370. );
  2371. // Return WBEM_E_VETO_PUT
  2372. // WBEM_S_POSTHOOK_WITH_STATUS
  2373. // WBEM_S_POSTHOOK_WITH_NEW
  2374. // WBEM_S_POSTHOOK_WITH_BOTH
  2375. // WBEM_S_NO_POSTHOOK
  2376. HRESULT PostPut(
  2377. [in] long lFlags, // WBEM_FLAG_INST_PUT, WBEM_FLAG_CLASS_PUT
  2378. [in] HRESULT hRes, // Result of put
  2379. [in] IWbemContext *pCtx, // Copy of context object, may be NULL
  2380. [in] IWbemPath *pPath, // Optional
  2381. [in] LPCWSTR pszNamespace, // Always present
  2382. [in] LPCWSTR pszClass, // Always present
  2383. [in] _IWmiObject *pNew, // New copy (based on return code of PrePut)
  2384. [in] _IWmiObject *pOld // Old (based on return code of PrePut)
  2385. );
  2386. // Must return WBEM_S_NO_ERROR
  2387. HRESULT PreDelete(
  2388. [in] long lFlags,
  2389. [in] long lUserFlags,
  2390. [in] IWbemContext *pCtx,
  2391. [in] IWbemPath *pPath, // Required
  2392. [in] LPCWSTR pszNamespace, // Required
  2393. [in] LPCWSTR pszClass // Required
  2394. );
  2395. // Return WBEM_E_VETO_DELETE
  2396. // WBEM_S_POSTHOOK_WITH_STATUS
  2397. // WBEM_S_POSTHOOK_WITH_OLD
  2398. // WBEM_S_NO_POSTHOOK
  2399. HRESULT PostDelete(
  2400. [in] long lFlags, // WBEM_FLAG_CLASS_DELETE, WBEM_FLAG_INST_DELETE
  2401. [in] HRESULT hRes, // Result of put
  2402. [in] IWbemContext *pCtx,
  2403. [in] IWbemPath *pPath, // Required
  2404. [in] LPCWSTR pszNamespace, // Required
  2405. [in] LPCWSTR pszClass, // Required
  2406. [in] _IWmiObject *pOld // Based on return of PreDelete
  2407. );
  2408. // Must return WBEM_S_NO_ERROR
  2409. };
  2410. //***************************************************************************
  2411. //
  2412. [object, local, uuid(69a4735b-6328-436b-8d7f-0a641559c585)]
  2413. interface _IWmiQuery : IWbemQuery
  2414. {
  2415. HRESULT Dump([in] LPSTR pszFile);
  2416. };
  2417. //***************************************************************************
  2418. //
  2419. //
  2420. [restricted, object, local,uuid(43F684C8-3A13-4fab-89D8-D47C60F83715)]
  2421. interface _IWmiArbitratee : IUnknown
  2422. {
  2423. HRESULT SetOperationResult(
  2424. [in] ULONG uFlags,
  2425. [in] HRESULT hRes
  2426. );
  2427. HRESULT SetTaskHandle(
  2428. [in] _IWmiCoreHandle *phTask
  2429. );
  2430. HRESULT DumpDebugInfo(
  2431. [in] ULONG uFlags,
  2432. [in] const BSTR strFile
  2433. );
  2434. };
  2435. //***************************************************************************
  2436. //
  2437. //
  2438. [restricted, object, local,uuid(41074D24-7C24-4c4b-B8E8-94DA3466FCCD)]
  2439. interface _IWmiArbitratedQuery : IUnknown
  2440. {
  2441. HRESULT IsMerger( void );
  2442. };
  2443. typedef enum tag_WMIARB_FLAG_TYPE
  2444. {
  2445. WMIARB_REQUEST_NULL = 0x0,
  2446. WMIARB_REQUEST_CONTINUATION = 0x1,
  2447. WMIARB_REQUEST_APPROVAL = 0x2,
  2448. WMIARB_CALL_CANCELLED_CLIENT = 0x4,
  2449. WMIARB_CALL_CANCELLED_THROTTLING = 0x8
  2450. } WMIARB_FLAG_TYPE;
  2451. [restricted, object, local,uuid(f99a3ec1-8329-4d03-ab7a-797410bcc98e)]
  2452. interface _IWmiArbitrator : IUnknown
  2453. {
  2454. HRESULT RegisterTask(
  2455. [in] _IWmiCoreHandle *phTask
  2456. );
  2457. HRESULT UnregisterTask(
  2458. [in] _IWmiCoreHandle *phTask
  2459. );
  2460. HRESULT RegisterUser(
  2461. [in] _IWmiCoreHandle *phUser
  2462. );
  2463. HRESULT UnregisterUser(
  2464. [in] _IWmiCoreHandle *phUser
  2465. );
  2466. HRESULT CheckTask(
  2467. [in] ULONG uFlags,
  2468. [in] _IWmiCoreHandle *phTask
  2469. );
  2470. HRESULT TaskStateChange(
  2471. [in] ULONG uNewState, // Duplicate of the state in the task handle itself
  2472. [in] _IWmiCoreHandle *phTask
  2473. );
  2474. HRESULT CancelTasksBySink(
  2475. [in] ULONG uFlags,
  2476. [in] REFIID riid,
  2477. [in, iid_is(riid)] LPVOID pSink // IWbemObjectSink or IWbemObjectSinkEx
  2478. );
  2479. HRESULT CheckThread(
  2480. [in] ULONG uFlags
  2481. );
  2482. HRESULT CheckUser(
  2483. [in] ULONG uFlags,
  2484. [in] _IWmiUserHandle *phUser
  2485. );
  2486. HRESULT CancelTask(
  2487. [in] ULONG uFlags,
  2488. [in] _IWmiCoreHandle *phTtask
  2489. );
  2490. HRESULT RegisterThreadForTask(
  2491. [in] _IWmiCoreHandle *phTask
  2492. );
  2493. HRESULT UnregisterThreadForTask(
  2494. [in] _IWmiCoreHandle *phTask
  2495. );
  2496. HRESULT Maintenance();
  2497. HRESULT RegisterFinalizer(
  2498. [in] ULONG uFlags,
  2499. [in] _IWmiCoreHandle *phTask,
  2500. [in] _IWmiFinalizer *pFinal
  2501. );
  2502. HRESULT RegisterNamespace(
  2503. [in] _IWmiCoreHandle *phNamespace
  2504. );
  2505. HRESULT UnregisterNamespace(
  2506. [in] _IWmiCoreHandle *phNamespace
  2507. );
  2508. HRESULT ReportMemoryUsage(
  2509. [in] ULONG uFlags,
  2510. [in] LONG lDelta,
  2511. [in] _IWmiCoreHandle *phTask
  2512. );
  2513. HRESULT Throttle(
  2514. [in] ULONG uFlags,
  2515. [in] _IWmiCoreHandle *phTask
  2516. );
  2517. HRESULT RegisterArbitratee(
  2518. [in] ULONG uFlags,
  2519. [in] _IWmiCoreHandle *phTask,
  2520. [in] _IWmiArbitratee *pArbitratee
  2521. );
  2522. HRESULT UnRegisterArbitratee(
  2523. [in] ULONG uFlags,
  2524. [in] _IWmiCoreHandle *phTask,
  2525. [in] _IWmiArbitratee *pArbitratee
  2526. );
  2527. // HRESULT Shutdown();
  2528. };
  2529. //Valid values for the _IWmiFinalizer::Configure uConfigID parameter
  2530. typedef enum
  2531. {
  2532. WMI_FNLZR_FLAG_FAST_TRACK = 0,
  2533. WMI_FNLZR_FLAG_DECOUPLED = 1,
  2534. WMI_FNLZR_FLAG_CANCEL = 2
  2535. } WMI_FNLZR_CFG_TYPE;
  2536. //Values used in the _IWmiFinalizer::SetResultObject uFlags parameter
  2537. typedef enum
  2538. {
  2539. WMI_FNLZR_UNARY_OBJECT = 0,
  2540. WMI_FNLZR_RESULT_SET_OBJECT = 1,
  2541. WMI_FNLZR_STATUS_OBJECT = 2,
  2542. WMI_FNLZE_SET_OBJECT = 3 //Internal to the finalizer. Takes an IWbemObjectSinkEx::Set parameters
  2543. } WMI_FNLZE_RESULT_TYPE;
  2544. typedef enum
  2545. {
  2546. WMI_FNLZR_STATE_NO_INPUT = 0, // No Indicate() or SetStatus() calls so far
  2547. WMI_FNLZR_STATE_ACTIVE = 1, // At least one Indicate() so far
  2548. WMI_FNLZR_STATE_CORE_COMPLETE = 2, // SetStatus was received, but not finished delivering to client
  2549. WMI_FNLZR_STATE_CLIENT_COMPLETE = 3, // Final SetStatus delivered to client
  2550. WMI_FNLZR_STATE_CLIENT_DEAD = 4, // Client not responding, considered dead
  2551. WMI_FNLZR_STATE_PREMATURE_RELEASE = 5, // Internal Release() with no SetStatus()
  2552. WMI_FNLZR_STATE_CANCELED = 6 // Explicitly canceled
  2553. } WMI_FNLZR_INTERNAL_STATE;
  2554. [restricted, object, local,uuid(fe4e94e6-7f40-4447-8240-f154412d9cd6)]
  2555. interface _IWmiFinalizer : IUnknown
  2556. {
  2557. // Also, implements IWbemShutdown
  2558. HRESULT Configure(
  2559. [in] ULONG uFlags,
  2560. [in] ULONG uValue
  2561. );
  2562. // At construct-time
  2563. // Allows decoupled & fast-track configuration with no thread switches
  2564. HRESULT SetTaskHandle(
  2565. [in] _IWmiCoreHandle *phTask
  2566. );
  2567. // Task handle has user-specific stuff. Finalizer just
  2568. // passes this through to _IWmiArbitrator::CheckTask
  2569. HRESULT SetDestinationSink(
  2570. [in] ULONG uFlags,
  2571. [in] REFIID riid,
  2572. [in, iid_is(riid)] LPVOID pSink
  2573. );
  2574. // Supports one of IID_IWbemObjectSink or IID_IWbemObjectSinkEx
  2575. HRESULT SetSelfDestructCallback(
  2576. [in] ULONG uFlags,
  2577. [in] IWbemObjectSinkEx *pSink
  2578. );
  2579. // The callback called during final Release(); Set() is called with the task handle, followed by SetStatus()
  2580. //
  2581. HRESULT GetStatus(
  2582. [out] ULONG* pFlags
  2583. );
  2584. HRESULT NewInboundSink(
  2585. [in] ULONG uFlags,
  2586. [out] IWbemObjectSinkEx **pSink
  2587. );
  2588. HRESULT Merge(
  2589. [in] ULONG uFlags,
  2590. [in] REFIID riid,
  2591. [in] LPVOID pObj
  2592. );
  2593. // Allows merging another Finalizer, _IWmiCache, etc.
  2594. // For sorting, we will create a sorted _IWmiCache and merge it in later when
  2595. // the sort is completed.
  2596. // For setting, getting objects
  2597. HRESULT SetResultObject(
  2598. [in] ULONG uFlags,
  2599. [in] REFIID riid,
  2600. [in] LPVOID pObj
  2601. );
  2602. HRESULT GetResultObject(
  2603. [in] ULONG uFlags,
  2604. [in] REFIID riid,
  2605. [out, iid_is(riid)] LPVOID *pObj
  2606. );
  2607. // Support _IWmiObject, IWbemClassObject, etc.
  2608. // IEnumWbemClassObject
  2609. // _IWmiCache
  2610. // For status-only operations
  2611. HRESULT SetOperationResult(
  2612. [in] ULONG uFlags,
  2613. [in] HRESULT hRes
  2614. );
  2615. HRESULT GetOperationResult(
  2616. [in] ULONG uFlags,
  2617. [in] ULONG uTimeout,
  2618. [out] HRESULT *phRes
  2619. );
  2620. HRESULT CancelTask (
  2621. [in] ULONG uFlags
  2622. );
  2623. };
  2624. //***************************************************************************
  2625. //
  2626. //
  2627. typedef enum
  2628. {
  2629. WMICACHE_CFG_MAX_DISKSPACE = 1,
  2630. WMICACHE_CFG_MAX_MEMORY = 2,
  2631. WMICACHE_CFG_MAX_AGESECONDS = 3,
  2632. } WMICACHE_CFG_TYPE;
  2633. [restricted, object, local, uuid(a784eb18-cf32-49c7-893a-d9889d234cdb)]
  2634. interface _IWmiCache : IUnknown
  2635. {
  2636. HRESULT SetConfigValue(
  2637. [in] ULONG uID,
  2638. [in] ULONG uValue
  2639. );
  2640. HRESULT GetConfigValue(
  2641. [in] ULONG uID,
  2642. [in] ULONG *puValue
  2643. );
  2644. HRESULT Empty(
  2645. [in] ULONG uFlags,
  2646. [in] LPCWSTR pszClass
  2647. );
  2648. HRESULT AddObject(
  2649. [in] ULONG uFlags,
  2650. [in] _IWmiObject *pObj
  2651. );
  2652. // Also subsumes replace functionality
  2653. //
  2654. // __PATH Property is used as a real key
  2655. HRESULT DeleteByPath(
  2656. [in] ULONG uFlags,
  2657. [in] LPCWSTR pszPath
  2658. );
  2659. HRESULT DeleteByPointer(
  2660. [in] ULONG uFlags,
  2661. [in] _IWmiObject *pTarget
  2662. );
  2663. /////////////////
  2664. HRESULT GetByPath(
  2665. [in] ULONG uFlags,
  2666. [in] LPCWSTR pszFullPath,
  2667. [out] _IWmiObject **pObj
  2668. );
  2669. HRESULT BeginEnum(
  2670. [in] ULONG uFlags,
  2671. [in] LPCWSTR pszFilter
  2672. );
  2673. // Filters: uFlags==0==all, uFlags==WMICACHE_CLASS_SHALLOW, WMICACHE_CLASS_DEEP
  2674. HRESULT Next(
  2675. [in] ULONG uBufSize,
  2676. [out, size_is(uBufSize), length_is(*puReturned)] _IWmiObject **pObjects,
  2677. [out] ULONG *puReturned
  2678. );
  2679. };
  2680. //***************************************************************************
  2681. //
  2682. //
  2683. typedef enum
  2684. {
  2685. WMICORE_FLAG_REPOSITORY = 0x1,
  2686. WMICORE_FLAG_SECURITY = 0x2,
  2687. WMICORE_FLAG_CLASS_PROVIDERS = 0x4,
  2688. WMICORE_FLAG_INST_PROVIDERS = 0x8,
  2689. WMICORE_FLAG_PROP_PROVIDERS = 0x10,
  2690. WMICORE_FLAG_ESS_DELIVERY = 0x20,
  2691. WMICORE_FLAG_FULL_SERVICES = 0xFE, // DONT INCLUDE WMICORE_FLAG_REPOSITORY since
  2692. // that seriously limits the usefullness.
  2693. WMICORE_CLIENT_TYPE_SYSTEM = 0x1000,
  2694. WMICORE_CLIENT_TYPE_PROVSS = 0x2000,
  2695. WMICORE_CLIENT_TYPE_ESS = 0x4000,
  2696. WMICORE_CLIENT_TYPE_USER = 0x8000,
  2697. WMICORE_CLIENT_TYPE_PROVIDER = 0x10000,
  2698. WMICORE_CLIENT_TYPE_ALT_TRANSPORT = 0x100000, // used for authenticated login.
  2699. WMICORE_CLIENT_ORIGIN_INPROC = 0x20000,
  2700. WMICORE_CLIENT_ORIGIN_LOCAL = 0x40000,
  2701. WMICORE_CLIENT_ORIGIN_REMOTE = 0x80000,
  2702. WMICORE_FLAG_SETUP_MODE = 0x80000000,
  2703. } WMICORE_FLAG_TYPE;
  2704. [restricted, object, local, uuid(5fc92893-a9be-475f-bf9e-cf50eea1c958)]
  2705. interface _IWmiCoreServices : IUnknown
  2706. {
  2707. HRESULT GetObjFactory(
  2708. [in] long lFlags,
  2709. [out] _IWmiObjectFactory **pFact
  2710. );
  2711. HRESULT GetServices(
  2712. [in,string] LPCWSTR pszNamespace,
  2713. [in,string,unique] LPCWSTR pszUser,
  2714. [in,string,unique] LPCWSTR pszLocale,
  2715. [in] long lFlags,
  2716. [in] REFIID riid,
  2717. [out, iid_is(riid)] void **pServices
  2718. );
  2719. // lFlags == WMI_CORE_FLAG_REPOSITORY
  2720. // lFlags == WMI_CORE_FLAG_ADMIN_ONLY
  2721. // lFlags == WMI_CORE_FLAG_INST_PROVIDERS
  2722. // lFlags == WMI_CORE_FLAG_CLASS_PROVIDERS
  2723. // lFlags == WMI_CORE_FLAG_PROP_PROVIDERS
  2724. // lFlags == WMI_CORE_FLAG_ALL_PROVIDERS
  2725. HRESULT GetRepositoryDriver(
  2726. [in] long lFlags,
  2727. [in] REFIID riid,
  2728. [out, iid_is(riid)] void **pDriver
  2729. );
  2730. HRESULT GetCallSec(
  2731. [in] long lFlags,
  2732. [out] _IWmiCallSec **pCallSec
  2733. );
  2734. HRESULT GetProviderSubsystem(
  2735. [in] long lFlags,
  2736. [out] _IWmiProvSS **pProvSS
  2737. );
  2738. HRESULT StopEventDelivery();
  2739. HRESULT StartEventDelivery();
  2740. HRESULT DeliverIntrinsicEvent(
  2741. [in] LPCWSTR pszNamespace, // Normalized to \\.\ns1\n2... etc.
  2742. [in] ULONG uType, // WBEM_EVENTTYPE_ const
  2743. [in] IWbemContext *pCtx, // If available
  2744. [in] LPCWSTR pszParam, // Required: Class name, or new namespace name (isolated name, not path)
  2745. [in] LPCWSTR pszTransGuid, // GUID in string form transaction, NULL if not in a transaction
  2746. [in] ULONG uObjectCount,
  2747. [in] _IWmiObject **ppObjList // Target Object [in modification events [0]=new object, [1]=old object
  2748. );
  2749. HRESULT DeliverExtrinsicEvent(
  2750. [in] LPCWSTR pszNamespace,
  2751. [in] ULONG uFlags,
  2752. [in] IWbemContext *pCtx,
  2753. [in] _IWmiObject *pEvt
  2754. );
  2755. HRESULT IncrementCounter(
  2756. [in] ULONG uID,
  2757. [in] ULONG uParam
  2758. );
  2759. HRESULT DecrementCounter(
  2760. [in] ULONG uID,
  2761. [in] ULONG uParam
  2762. );
  2763. HRESULT SetCounter(
  2764. [in] ULONG uID,
  2765. [in] ULONG uParam
  2766. );
  2767. HRESULT GetSelfInstInstances(
  2768. [in] LPCWSTR pszClass,
  2769. [in] IWbemObjectSink *pSink
  2770. );
  2771. HRESULT GetSystemObjects(
  2772. [in] ULONG lFlags, // see tag_WBEM_GET_SYSTEM_OBJECTS_FLAG for values
  2773. [out] ULONG * puArraySize,
  2774. [out] _IWmiObject **pObjects // Avoid an enumerator; just return an array
  2775. );
  2776. HRESULT GetSystemClass(
  2777. [in] LPCWSTR pszClassName,
  2778. [out] _IWmiObject **pClassDef
  2779. );
  2780. HRESULT GetConfigObject(
  2781. ULONG uID, // Integer-based path;
  2782. [out] _IWmiObject **pCfgObject
  2783. );
  2784. HRESULT RegisterWriteHook(
  2785. [in] ULONG uFlags, // WMI_CORE_FLAG_INSTANCE_HOOK | WMI_CORE_FLAG_CLASS_HOOK
  2786. [in] _IWmiCoreWriteHook *pHook
  2787. );
  2788. HRESULT UnregisterWriteHook(
  2789. [in] _IWmiCoreWriteHook *pHook
  2790. );
  2791. HRESULT CreateCache(
  2792. [in] ULONG uFlags,
  2793. [out] _IWmiCache **pCache
  2794. );
  2795. HRESULT CreateFinalizer(
  2796. [in] ULONG uFlags,
  2797. [out] _IWmiFinalizer **pFinalizer
  2798. );
  2799. HRESULT CreatePathParser(
  2800. [in] ULONG uFlags,
  2801. [out] IWbemPath **pParser
  2802. );
  2803. HRESULT CreateQueryParser(
  2804. [in] ULONG uFlags,
  2805. [out] _IWmiQuery **pQuery
  2806. );
  2807. HRESULT GetDecorator(
  2808. [in] ULONG uFlags,
  2809. [out] IWbemDecorator **pDec
  2810. );
  2811. HRESULT GetServices2(
  2812. [in] LPCWSTR pszPath,
  2813. [in] LPCWSTR pszUser,
  2814. [in] IWbemContext *pCtx,
  2815. [in] ULONG uClientFlags, // Copy of client's flags
  2816. [in] DWORD dwSecFlags,
  2817. [in] DWORD dwPermissions,
  2818. [in] ULONG uInternalFlags, // One or more WMICORE_CLIENT_TYPE flags
  2819. [in] LPCWSTR pszClientMachine,
  2820. [in] DWORD dwClientProcessID,
  2821. [in] REFIID riid,
  2822. [out, iid_is(riid)] void **pServices
  2823. );
  2824. HRESULT GetConnector(
  2825. [in] ULONG uFlags, // see WBEM_CONNECTION_TYPE
  2826. [out] IWbemConnection **pConnect
  2827. );
  2828. HRESULT NewPerTaskHook(
  2829. [out] _IWmiCoreWriteHook **pHook
  2830. );
  2831. HRESULT GetArbitrator(
  2832. [out] _IWmiArbitrator **pArb
  2833. );
  2834. HRESULT InitRefresherMgr(
  2835. [in] long lFlags
  2836. );
  2837. };
  2838. //***************************************************************************
  2839. [restricted, object, local, uuid(7698dab9-9327-4fce-8b0d-3a276cf2d6e3)]
  2840. interface _IWmiDecorator : IUnknown
  2841. {
  2842. HRESULT DecorateObject(
  2843. [in] LPCWSTR pszServer, // can be NULL
  2844. [in] LPCWSTR pszScopePrefix,
  2845. [in] LONG lFlags, // Use local machine name, use dot, etc.
  2846. [in] _IWmiObject *pObj
  2847. );
  2848. // Unresolved: How do we decorate scoped objects?
  2849. HRESULT UndecorateObject(
  2850. [in] _IWmiObject *pObj
  2851. );
  2852. };
  2853. //***************************************************************************
  2854. [object, local, restricted, uuid(6603d042-e217-45d7-b706-b07ec7c06490)]
  2855. interface IWbemToken : IUnknown
  2856. {
  2857. HRESULT AccessCheck(
  2858. [in] DWORD dwDesiredAccess,
  2859. [in] const byte* pSD,
  2860. [out] DWORD* pdwGrantedAccess);
  2861. };
  2862. [object, local, restricted, uuid(b1eb126b-4a5e-4848-9e6a-5a513dc7f57a)]
  2863. interface IWbemTokenCache : IUnknown
  2864. {
  2865. HRESULT GetToken(
  2866. [in] const byte* pSid,
  2867. [out] IWbemToken** ppToken);
  2868. HRESULT Shutdown();
  2869. };
  2870. //***************************************************************************
  2871. [object, local, restricted, uuid(ac062f20-9935-4aae-98eb-0532fb17147a)]
  2872. interface _IWmiCoreHandle : IUnknown
  2873. {
  2874. HRESULT GetHandleType([out] ULONG *puType);
  2875. };
  2876. //***************************************************************************
  2877. //***************************************************************************
  2878. [restricted, object, uuid(B60EF4F1-A411-462b-B51E-477CBDBB90B4)]
  2879. interface _IWbemRefresherMgr : IUnknown
  2880. {
  2881. HRESULT AddObjectToRefresher(
  2882. [in] IWbemServices* pNamespace,
  2883. [in] LPCWSTR pwszServerName,
  2884. [in] LPCWSTR pwszNamespace,
  2885. [in] IWbemClassObject* pClassObject,
  2886. [in] WBEM_REFRESHER_ID* pDestRefresherId,
  2887. [in] IWbemClassObject* pInstTemplate,
  2888. [in] long lFlags,
  2889. [in] IWbemContext* pContext,
  2890. [in] IUnknown* pLockMgr,
  2891. [out] WBEM_REFRESH_INFO* pInfo
  2892. );
  2893. HRESULT AddEnumToRefresher(
  2894. [in] IWbemServices* pNamespace,
  2895. [in] LPCWSTR pwszServerName,
  2896. [in] LPCWSTR pwszNamespace,
  2897. [in] IWbemClassObject* pClassObject,
  2898. [in] WBEM_REFRESHER_ID* pDestRefresherId,
  2899. [in] IWbemClassObject* pInstTemplate,
  2900. [in] LPCWSTR wszClass,
  2901. [in] long lFlags,
  2902. [in] IWbemContext* pContext,
  2903. [in] IUnknown* pLockMgr,
  2904. [out] WBEM_REFRESH_INFO* pInfo
  2905. );
  2906. HRESULT GetRemoteRefresher(
  2907. [in] WBEM_REFRESHER_ID* pRefresherId,
  2908. [in] long lFlags,
  2909. [in] BOOL fAddRefresher,
  2910. [out] IWbemRemoteRefresher** ppRemRefresher,
  2911. [in] IUnknown* pLockMgr,
  2912. [out] GUID* pGuid
  2913. );
  2914. HRESULT Startup(
  2915. [in] long lFlags,
  2916. [in] IWbemContext *pCtx,
  2917. [in] _IWmiProvSS *pProvSS
  2918. );
  2919. HRESULT LoadProvider(
  2920. [in] IWbemServices* pNamespace,
  2921. [in, string] LPCWSTR pwszProviderName,
  2922. [in, string] LPCWSTR pwszNamespace,
  2923. [in] IWbemContext * pContext,
  2924. [out] IWbemHiPerfProvider** ppProv,
  2925. [out] _IWmiProviderStack** ppProvStack );
  2926. };
  2927. [restricted, object, uuid(6963B029-B969-40aa-9180-2B2F84075973)]
  2928. interface _IWbemFetchRefresherMgr : IUnknown
  2929. {
  2930. HRESULT Get( [out] _IWbemRefresherMgr** ppMgr );
  2931. HRESULT Init(
  2932. [in] _IWmiProvSS* pProvSS,
  2933. [in] IWbemServices* pSvc );
  2934. HRESULT Uninit();
  2935. };
  2936. //***************************************************************************
  2937. //***************************************************************************
  2938. [restricted, object, uuid(25411283-46FC-4326-8DF2-FF5D34B2DFEF)]
  2939. interface _IWbemConfigureRefreshingSvcs : IUnknown
  2940. {
  2941. HRESULT SetServiceData(
  2942. [in] BSTR pwszMachineName,
  2943. [in] BSTR pwszNamespace
  2944. );
  2945. };
  2946. [restricted, local, object, uuid(368732C2-80D8-403e-854B-1B2BAFB9842C)]
  2947. interface _IWbemEnumMarshaling : IUnknown
  2948. {
  2949. HRESULT GetMarshalPacket(
  2950. [in] REFGUID proxyGUID,
  2951. [in] ULONG uCount,
  2952. [in, size_is(uCount), length_is(uCount)]
  2953. IWbemClassObject** apObjects,
  2954. [out] ULONG* pdwBuffSize,
  2955. [out, size_is(,*pdwBuffSize)] byte** pBuffer
  2956. );
  2957. };
  2958. //***************************************************************************
  2959. //***************************************************************************
  2960. [object, uuid(6919dd07-1637-4611-a8a7-c16fac5b2d53)]
  2961. interface Internal_IWbemProviderInit : IUnknown
  2962. {
  2963. HRESULT Internal_Initialize (
  2964. [in] WmiInternalContext a_InternalContext ,
  2965. [in, unique, string] LPWSTR wszUser,
  2966. [in] LONG lFlags,
  2967. [in, string] LPWSTR wszNamespace,
  2968. [in, unique, string] LPWSTR wszLocale,
  2969. [in] IWbemServices* pNamespace,
  2970. [in] IWbemContext* pCtx,
  2971. [in] IWbemProviderInitSink* pInitSink
  2972. ) ;
  2973. };
  2974. [restricted, object, uuid(2b322b6e-a9df-44e3-97bf-259e3583fda4)]
  2975. interface Internal_IWbemProviderIdentity : IUnknown
  2976. {
  2977. HRESULT Internal_SetRegistrationObject(
  2978. [in] WmiInternalContext a_InternalContext ,
  2979. [in] long lFlags,
  2980. [in] IWbemClassObject* pProvReg);
  2981. };
  2982. [object, uuid(f50a28cf-5c9c-4f7e-9d80-e25e16e18c59)]
  2983. interface Internal_IWbemServices : IUnknown
  2984. {
  2985. // Context.
  2986. // ========
  2987. HRESULT Internal_OpenNamespace (
  2988. [in] WmiInternalContext a_InternalContext ,
  2989. [in] const BSTR strNamespace,
  2990. [in] long lFlags,
  2991. [in] IWbemContext* pCtx,
  2992. [out, OPTIONAL] IWbemServices** ppWorkingNamespace,
  2993. [out, OPTIONAL] IWbemCallResult** ppResult
  2994. );
  2995. HRESULT Internal_CancelAsyncCall(
  2996. [in] WmiInternalContext a_InternalContext ,
  2997. [in] IWbemObjectSink* pSink
  2998. );
  2999. HRESULT Internal_QueryObjectSink(
  3000. [in] WmiInternalContext a_InternalContext ,
  3001. [in] long lFlags,
  3002. [out] IWbemObjectSink** ppResponseHandler
  3003. );
  3004. // Classes and instances.
  3005. // ======================
  3006. HRESULT Internal_GetObject(
  3007. [in] WmiInternalContext a_InternalContext ,
  3008. [in] const BSTR strObjectPath,
  3009. [in] long lFlags,
  3010. [in] IWbemContext* pCtx,
  3011. [out, OPTIONAL] IWbemClassObject** ppObject,
  3012. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3013. );
  3014. HRESULT Internal_GetObjectAsync(
  3015. [in] WmiInternalContext a_InternalContext ,
  3016. [in] const BSTR strObjectPath,
  3017. [in] long lFlags,
  3018. [in] IWbemContext* pCtx,
  3019. [in] IWbemObjectSink* pResponseHandler
  3020. );
  3021. // Class manipulation.
  3022. // ===================
  3023. HRESULT Internal_PutClass(
  3024. [in] WmiInternalContext a_InternalContext ,
  3025. [in] IWbemClassObject* pObject,
  3026. [in] long lFlags,
  3027. [in] IWbemContext* pCtx,
  3028. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3029. );
  3030. HRESULT Internal_PutClassAsync(
  3031. [in] WmiInternalContext a_InternalContext ,
  3032. [in] IWbemClassObject* pObject,
  3033. [in] long lFlags,
  3034. [in] IWbemContext* pCtx,
  3035. [in] IWbemObjectSink* pResponseHandler
  3036. );
  3037. HRESULT Internal_DeleteClass(
  3038. [in] WmiInternalContext a_InternalContext ,
  3039. [in] const BSTR strClass,
  3040. [in] long lFlags,
  3041. [in] IWbemContext* pCtx,
  3042. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3043. );
  3044. HRESULT Internal_DeleteClassAsync(
  3045. [in] WmiInternalContext a_InternalContext ,
  3046. [in] const BSTR strClass,
  3047. [in] long lFlags,
  3048. [in] IWbemContext* pCtx,
  3049. [in] IWbemObjectSink* pResponseHandler
  3050. );
  3051. HRESULT Internal_CreateClassEnum(
  3052. [in] WmiInternalContext a_InternalContext ,
  3053. [in] const BSTR strSuperclass,
  3054. [in] long lFlags,
  3055. [in] IWbemContext* pCtx,
  3056. [out] IEnumWbemClassObject** ppEnum
  3057. );
  3058. HRESULT Internal_CreateClassEnumAsync(
  3059. [in] WmiInternalContext a_InternalContext ,
  3060. [in] const BSTR strSuperclass,
  3061. [in] long lFlags,
  3062. [in] IWbemContext* pCtx,
  3063. [in] IWbemObjectSink* pResponseHandler
  3064. );
  3065. // Instances.
  3066. // ==========
  3067. HRESULT Internal_PutInstance(
  3068. [in] WmiInternalContext a_InternalContext ,
  3069. [in] IWbemClassObject* pInst,
  3070. [in] long lFlags,
  3071. [in] IWbemContext* pCtx,
  3072. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3073. );
  3074. HRESULT Internal_PutInstanceAsync(
  3075. [in] WmiInternalContext a_InternalContext ,
  3076. [in] IWbemClassObject* pInst,
  3077. [in] long lFlags,
  3078. [in] IWbemContext* pCtx,
  3079. [in] IWbemObjectSink* pResponseHandler
  3080. );
  3081. HRESULT Internal_DeleteInstance(
  3082. [in] WmiInternalContext a_InternalContext ,
  3083. [in] const BSTR strObjectPath,
  3084. [in] long lFlags,
  3085. [in] IWbemContext* pCtx,
  3086. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3087. );
  3088. HRESULT Internal_DeleteInstanceAsync(
  3089. [in] WmiInternalContext a_InternalContext ,
  3090. [in] const BSTR strObjectPath,
  3091. [in] long lFlags,
  3092. [in] IWbemContext* pCtx,
  3093. [in] IWbemObjectSink* pResponseHandler
  3094. );
  3095. HRESULT Internal_CreateInstanceEnum(
  3096. [in] WmiInternalContext a_InternalContext ,
  3097. [in] const BSTR strFilter, // allow more things than a class name
  3098. [in] long lFlags,
  3099. [in] IWbemContext* pCtx,
  3100. [out] IEnumWbemClassObject** ppEnum
  3101. );
  3102. HRESULT Internal_CreateInstanceEnumAsync(
  3103. [in] WmiInternalContext a_InternalContext ,
  3104. [in] const BSTR strFilter, // allow more things than a class name
  3105. [in] long lFlags,
  3106. [in] IWbemContext* pCtx,
  3107. [in] IWbemObjectSink* pResponseHandler
  3108. );
  3109. // Queries.
  3110. // ========
  3111. HRESULT Internal_ExecQuery(
  3112. [in] WmiInternalContext a_InternalContext ,
  3113. [in] const BSTR strQueryLanguage,
  3114. [in] const BSTR strQuery,
  3115. [in] long lFlags,
  3116. [in] IWbemContext* pCtx,
  3117. [out] IEnumWbemClassObject** ppEnum
  3118. );
  3119. HRESULT Internal_ExecQueryAsync(
  3120. [in] WmiInternalContext a_InternalContext ,
  3121. [in] const BSTR strQueryLanguage,
  3122. [in] const BSTR strQuery,
  3123. [in] long lFlags,
  3124. [in] IWbemContext* pCtx,
  3125. [in] IWbemObjectSink* pResponseHandler
  3126. );
  3127. HRESULT Internal_ExecNotificationQuery(
  3128. [in] WmiInternalContext a_InternalContext ,
  3129. [in] const BSTR strQueryLanguage,
  3130. [in] const BSTR strQuery,
  3131. [in] long lFlags,
  3132. [in] IWbemContext* pCtx,
  3133. [out] IEnumWbemClassObject** ppEnum
  3134. );
  3135. HRESULT Internal_ExecNotificationQueryAsync(
  3136. [in] WmiInternalContext a_InternalContext ,
  3137. [in] const BSTR strQueryLanguage,
  3138. [in] const BSTR strQuery,
  3139. [in] long lFlags,
  3140. [in] IWbemContext* pCtx,
  3141. [in] IWbemObjectSink* pResponseHandler
  3142. );
  3143. // Methods
  3144. // =======
  3145. HRESULT Internal_ExecMethod(
  3146. [in] WmiInternalContext a_InternalContext ,
  3147. [in] const BSTR strObjectPath,
  3148. [in] const BSTR strMethodName,
  3149. [in] long lFlags,
  3150. [in] IWbemContext* pCtx,
  3151. [in] IWbemClassObject* pInParams,
  3152. [out, OPTIONAL] IWbemClassObject** ppOutParams,
  3153. [out, OPTIONAL] IWbemCallResult** ppCallResult
  3154. );
  3155. HRESULT Internal_ExecMethodAsync(
  3156. [in] WmiInternalContext a_InternalContext ,
  3157. [in] const BSTR strObjectPath,
  3158. [in] const BSTR strMethodName,
  3159. [in] long lFlags,
  3160. [in] IWbemContext* pCtx,
  3161. [in] IWbemClassObject* pInParams,
  3162. [in] IWbemObjectSink* pResponseHandler
  3163. );
  3164. };
  3165. //***************************************************************************
  3166. //***************************************************************************
  3167. [object,uuid(2db9fa90-9973-46cf-b310-9865b644699d)]
  3168. interface Internal_IWbemObjectSink : IUnknown
  3169. {
  3170. HRESULT Internal_Indicate(
  3171. [in] WmiInternalContext a_InternalContext ,
  3172. [in] long lObjectCount,
  3173. [in, size_is(lObjectCount)]
  3174. IWbemClassObject** apObjArray
  3175. );
  3176. HRESULT Internal_SetStatus(
  3177. [in] WmiInternalContext a_InternalContext ,
  3178. [in] long lFlags,
  3179. [in] HRESULT hResult,
  3180. [in] BSTR strParam,
  3181. [in] IWbemClassObject* pObjParam
  3182. );
  3183. };
  3184. //***************************************************************************
  3185. //***************************************************************************
  3186. [object,uuid(ac9ea02a-2c8a-4acd-b562-d7e8ebee8e8e)]
  3187. interface Internal_IEnumWbemClassObject : IUnknown
  3188. {
  3189. HRESULT Internal_Reset(
  3190. [in] WmiInternalContext a_InternalContext
  3191. );
  3192. HRESULT Internal_Next(
  3193. [in] WmiInternalContext a_InternalContext ,
  3194. [in] long lTimeout,
  3195. [in] ULONG uCount,
  3196. [out, size_is(uCount), length_is(*puReturned)]
  3197. IWbemClassObject** apObjects,
  3198. [out] ULONG* puReturned
  3199. );
  3200. HRESULT Internal_NextAsync(
  3201. [in] WmiInternalContext a_InternalContext ,
  3202. [in] ULONG uCount,
  3203. [in] IWbemObjectSink* pSink
  3204. );
  3205. HRESULT Internal_Clone(
  3206. [in] WmiInternalContext a_InternalContext ,
  3207. [out] IEnumWbemClassObject** ppEnum
  3208. );
  3209. HRESULT Internal_Skip(
  3210. [in] WmiInternalContext a_InternalContext ,
  3211. [in] long lTimeout,
  3212. [in] ULONG nCount
  3213. );
  3214. };
  3215. //***************************************************************************
  3216. //***************************************************************************
  3217. [object,uuid(e1cbff9f-4db9-4264-80d1-13ec5d091fd0)]
  3218. interface Internal_IWbemCallResult : IUnknown
  3219. {
  3220. HRESULT Internal_GetResultObject(
  3221. [in] WmiInternalContext a_InternalContext ,
  3222. [in] long lTimeout,
  3223. [out] IWbemClassObject** ppResultObject
  3224. );
  3225. HRESULT Internal_GetResultString(
  3226. [in] WmiInternalContext a_InternalContext ,
  3227. [in] long lTimeout,
  3228. [out] BSTR* pstrResultString
  3229. );
  3230. HRESULT Internal_GetResultServices(
  3231. [in] WmiInternalContext a_InternalContext ,
  3232. [in] long lTimeout,
  3233. [out] IWbemServices** ppServices
  3234. );
  3235. HRESULT Internal_GetCallStatus(
  3236. [in] WmiInternalContext a_InternalContext ,
  3237. [in] long lTimeout,
  3238. [out] long* plStatus
  3239. );
  3240. };
  3241. //***************************************************************************
  3242. //***************************************************************************
  3243. [object,uuid(11caa957-4e80-474e-a819-7fd72148ada9)]
  3244. interface Internal_IWbemPropertyProvider : IUnknown
  3245. {
  3246. HRESULT Internal_GetProperty(
  3247. [in] WmiInternalContext a_InternalContext ,
  3248. [in] long lFlags,
  3249. [in] const BSTR strLocale,
  3250. [in] const BSTR strClassMapping,
  3251. [in] const BSTR strInstMapping,
  3252. [in] const BSTR strPropMapping,
  3253. [out] VARIANT* pvValue
  3254. );
  3255. HRESULT Internal_PutProperty(
  3256. [in] WmiInternalContext a_InternalContext ,
  3257. [in] long lFlags,
  3258. [in] const BSTR strLocale,
  3259. [in] const BSTR strClassMapping,
  3260. [in] const BSTR strInstMapping,
  3261. [in] const BSTR strPropMapping,
  3262. [in] const VARIANT* pvValue
  3263. );
  3264. };
  3265. //***************************************************************************
  3266. //***************************************************************************
  3267. [object,uuid(fd450835-cf1b-4c87-9fd2-5e0d42fde081)]
  3268. interface Internal_IWbemEventProvider : IUnknown
  3269. {
  3270. HRESULT Internal_ProvideEvents(
  3271. [in] WmiInternalContext a_InternalContext ,
  3272. [in] IWbemObjectSink* pSink,
  3273. [in] long lFlags
  3274. );
  3275. };
  3276. //***************************************************************************
  3277. //***************************************************************************
  3278. [object,uuid(df2373f5-efb2-475c-ad58-3102d61967d4)]
  3279. interface Internal_IWbemEventProviderSecurity : IUnknown
  3280. {
  3281. HRESULT Internal_AccessCheck(
  3282. [in] WmiInternalContext a_InternalContext ,
  3283. [in] WBEM_CWSTR wszQueryLanguage,
  3284. [in] WBEM_CWSTR wszQuery,
  3285. [in] long lSidLength,
  3286. [in, size_is(lSidLength), unique] const BYTE* pSid
  3287. );
  3288. };
  3289. //***************************************************************************
  3290. //***************************************************************************
  3291. [object,uuid(854d745c-6742-42c0-8bb9-01ec466b6e87)]
  3292. interface Internal_IWbemEventConsumerProvider : IUnknown
  3293. {
  3294. HRESULT Internal_FindConsumer(
  3295. [in] WmiInternalContext a_InternalContext ,
  3296. [in] IWbemClassObject* pLogicalConsumer,
  3297. [out] IWbemUnboundObjectSink** ppConsumer
  3298. );
  3299. };
  3300. //***************************************************************************
  3301. //***************************************************************************
  3302. [object,uuid(88f3781c-6902-4647-9a6b-a74f450af861)]
  3303. interface Internal_IWbemEventConsumerProviderEx : Internal_IWbemEventConsumerProvider
  3304. {
  3305. HRESULT Internal_ValidateSubscription(
  3306. [in] WmiInternalContext a_InternalContext ,
  3307. [in] IWbemClassObject* pLogicalConsumer
  3308. );
  3309. };
  3310. //***************************************************************************
  3311. //***************************************************************************
  3312. [object,uuid(8a0dc377-a9d3-41cb-bd69-ae1fdaf2dc68)]
  3313. interface Internal_IWbemEventProviderQuerySink : IUnknown
  3314. {
  3315. HRESULT Internal_NewQuery(
  3316. [in] WmiInternalContext a_InternalContext ,
  3317. [in] unsigned long dwId,
  3318. [in] WBEM_WSTR wszQueryLanguage,
  3319. [in] WBEM_WSTR wszQuery
  3320. );
  3321. HRESULT Internal_CancelQuery(
  3322. [in] WmiInternalContext a_InternalContext ,
  3323. [in] unsigned long dwId
  3324. );
  3325. };
  3326. //***************************************************************************
  3327. //***************************************************************************
  3328. [object,uuid(a210bfe9-c9f7-4919-b114-0d98b3d5341e)]
  3329. interface Internal_IWbemUnboundObjectSink : IUnknown
  3330. {
  3331. HRESULT Internal_IndicateToConsumer(
  3332. [in] WmiInternalContext a_InternalContext ,
  3333. [in] IWbemClassObject* pLogicalConsumer,
  3334. [in] long lNumObjects,
  3335. [in, size_is(lNumObjects)] IWbemClassObject** apObjects
  3336. );
  3337. };
  3338. //***************************************************************************
  3339. //***************************************************************************
  3340. [object,uuid(0fc8c622-1728-4149-a57f-ad19d0970710)]
  3341. interface Internal_IWmiProviderConfiguration : IUnknown
  3342. {
  3343. HRESULT Internal_Get (
  3344. [in] WmiInternalContext a_InternalContext ,
  3345. [in,unique] IWbemServices *a_Service ,
  3346. [in] long a_Flags ,
  3347. [in] IWbemContext *a_Context ,
  3348. [in,string] LPCWSTR a_Class ,
  3349. [in,string] LPCWSTR a_Path ,
  3350. [in] IWbemObjectSink *a_Sink
  3351. ) ;
  3352. HRESULT Internal_Enumerate (
  3353. [in] WmiInternalContext a_InternalContext ,
  3354. [in,unique] IWbemServices *a_Service ,
  3355. [in] long a_Flags ,
  3356. [in] IWbemContext *a_Context ,
  3357. [in,string] LPCWSTR a_Class ,
  3358. [in] IWbemObjectSink *a_Sink
  3359. ) ;
  3360. HRESULT Internal_Set (
  3361. [in] WmiInternalContext a_InternalContext ,
  3362. [in,unique] IWbemServices *a_Service ,
  3363. [in] long a_Flags ,
  3364. [in] IWbemContext *a_Context ,
  3365. [in,string] LPCWSTR a_Provider ,
  3366. [in,string] LPCWSTR a_Class ,
  3367. [in,string] LPCWSTR a_Path ,
  3368. [in] IWbemClassObject *a_OldObject ,
  3369. [in] IWbemClassObject *a_NewObject
  3370. ) ;
  3371. HRESULT Internal_Deleted (
  3372. [in] WmiInternalContext a_InternalContext ,
  3373. [in,unique] IWbemServices *a_Service ,
  3374. [in] long a_Flags ,
  3375. [in] IWbemContext *a_Context ,
  3376. [in,string] LPCWSTR a_Provider ,
  3377. [in,string] LPCWSTR a_Class ,
  3378. [in,string] LPCWSTR a_Path ,
  3379. [in] IWbemClassObject *a_Object
  3380. ) ;
  3381. HRESULT Internal_Shutdown (
  3382. [in] WmiInternalContext a_InternalContext ,
  3383. [in,unique] IWbemServices *a_Service ,
  3384. [in] long a_Flags ,
  3385. [in] IWbemContext *a_Context ,
  3386. [in,string] LPCWSTR a_Provider ,
  3387. [in] ULONG a_MilliSeconds
  3388. ) ;
  3389. HRESULT Internal_Call (
  3390. [in] WmiInternalContext a_InternalContext ,
  3391. [in,unique] IWbemServices *a_Service ,
  3392. [in] long a_Flags ,
  3393. [in] IWbemContext *a_Context ,
  3394. [in,string] LPCWSTR a_Class ,
  3395. [in,string] LPCWSTR a_Path ,
  3396. [in,string] LPCWSTR a_Method,
  3397. [in] IWbemClassObject *a_InParams,
  3398. [in] IWbemObjectSink *a_Sink
  3399. ) ;
  3400. HRESULT Internal_Query (
  3401. [in] WmiInternalContext a_InternalContext ,
  3402. [in,unique] IWbemServices *a_Service ,
  3403. [in] long a_Flags ,
  3404. [in] IWbemContext *a_Context ,
  3405. [in] WBEM_PROVIDER_CONFIGURATION_CLASS_ID a_ClassIdentifier ,
  3406. [in] WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID a_PropertyIdentifer ,
  3407. [in,out] VARIANT *a_Value
  3408. ) ;
  3409. } ;
  3410. //***************************************************************************
  3411. //***************************************************************************
  3412. [object,uuid(E7174AED-B55B-42f9-B322-D79F49921012)]
  3413. interface _IWmiProviderAssociatorsHelper : IUnknown
  3414. {
  3415. HRESULT GetReferencesClasses (
  3416. [in] long a_Flags ,
  3417. [in] IWbemContext *a_Context ,
  3418. [in] IWbemObjectSink *a_Sink
  3419. ) ;
  3420. } ;
  3421. //***************************************************************************
  3422. //***************************************************************************
  3423. [uuid(027947f3-d731-11ce-a357-000000000001)]
  3424. library WbemInternal_v1
  3425. {
  3426. importlib("stdole32.tlb");
  3427. typedef enum tag_WBEM_MISC_FLAG_TYPE
  3428. {
  3429. WBEM_FLAG_VALIDATE_CLASS_EXISTENCE = 0x200000,
  3430. WBEM_FLAG_KEEP_SHAPE = 0x100000,
  3431. WBEM_FLAG_NO_CLASS_PROVIDERS = 0x8000,
  3432. WBEM_FLAG_NO_EVENTS = 0x4000,
  3433. WBEM_FLAG_IGNORE_IDS = 0x2000,
  3434. WBEM_FLAG_IS_INOUT = 0x1000,
  3435. } WBEM_MISC_FLAG_TYPE;
  3436. typedef enum tag_WBEM_CLASSPART_FLAG_TYPE
  3437. {
  3438. WBEM_FLAG_CLASSPART_NOT_LOCALIZED = 0x00,
  3439. WBEM_FLAG_CLASSPART_LOCALIZED = 0x01,
  3440. WBEM_FLAG_CLASSPART_LOCALIZATION_MASK = 0x01,
  3441. } WBEM_CLASSPART_FLAG_TYPE;
  3442. typedef enum tag_WBEM_INSTANCEPART_FLAG_TYPE
  3443. {
  3444. WBEM_FLAG_INSTANCEPART_NOT_LOCALIZED = 0x00,
  3445. WBEM_FLAG_INSTANCEPART_LOCALIZED = 0x01,
  3446. WBEM_FLAG_INSTANCEPART_LOCALIZATION_MASK = 0x01,
  3447. } WBEM_INSTANCEPART_FLAG_TYPE;
  3448. typedef enum tag_WBEM_CMPCLSPART_FLAG_TYPE
  3449. {
  3450. WBEM_FLAG_COMPARE_FULL = 0x00,
  3451. WBEM_FLAG_COMPARE_BINARY = 0x01,
  3452. WBEM_FLAG_COMPARE_LOCALIZED = 0x02
  3453. } WBEM_CMPCLSPART_FLAG_TYPE;
  3454. interface IWbemPropertySource;
  3455. interface IWbemRawObjectSink;
  3456. interface IWbemDecorator;
  3457. interface IWbemEventSubsystem_m4;
  3458. interface IWbemCausalityAccess;
  3459. interface IWbemRefreshingServices;
  3460. interface IWbemRemoteRefresher;
  3461. interface IWbemMetaData;
  3462. interface IWbemFilterStub;
  3463. interface IWbemFilterProxy;
  3464. interface IWbemLocalFilterProxy;
  3465. interface IWbemLifeControl;
  3466. interface IWbemCreateSecondaryStub;
  3467. /////////////////////////////////////////////////////////
  3468. //
  3469. // Marshaling proxy for WbemClassObjec
  3470. //
  3471. [restricted, uuid(4590f812-1d3a-11d0-891f-00aa004b2e24)]
  3472. coclass WbemClassObjectProxy
  3473. {
  3474. interface IWbemClassObject;
  3475. interface IMarshal;
  3476. };
  3477. [restricted, uuid(4E6AC63C-BF69-495d-9000-E45A4E517B0C)]
  3478. coclass UmiObjectWrapperProxy
  3479. {
  3480. interface IWbemClassObject;
  3481. interface IMarshal;
  3482. };
  3483. [restricted, uuid(5d08b586-343a-11d0-ad46-00c04fd8fdff)]
  3484. coclass WbemEventSubsystem
  3485. {
  3486. interface IWbemEventSubsystem_m4;
  3487. };
  3488. [restricted, uuid(08a59b5d-dd50-11d0-ad6b-00c04fd8fdff)]
  3489. coclass HmmpEventConsumerProvider
  3490. {
  3491. interface IWbemUnboundObjectSink;
  3492. };
  3493. [restricted, uuid(6c19be35-7500-11d1-ad94-00c04fd8fdff)]
  3494. coclass WbemFilterProxy
  3495. {
  3496. interface IWbemFilterProxy;
  3497. interface IWbemObjectSink;
  3498. };
  3499. [restricted, uuid(4fa18276-912a-11d1-ad9b-00c04fd8fdff)]
  3500. coclass InProcWbemLevel1Login
  3501. {
  3502. interface IWbemLevel1Login;
  3503. };
  3504. [restricted, uuid(3252F829-8694-46a8-B4CF-83F6A0FFEFA9)]
  3505. coclass _WmiFreeFormObject
  3506. {
  3507. interface _IWmiFreeFormObject;
  3508. };
  3509. [restricted, uuid(78103FB7-AED7-4066-8BCD-30BB27B02331)]
  3510. coclass _WmiObjectFactory
  3511. {
  3512. interface _IWmiObjectFactory;
  3513. };
  3514. [restricted, uuid(390150A7-AB20-45ff-A2E0-6B985554CAA8)]
  3515. coclass _WbemUMIContextWrapper
  3516. {
  3517. interface _IWbemUMIContextWrapper;
  3518. };
  3519. [restricted, uuid(E2569DC9-38FA-4749-BEE5-A263E403359F)]
  3520. coclass _WmiErrorObject
  3521. {
  3522. interface _IWmiErrorObject;
  3523. };
  3524. [restricted, uuid(F7D04323-5378-40c1-B588-C84F91E2B82C)]
  3525. coclass _UmiErrorObject
  3526. {
  3527. interface _IUmiErrorObject;
  3528. };
  3529. [uuid(C10B4771-4DA0-11d2-A2F5-00C04F86FB7D)]
  3530. coclass WinmgmtMofCompiler
  3531. {
  3532. interface IWinmgmtMofCompiler;
  3533. };
  3534. [uuid(dc923725-0fdd-45e1-ae74-ea09182e739b)]
  3535. coclass WbemTokenCache
  3536. {
  3537. interface IWbemTokenCache;
  3538. };
  3539. [uuid(f3130cdb-aa52-4c3a-ab32-85ffc23af9c1)]
  3540. coclass WmiESS
  3541. {
  3542. interface _IWmiESS;
  3543. interface IWbemShutdown;
  3544. };
  3545. [uuid(4de225bf-cf59-4cfc-85f7-68b90f185355)]
  3546. coclass WmiProvSS
  3547. {
  3548. interface _IWmiProvSS;
  3549. interface IWbemShutdown;
  3550. };
  3551. [uuid(73E709EA-5D93-4B2E-BBB0-99B7938DA9E4)]
  3552. coclass WmiProviderHost
  3553. {
  3554. interface _IWmiProviderHost ;
  3555. interface IWbemShutdown;
  3556. };
  3557. [uuid(F5A55D36-8750-432C-AB52-AD49A016EABC)]
  3558. coclass WmiProviderBindingFactory
  3559. {
  3560. interface _IWmiProviderFactory ;
  3561. interface _IWmiProviderFactoryInitialize ;
  3562. interface IWbemShutdown;
  3563. };
  3564. [uuid(8BEBCE8B-1AF0-4323-8B4D-36994567CAE1)]
  3565. coclass WmiProviderInProcFactory
  3566. {
  3567. interface _IWmiProviderFactory ;
  3568. interface _IWmiProviderFactoryInitialize ;
  3569. interface IWbemShutdown;
  3570. };
  3571. [uuid(688A906C-0B60-449C-AE2C-40B02AD53E41)]
  3572. coclass WmiProviderHostedInProcFactory
  3573. {
  3574. interface _IWmiProviderFactory ;
  3575. interface _IWmiProviderFactoryInitialize ;
  3576. interface IWbemShutdown;
  3577. };
  3578. [uuid(1860e246-e924-4f73-b2c5-93e0577e3aa1)]
  3579. coclass IWmiCoreServices
  3580. {
  3581. interface _IWmiCoreServices;
  3582. };
  3583. [uuid(0859CCC9-209D-4110-9613-DAB6EAF9093F)]
  3584. coclass _WmiWbemClass
  3585. {
  3586. interface _IWMIObject;
  3587. };
  3588. [uuid(DD51FE78-43E1-405a-A44E-6C226391CF0D)]
  3589. coclass _WmiWbemInstance
  3590. {
  3591. interface _IWMIObject;
  3592. };
  3593. [uuid(da1fc6d2-40e4-4e2f-bb42-e70d28c891b3)]
  3594. coclass _WmiQuery
  3595. {
  3596. interface _IWmiQuery;
  3597. };
  3598. [uuid(C601737E-9213-489f-ADC8-922A894A4A65)]
  3599. coclass _WbemUMIObjectWrapper
  3600. {
  3601. interface _IWbemUMIObjectWrapper;
  3602. };
  3603. [uuid(695B5458-D6E9-4a6a-881F-B68F953397D8)]
  3604. coclass _WbemEmptyClassObject
  3605. {
  3606. interface _IWmiObject;
  3607. };
  3608. [uuid(1108be51-f58a-4cda-bb99-7a0227d11d5e)]
  3609. coclass _IWbemCallSec
  3610. {
  3611. interface _IWmiCallSec;
  3612. };
  3613. [uuid(CD1ABFC8-6C5E-4a8d-B90B-2A3B153B886D)]
  3614. coclass _WbemConfigureRefreshingSvcs
  3615. {
  3616. interface _IWbemConfigureRefreshingSvcs;
  3617. };
  3618. [uuid(DCF33DF4-B510-439f-832A-16B6B514F2A7)]
  3619. coclass _WbemRefresherMgr
  3620. {
  3621. interface _IWbemRefresherMgr;
  3622. interface IWbemShutdown;
  3623. };
  3624. [uuid(288d70f7-11c8-42d5-a612-8e46a7e922d8)]
  3625. coclass _WbemHostedRefresherMgr
  3626. {
  3627. interface _IWbemRefresherMgr;
  3628. interface IWbemShutdown;
  3629. };
  3630. [uuid(ED51D12E-511F-4999-8DCD-C2BAC91BE86E)]
  3631. coclass _WbemComBinding
  3632. {
  3633. interface IWbemComBinding;
  3634. };
  3635. [uuid(D5D3ACEA-EEC7-4efd-A06D-FF54B4271655)]
  3636. coclass _UmiComBinding
  3637. {
  3638. interface IWbemComBinding;
  3639. };
  3640. [uuid(FD2057FA-99FE-4f10-8908-9AA2AAB32A6E)]
  3641. coclass _DSSvcExWrap
  3642. {
  3643. interface IWbemServicesEx;
  3644. interface _IUmiSvcExWrapper;
  3645. };
  3646. [uuid(CC9072AB-C000-49d8-A5AA-00266C8DBB9B)]
  3647. coclass _WbemEnumMarshaling
  3648. {
  3649. interface _IWbemEnumMarshaling;
  3650. };
  3651. [uuid(5839FCA9-774D-42a1-ACDA-D6A79037F57F)]
  3652. coclass _WbemFetchRefresherMgr
  3653. {
  3654. interface _IWbemFetchRefresherMgr;
  3655. };
  3656. [uuid(4c6055d8-84b9-4111-a7d3-6623894eedb3)]
  3657. coclass WbemConnection
  3658. {
  3659. interface IWbemConnection;
  3660. };
  3661. // This is the actual core implementation of the admin login
  3662. [uuid(1f0bc6ad-46d4-488b-be1f-047fc7505e60)]
  3663. coclass ActualWbemAdministrativeLocator
  3664. {
  3665. interface IWbemLocator;
  3666. };
  3667. // this assumes that the transport has verified that
  3668. // the user has access. Unlike the Administrative locator,
  3669. // it increases the count of external connections
  3670. [uuid(6543d242-a80b-44a3-b828-95c1ec452423)]
  3671. coclass ActualWbemAuthenticatedLocator
  3672. {
  3673. interface IWbemLocator;
  3674. };
  3675. // this is used by providers who dont know if a user
  3676. // has access or not.
  3677. [uuid(ed999ff5-223a-4052-8ece-0b10c8dbaa39)]
  3678. coclass ActualWbemUnauthenticatedLocator
  3679. {
  3680. interface IWbemLocator;
  3681. };
  3682. };
  3683. //***************************************************************************
  3684. // Following interface allows for management of refreshable objects and enums
  3685. // that can be cooked.
  3686. [restricted,local,object,uuid(13ED7E55-8D63-41b0-9086-D0C5C17364C8)]
  3687. interface IWMIRefreshableCooker : IUnknown
  3688. {
  3689. // Adds a new instance to the refreshable cooker. The Refreshable Instance
  3690. // will be updated on calls to recalc.
  3691. HRESULT AddInstance(
  3692. [in] IWbemServices* pService, // The object's namespace
  3693. [in] IWbemContext * pContext, // The context passed from client
  3694. [in] IWbemObjectAccess* pCookingClass, // Cooking class
  3695. [in] IWbemObjectAccess* pCookingInstance, // An instance of the cooking class
  3696. [out] IWbemObjectAccess** ppRefreshableInstance, // A clone of the instance used for refreshing
  3697. [out] long* plId // The id of the refreshable cooking instance
  3698. );
  3699. // Adds a new enumeration to the refreshable cooker. The Refreshable Enumerator
  3700. // will be updated on calls to recalc.
  3701. HRESULT AddEnum(
  3702. [in] IWbemServices* pService, // The object's namespace
  3703. [in] IWbemContext * pContext, // The context passed from client
  3704. [in,string] LPCWSTR szCookingClass, // The cooking class' name
  3705. [in] IWbemHiPerfEnum* pRefreshableEnum, // The enumerator passed in from WMI
  3706. [out] long* plId // THe id of the refreshable cooking enumerator
  3707. );
  3708. // Removes the instance or enumerator specified by ulId from the
  3709. // Refreshable Cooker.
  3710. HRESULT Remove(
  3711. [in] long lId
  3712. );
  3713. // Refreshes all instances and enumerators in the refreshable cooker
  3714. HRESULT Refresh();
  3715. };
  3716. //***************************************************************************
  3717. // Following interface allows for refreshable objects of the same class to be
  3718. // cooked as a group.
  3719. [restricted,local,object,uuid(A239BDF1-0AB1-45a0-8764-159115689589)]
  3720. interface IWMISimpleObjectCooker : IUnknown
  3721. {
  3722. // Sets the class used by the cooker in order to fill out
  3723. // instances when cooking. Once the class is set, it cannot
  3724. // be reset
  3725. HRESULT SetClass(
  3726. [in] WCHAR* wszCookingClassName,
  3727. [in] IWbemObjectAccess* pCookingClass,
  3728. [in] IWbemObjectAccess* pRawClass
  3729. );
  3730. // Retrieves a new cooked instance and an id which can be used
  3731. // to identify it. The instance will not be updated unless
  3732. // a sample instance is bound to it via BeginCooking()
  3733. HRESULT SetCookedInstance(
  3734. [in] IWbemObjectAccess* pCookedInstance,
  3735. [out] long* plId
  3736. );
  3737. // Provides an initial sample for cooking the instance specified
  3738. // by ulId. Once the initial sample is set, it can be
  3739. // cleared by calling BeginCooking again with another
  3740. // instance
  3741. HRESULT BeginCooking(
  3742. [in] long lId,
  3743. [in] IWbemObjectAccess* pSampleInstance,
  3744. [in] unsigned long dwRefresherId
  3745. );
  3746. // Tells the cooker to stop cooking the instance specified
  3747. // by ulId. Cooking can be restarted by calling BeginCooking
  3748. // again.
  3749. HRESULT StopCooking(
  3750. [in] long lId
  3751. );
  3752. // Recalcs all instances using the appropriate cooking instances.
  3753. HRESULT Recalc([in] unsigned long dwRefresherId);
  3754. // Removes an instance from the object cooker
  3755. HRESULT Remove(
  3756. [in] long lId
  3757. );
  3758. // Clears all instances from the cooker.
  3759. HRESULT Reset( void );
  3760. };
  3761. //***************************************************************************
  3762. // Following interface allows for simple cooking of properties whose formulas
  3763. // can be defined using 1 or 2 value samples.
  3764. [restricted,local,object,uuid(510ADF6E-D481-4a64-B74A-CC712E11AA34)]
  3765. interface IWMISimpleCooker : IUnknown
  3766. {
  3767. // Simple method for cooking a two value, one base counter
  3768. HRESULT CookRawValues(
  3769. [in] DWORD dwCookingType,
  3770. [in] DWORD dwNumSamples,
  3771. [in, size_is(dwNumSamples)] __int64* anTimeStamp,
  3772. [in, size_is(dwNumSamples)] __int64* anRawValue,
  3773. [in, size_is(dwNumSamples)] __int64* anBase,
  3774. [in] __int64 nTimeFrequency,
  3775. [in] long Scale,
  3776. [out] __int64* pnResult
  3777. );
  3778. };
  3779. cpp_quote("#define IWbemBinder IWbemConnection")
  3780. cpp_quote("#define IID_IWbemBinder IID_IWbemConnection")
  3781. cpp_quote("#define CLSID_WbemBinder CLSID_WbemConnection")
  3782. /*
  3783. //***************************************************************************
  3784. // This interface is a placeholder. We need to decide if the
  3785. // methods below are really appropriate for what we are planning
  3786. // to do.
  3787. [restricted,local,object,uuid(B1ADC67F-09E6-4adc-A45E-05BA3007CE30)]
  3788. interface IWMIComplexCooker : public IUnknown
  3789. {
  3790. // Sets a formula in the cooker. If the formula is known, a known
  3791. // id is returned. If not, then the formula is parsed and a new
  3792. // id generated
  3793. HRESULT SetFormula(
  3794. [in] LPCWSTR pwszCookingType,
  3795. [out] DWORD* pdwId
  3796. );
  3797. // General method for cooking a complex value - assumes that the formula follows
  3798. // timestamp, time frequency, raw value and base value conventions
  3799. HRESULT CookRawValues(
  3800. [in] DWORD dwId,
  3801. [in] ULONG nNumTimeStamps,
  3802. [in,size_is(nNumTimeStamps)] unsigned __int64* pnTimestamps,
  3803. [in] unsigned __int64 nTimeFrequency,
  3804. [in,size_is(nNumTimeFrequency)] unsigned __int64* pnTimeFrequency,
  3805. [in] ULONG nNumRawValues,
  3806. [in,size_is(nNumRawValues)] unsigned __int64* pnRawValues,
  3807. [in] ULONG nBaseValues,
  3808. [in,size_is(nBaseValues)] unsigned __int64* pnBaseValues,
  3809. [out] unsigned __int64 pnResult
  3810. );
  3811. // General method for cooking a free form value by using an array of
  3812. // supplied values. The cooker uses the values from the array, in order,
  3813. // and applies them to the formula.
  3814. HRESULT CookGeneralRawValues(
  3815. [in] DWORD dwId,
  3816. [in] ULONG nNumValues,
  3817. [in,size_is(nNumTimeStamps)] unsigned __int64* pnRawValues
  3818. [out] unsigned __int64 pnResult
  3819. );
  3820. };
  3821. // Use arrays of these structures to describe each sample
  3822. typedef struct _WMI_COOKING_SAMPLE
  3823. {
  3824. ULONG ulIndex; // Index in class array
  3825. ULONG ulCount; // Num Instances in array
  3826. [size_is(ulCount)] IWbemObjectAccess** apInstances;
  3827. } WMI_COOKING_SAMPLE;
  3828. // This interface is a placeholder. We need to decide if the
  3829. // methods below are really appropriate for what we are planning
  3830. // to do.
  3831. [restricted,local,object,uuid(979FF10D-D616-4448-BF08-3A79E01506B0)]
  3832. interface IWMIComplexObjectCooker : public IUnknown
  3833. {
  3834. // Sets the class used by the cooker in order to fill out
  3835. // instances when cooking.
  3836. HRESULT SetClass(
  3837. [in] IWbemObjectAccess* pCookingClass,
  3838. );
  3839. // Sets the initial instances. From this point forwards, additional
  3840. // instances are supplied at Recalc time.
  3841. HRESULT SetFirstSample(
  3842. [in] ULONG ulCount,
  3843. [in,size_is(ulCount)] WMI_COOKING_SAMPLE* apSampleData
  3844. );
  3845. // Clears the cooking data and all samples - Initial sample is now required
  3846. HRESULT Reset( void );
  3847. // Recalcs the specified instance using the supplied raw data. If this
  3848. // is an initial sample, this sets the sample but doesn't atually recalc
  3849. // anything. Fills out any properties that require cooking. Any others
  3850. // must be filled out by the user themselves. This assumes a single instance
  3851. // is used for cooking.
  3852. HRESULT Recalc(
  3853. [in,out] IWbemObjectAccess* pInstance,
  3854. [in] ULONG ulCount,
  3855. [in,size_is(ulCount)] WMI_COOKING_SAMPLE* apSampleData
  3856. );
  3857. };
  3858. */