Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4169 lines
119 KiB

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