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.

868 lines
25 KiB

  1. //***************************************************************************
  2. //
  3. // (c) 1996-1999 by Microsoft Corporation
  4. //
  5. // WBEMINT.IDL
  6. //
  7. // Internal CIMOM interfaces
  8. //
  9. //***************************************************************************
  10. import "objidl.idl";
  11. import "oleidl.idl";
  12. import "oaidl.idl";
  13. import "wbemtran.idl";
  14. import "wbemprov.idl";
  15. typedef VARIANT WBEM_VARIANT;
  16. typedef [string] WCHAR* WBEM_WSTR;
  17. #define OPTIONAL in, unique
  18. [local, restricted, object, uuid(49353c99-516b-11d1-aea6-00c04fb68820)]
  19. interface IWbemRefresher : IUnknown
  20. {
  21. HRESULT Refresh([in] long lFlags);
  22. }
  23. [local, restricted, object, uuid(49353c92-516b-11d1-aea6-00c04fb68820)]
  24. interface IWbemConfigureRefresher : IUnknown
  25. {
  26. HRESULT AddObjectByPath(
  27. [in] IWbemServices* pNamespace,
  28. [in, string] LPCWSTR wszPath,
  29. [in] long lFlags,
  30. [in] IWbemContext* pContext,
  31. [out] IWbemClassObject** ppRefreshable,
  32. [out, OPTIONAL] long* plId);
  33. HRESULT AddObjectByTemplate(
  34. [in] IWbemServices* pNamespace,
  35. [in] IWbemClassObject* pTemplate,
  36. [in] long lFlags,
  37. [in] IWbemContext* pContext,
  38. [out] IWbemClassObject** ppRefreshable,
  39. [out, OPTIONAL] long* plId);
  40. HRESULT AddRefresher(
  41. [in] IWbemRefresher* pRefresher,
  42. [in] long lFlags,
  43. [out, OPTIONAL] long* plId);
  44. HRESULT Remove(
  45. [in] long lId,
  46. [in] long lFlags);
  47. };
  48. [restricted, object, uuid(49353c93-516b-11d1-aea6-00c04fb68820)]
  49. interface IWbemHiPerfProvider : IUnknown
  50. {
  51. HRESULT QueryInstances(
  52. [in] IWbemServices* pNamespace,
  53. [in, string] WCHAR* wszClass,
  54. [in] long lFlags,
  55. [in] IWbemContext* pCtx,
  56. [in] IWbemObjectSink* pSink // Return IWbemClassObject ptrs
  57. );
  58. HRESULT CreateRefresher(
  59. [in] IWbemServices* pNamespace,
  60. [in] long lFlags,
  61. [out] IWbemRefresher** ppRefresher);
  62. HRESULT CreateRefreshableObject(
  63. [in] IWbemServices* pNamespace,
  64. [in] IWbemObjectAccess* pTemplate,
  65. [in] IWbemRefresher* pRefresher,
  66. [in] long lFlags,
  67. [in] IWbemContext* pContext,
  68. [out] IWbemObjectAccess** ppRefreshable,
  69. [out] long* plId);
  70. HRESULT StopRefreshing(
  71. [in] IWbemRefresher* pRefresher,
  72. [in] long lId,
  73. [in] long lFlags);
  74. /*
  75. HRESULT SendChangeNotifications(
  76. [in] IWbemServices* pNamespace,
  77. [in] long lFlags,
  78. [in] long lEventTypes,
  79. [in] IWbemContext* pContext,
  80. [in] IWbemChangeSink* pSink);
  81. */
  82. };
  83. //==============================================================================
  84. //
  85. // IWbemPropertySource
  86. //
  87. // Makes the object look like a property set to enable condition testing
  88. // (see IWbemCondition below). It is useful when a provider wants to test a
  89. // a condition without the expense of constructing IWbemClassObject.
  90. //
  91. // Used: by WBEMOM inside standard IWbemCondition implementation
  92. // Implemented: by providers who wish to check if their objects satisfy a
  93. // condition without constructing IWbemClassObjects.
  94. //
  95. //==============================================================================
  96. //
  97. // GetPropertyValue
  98. //
  99. // Retrieves the value of a property by name. In the case where embedded
  100. // objects may be present, the name can be a complex one, e.g.
  101. // "OldVersion.Manufacturer".
  102. //
  103. // PARAMETERS:
  104. //
  105. // WCHAR wszPropertyName The name of the property to retrieve
  106. // long lFlags Reserved. For future compatibility, use 0.
  107. // WBEM_VARIANT* pvValue Destination for the value of the property. The
  108. // caller must VariantClear it on success.
  109. // RETURNS:
  110. //
  111. // WBEM_S_NO_ERROR On Success
  112. // WBEM_E_NOT_FOUND No such property
  113. // WBEM_E_NOT_AVAILABLE The value is not available. Condition
  114. // evaluators should attempt to evaluate the
  115. // condition without it.
  116. // WBEM_E_FAILED Other critical error.
  117. //
  118. //==============================================================================
  119. typedef enum
  120. {
  121. WBEM_NAME_ELEMENT_TYPE_PROPERTY = 0,
  122. WBEM_NAME_ELEMENT_TYPE_INDEX = 1
  123. } WBEM_NAME_ELEMENT_TYPE;
  124. typedef [switch_type(short)] union tag_NameElementUnion
  125. {
  126. [case(WBEM_NAME_ELEMENT_TYPE_PROPERTY)] WBEM_WSTR m_wszPropertyName;
  127. [case(WBEM_NAME_ELEMENT_TYPE_INDEX)] long m_lArrayIndex;
  128. } WBEM_NAME_ELEMENT_UNION;
  129. typedef struct tag_NameElement
  130. {
  131. short m_nType;
  132. [switch_is(m_nType)] WBEM_NAME_ELEMENT_UNION Element;
  133. } WBEM_NAME_ELEMENT;
  134. typedef struct _tag_WbemPropertyName
  135. {
  136. long m_lNumElements;
  137. [size_is(m_lNumElements)] WBEM_NAME_ELEMENT* m_aElements;
  138. } WBEM_PROPERTY_NAME;
  139. [restricted, object, uuid(e2451054-b06e-11d0-ad61-00c04fd8fdff)]
  140. interface IWbemPropertySource : IUnknown
  141. {
  142. HRESULT GetPropertyValue(
  143. [in] WBEM_PROPERTY_NAME* pName,
  144. [in] long lFlags,
  145. [in, unique, out] WBEM_WSTR* pwszCimType,
  146. [out] WBEM_VARIANT* pvValue);
  147. HRESULT InheritsFrom([in] WBEM_WSTR wszClassName);
  148. };
  149. //==============================================================================
  150. //
  151. // QL operators
  152. //
  153. //==============================================================================
  154. typedef enum _tag_Ql1ComparisonOperator
  155. {
  156. QL1_OPERATOR_NONE = 0,
  157. QL1_OPERATOR_EQUALS = 1,
  158. QL1_OPERATOR_NOTEQUALS,
  159. QL1_OPERATOR_GREATER,
  160. QL1_OPERATOR_LESS,
  161. QL1_OPERATOR_LESSOREQUALS,
  162. QL1_OPERATOR_GREATEROREQUALS,
  163. QL1_OPERATOR_LIKE,
  164. QL1_OPERATOR_UNLIKE,
  165. QL1_OPERATOR_ISA,
  166. QL1_OPERATOR_ISNOTA,
  167. QL1_OPERATOR_INV_ISA,
  168. QL1_OPERATOR_INV_ISNOTA,
  169. } WBEM_QL1_COMPARISON_OPERATOR;
  170. typedef enum _tag_Ql1Function
  171. {
  172. QL1_FUNCTION_NONE = 0,
  173. QL1_FUNCTION_UPPER,
  174. QL1_FUNCTION_LOWER
  175. } WBEM_QL1_FUNCTION;
  176. typedef enum _tag_Ql1TokenType
  177. {
  178. QL1_NONE = 0,
  179. QL1_OR = 1,
  180. QL1_AND,
  181. QL1_NOT,
  182. QL1_OP_EXPRESSION
  183. } WBEM_QL1_TOKEN_TYPE;
  184. typedef struct _tag_WbemQl1Token
  185. {
  186. long m_lTokenType; // WbemSql1TokenType
  187. WBEM_PROPERTY_NAME m_PropertyName;
  188. long m_lOperator; // WbemSql1ComparisonOperator
  189. WBEM_VARIANT m_vConstValue;
  190. long m_lPropertyFunction; // WbemSql1Function
  191. long m_lConstFunction; // WbemSql1Function
  192. long m_bQuoted;
  193. } WBEM_QL1_TOKEN;
  194. typedef struct _tag_WbemQl1Tolerance
  195. {
  196. boolean m_bExact;
  197. double m_fTolerance;
  198. } WBEM_QL1_TOLERANCE;
  199. typedef enum tag_WBEM_EVENT_TYPE{
  200. WBEM_EVENTTYPE_Invalid = 0,
  201. WBEM_EVENTTYPE_Extrinsic = 5,
  202. WBEM_EVENTTYPE_Timer,
  203. WBEM_EVENTTYPE_NamespaceCreation,
  204. WBEM_EVENTTYPE_NamespaceDeletion,
  205. WBEM_EVENTTYPE_NamespaceModification,
  206. WBEM_EVENTTYPE_ClassCreation,
  207. WBEM_EVENTTYPE_ClassDeletion,
  208. WBEM_EVENTTYPE_ClassModification,
  209. WBEM_EVENTTYPE_InstanceCreation,
  210. WBEM_EVENTTYPE_InstanceDeletion,
  211. WBEM_EVENTTYPE_InstanceModification
  212. } WBEM_EVENT_TYPE;
  213. //==============================================================================
  214. //==============================================================================
  215. //
  216. // Event-provider specific interfaces.
  217. //
  218. //==============================================================================
  219. //==============================================================================
  220. [restricted, object, uuid(e2461059-b06e-11d0-ad61-00c04fd8fdff)]
  221. interface IWbemRawObjectSink : IUnknown
  222. {
  223. HRESULT IndicateRaw(
  224. [in] long lNumObjects,
  225. [in, size_is(lNumObjects)] IWbemPropertySource** apObjects);
  226. };
  227. [restricted, object, local, uuid(a658b5d6-021d-11d1-ad74-00c04fd8fdff)]
  228. interface IWbemDecorator : IUnknown
  229. {
  230. HRESULT DecorateObject([in] IWbemClassObject* pObject,
  231. WBEM_WSTR wszNamespace);
  232. HRESULT UndecorateObject([in] IWbemClassObject* pObject);
  233. };
  234. [restricted, object, local, uuid(a658b6d6-021d-11d1-ad74-00c04fd8fdff)]
  235. interface IWbemLifeControl : IUnknown
  236. {
  237. HRESULT AddRefCore();
  238. HRESULT ReleaseCore();
  239. };
  240. [restricted, object, uuid(a553f3f0-3805-11d0-b6b2-00aa003240c7)]
  241. interface IWbemEventSubsystem_m4 : IUnknown
  242. {
  243. HRESULT ProcessInternalEvent(
  244. [in] LONG lSendType,
  245. [in] BSTR strReserved1,
  246. [in] BSTR strReserved2,
  247. [in] BSTR strReserved3,
  248. [in] unsigned long dwReserved1,
  249. [in] unsigned long dwReserved2,
  250. [in] unsigned long dwNumObjects,
  251. [in, size_is(dwNumObjects)] IWbemClassObject** apObjects,
  252. [in] IWbemContext* pContext
  253. );
  254. HRESULT VerifyInternalEvent(
  255. [in] LONG lSendType,
  256. [in] BSTR strReserved1,
  257. [in] BSTR strReserved2,
  258. [in] BSTR strReserved3,
  259. [in] unsigned long dwReserved1,
  260. [in] unsigned long dwReserved2,
  261. [in] unsigned long dwNumObjects,
  262. [in, size_is(dwNumObjects)] IWbemClassObject** apObjects,
  263. [in] IWbemContext* pContext
  264. );
  265. HRESULT RegisterNotificationSink(
  266. [in] WBEM_WSTR wszNamespace,
  267. [in] WBEM_WSTR wszQueryLanguage,
  268. [in] WBEM_WSTR wszQuery,
  269. [in] long lFlags,
  270. [in] IWbemContext* pContext,
  271. [in] IWbemObjectSink* pSink);
  272. HRESULT RemoveNotificationSink(
  273. [in] IWbemObjectSink* pSink);
  274. HRESULT GetNamespaceSink(
  275. [in] WBEM_WSTR wszNamespace,
  276. [out] IWbemObjectSink** ppNamespaceSink);
  277. HRESULT Initialize(
  278. [in] WBEM_WSTR wszServerName,
  279. [in] IWbemLocator* pAdminLocator,
  280. [in] IUnknown* pServices);
  281. HRESULT Shutdown();
  282. };
  283. [object, restricted, uuid(6c19be32-7500-11d1-ad94-00c04fd8fdff)]
  284. interface IWbemMetaData : IUnknown
  285. {
  286. HRESULT GetClass(
  287. [in, string] LPCWSTR wszClassName,
  288. [in] IWbemContext* pContext,
  289. [out] IWbemClassObject** ppClass);
  290. };
  291. typedef struct tag_WBEM_EVENT_BLOB
  292. {
  293. /*
  294. [string] LPWSTR m_wszClassName;
  295. long m_lBlobLength;
  296. [size_is(m_lBlobLength)] byte* m_aBlob;
  297. */
  298. IWbemClassObject* m_pEventObj;
  299. } WBEM_EVENT_BLOB;
  300. typedef struct tag_WBEM_REM_SYNCH_TARGETS
  301. {
  302. long m_lNumTargets;
  303. [size_is(m_lNumTargets)] long* m_alTargets;
  304. } WBEM_REM_SYNCH_TARGETS;
  305. typedef struct tag_WBEM_REM_TARGETS
  306. {
  307. WBEM_REM_SYNCH_TARGETS m_SynchTargets;
  308. WBEM_REM_SYNCH_TARGETS m_AsynchTargets;
  309. } WBEM_REM_TARGETS;
  310. [object, restricted, uuid(755f9da6-7508-11d1-ad94-00c04fd8fdff)]
  311. interface IWbemMultiTarget : IUnknown
  312. {
  313. HRESULT DeliverEvent(
  314. [in] WBEM_EVENT_BLOB* pEvent,
  315. [in] WBEM_REM_TARGETS* pTargets);
  316. HRESULT DeliverStatus(
  317. [in] long lFlags,
  318. [in] HRESULT hresStatus,
  319. [in, string] LPCWSTR wszStatus,
  320. [in] IWbemClassObject* pErrorObj,
  321. [in] WBEM_REM_TARGETS* pTargets);
  322. };
  323. typedef enum tag_WBEM_FILTER_TARGET_TYPE
  324. {
  325. WBEM_FILTER_TARGET_TYPE_NONE,
  326. WBEM_FILTER_TARGET_TYPE_INTERNAL,
  327. WBEM_FILTER_TARGET_TYPE_MARSHALLED,
  328. WBEM_FILTER_TARGET_TYPE_LOADABLE,
  329. } WBEM_FILTER_TARGET_TYPE;
  330. /*
  331. typedef struct tag_WBEM_FILTER_TARGET_INTERNAL_INFO
  332. {
  333. IWbemMultiTarget* m_pTarget;
  334. long m_lIndex;
  335. } WBEM_FILTER_TARGET_INTERNAL_INFO;
  336. */
  337. typedef struct tag_WBEM_FILTER_TARGET_LOAD_INFO
  338. {
  339. CLSID m_clsidConsumerProvider;
  340. IWbemClassObject* m_pLogicalConsumer;
  341. IWbemUnboundObjectSink* m_pCached;
  342. } WBEM_FILTER_TARGET_LOAD_INFO;
  343. typedef struct tag_WBEM_FILTER_TARGET_MARSHALLED_INFO
  344. {
  345. IWbemUnboundObjectSink* m_pSink;
  346. IWbemClassObject* m_pLogicalConsumer;
  347. } WBEM_FILTER_TARGET_MARSHALLED_INFO;
  348. typedef [switch_type(long)] union tag_WBEM_FILTER_TARGET_DATA
  349. {
  350. [case(WBEM_FILTER_TARGET_TYPE_INTERNAL)]
  351. long m_lIndex;
  352. [case(WBEM_FILTER_TARGET_TYPE_MARSHALLED)]
  353. WBEM_FILTER_TARGET_MARSHALLED_INFO m_MarshInfo;
  354. [case(WBEM_FILTER_TARGET_TYPE_LOADABLE)]
  355. WBEM_FILTER_TARGET_LOAD_INFO m_LoadInfo;
  356. [default]
  357. ;
  358. } WBEM_FILTER_TARGET_DATA;
  359. typedef struct tag_WBEM_FILTER_TARGET
  360. {
  361. long m_lType;
  362. [switch_is(m_lType)] WBEM_FILTER_TARGET_DATA m_Data;
  363. boolean m_bSynch;
  364. } WBEM_FILTER_TARGET;
  365. typedef struct tag_WBEM_FILTER_TARGETS
  366. {
  367. long m_lNumTargets;
  368. [size_is(m_lNumTargets)] WBEM_FILTER_TARGET* m_aTargets;
  369. } WBEM_FILTER_TARGETS;
  370. [object, restricted, uuid(6c19be33-7500-11d1-ad94-00c04fd8fdff)]
  371. interface IWbemFilterProxy : IUnknown
  372. {
  373. HRESULT Initialize(
  374. [in] IWbemMetaData* pMetaData,
  375. [in] IWbemMultiTarget* pMultiTarget);
  376. HRESULT Lock();
  377. HRESULT Unlock();
  378. HRESULT AddFilter(
  379. [in] IWbemContext* pContext,
  380. [in, string] LPCWSTR wszQuery,
  381. [in] WBEM_FILTER_TARGETS* pTargets);
  382. HRESULT AddFilterTarget(
  383. [in] IWbemContext* pContext,
  384. [in] long lFilterIndex,
  385. [in] WBEM_FILTER_TARGET* pTarget);
  386. HRESULT RemoveFilterTarget(
  387. [in] IWbemContext* pContext,
  388. [in] long lFilterIndex,
  389. [in] WBEM_FILTER_TARGET* pTarget);
  390. HRESULT RemoveFilter(
  391. [in] IWbemContext* pContext,
  392. [in] long lFilterIndex);
  393. HRESULT RemoveAllFilters(
  394. [in] IWbemContext* pContext);
  395. HRESULT AddDefinitionQuery(
  396. [in] IWbemContext* pContext,
  397. [in] LPCWSTR wszQuery);
  398. HRESULT RemoveAllDefinitionQueries(
  399. [in] IWbemContext* pContext);
  400. HRESULT Disconnect();
  401. };
  402. [object, restricted, uuid(6c19be34-7500-11d1-ad94-00c04fd8fdff)]
  403. interface IWbemFilterStub : IUnknown
  404. {
  405. HRESULT RegisterProxy(
  406. [in] IWbemFilterProxy* pProxy);
  407. HRESULT UnregisterProxy(
  408. [in] IWbemFilterProxy* pProxy);
  409. };
  410. typedef GUID REQUESTID;
  411. [restricted, object, uuid(a57be31e-efe3-11d0-ad71-00c04fd8fdff)]
  412. interface IWbemCausalityAccess : IUnknown
  413. {
  414. HRESULT GetRequestId([out] REQUESTID* pId);
  415. HRESULT IsChildOf([in] REQUESTID Id);
  416. HRESULT CreateChild([out] IWbemCausalityAccess** ppChild);
  417. HRESULT GetParentId([out] REQUESTID* pId);
  418. HRESULT GetHistoryInfo([out] long* plNumParents, [out] long* plNumSiblings);
  419. };
  420. //==============================================================================
  421. //==============================================================================
  422. //
  423. // Hi-perf specific interfaces.
  424. //
  425. //==============================================================================
  426. //==============================================================================
  427. typedef enum _WBEM_INSTANCE_BLOB_TYPE
  428. {
  429. WBEM_BLOB_TYPE_DATA_TABLE_ONLY,
  430. WBEM_BLOB_TYPE_DATA_AND_HEAP,
  431. WBEM_BLOB_TYPE_ALL,
  432. WBEM_BLOB_TYPE_ERROR, // m_lBlobLength contains error code
  433. } WBEM_INSTANCE_BLOB_TYPE;
  434. typedef struct _WBEM_REFRESHED_OBJECT
  435. {
  436. long m_lRequestId;
  437. long m_lBlobType;
  438. long m_lBlobLength;
  439. [size_is(m_lBlobLength)] byte* m_pbBlob;
  440. } WBEM_REFRESHED_OBJECT;
  441. [restricted, uuid(00b87752-57da-11d1-ad87-00c04fd8fdff)]
  442. interface IWbemRemoteRefresher : IUnknown
  443. {
  444. HRESULT RemoteRefresh(
  445. [in] long lFlags,
  446. [out] long* plNumObjects,
  447. [out, size_is(,*plNumObjects)] WBEM_REFRESHED_OBJECT** paObjects);
  448. HRESULT StopRefreshing(
  449. [in] long lRequestId,
  450. [in] long lFlags);
  451. };
  452. typedef struct _WBEM_REFRESH_INFO_CLIENT_LOADABLE
  453. {
  454. CLSID m_clsid;
  455. [string] WCHAR* m_wszNamespace;
  456. IWbemObjectAccess* m_pTemplate;
  457. } WBEM_REFRESH_INFO_CLIENT_LOADABLE;
  458. typedef struct _WBEM_REFRESH_INFO_REMOTE
  459. {
  460. IWbemRemoteRefresher* m_pRefresher;
  461. IWbemObjectAccess* m_pTemplate;
  462. } WBEM_REFRESH_INFO_REMOTE;
  463. typedef struct _WBEM_REFRESH_INFO_SHARED
  464. {
  465. [string] WCHAR* m_wszSharedMemoryName;
  466. IWbemRefresher* m_pRefresher;
  467. } WBEM_REFRESH_INFO_SHARED;
  468. typedef struct _WBEM_REFRESH_INFO_CONTINUOUS
  469. {
  470. [string] WCHAR* m_wszSharedMemoryName;
  471. } WBEM_REFRESH_INFO_CONTINUOUS;
  472. typedef struct _WBEM_REFRESH_INFO_DIRECT
  473. {
  474. IWbemRefresher* m_pRefresher;
  475. IWbemObjectAccess* m_pRefreshedObject;
  476. IWbemHiPerfProvider* m_pProvider;
  477. } WBEM_REFRESH_INFO_DIRECT;
  478. typedef enum _WBEM_REFRESH_TYPE
  479. {
  480. WBEM_REFRESH_TYPE_INVALID,
  481. WBEM_REFRESH_TYPE_DIRECT,
  482. WBEM_REFRESH_TYPE_CLIENT_LOADABLE,
  483. WBEM_REFRESH_TYPE_REMOTE,
  484. WBEM_REFRESH_TYPE_SHARED,
  485. WBEM_REFRESH_TYPE_CONTINUOUS
  486. } WBEM_REFRESH_TYPE;
  487. typedef [switch_type(long)] union _WBEM_REFRESH_INFO_UNION
  488. {
  489. [case (WBEM_REFRESH_TYPE_CLIENT_LOADABLE)]
  490. WBEM_REFRESH_INFO_CLIENT_LOADABLE m_ClientLoadable;
  491. [case (WBEM_REFRESH_TYPE_REMOTE)]
  492. WBEM_REFRESH_INFO_REMOTE m_Remote;
  493. [case (WBEM_REFRESH_TYPE_SHARED)]
  494. WBEM_REFRESH_INFO_SHARED m_Shared;
  495. [case (WBEM_REFRESH_TYPE_CONTINUOUS)]
  496. WBEM_REFRESH_INFO_CONTINUOUS m_Continuous;
  497. [case (WBEM_REFRESH_TYPE_DIRECT)]
  498. WBEM_REFRESH_INFO_DIRECT m_Direct;
  499. [case (WBEM_REFRESH_TYPE_INVALID)]
  500. HRESULT m_hres;
  501. } WBEM_REFRESH_INFO_UNION;
  502. typedef struct _WBEM_REFRESH_INFO
  503. {
  504. long m_lType;
  505. [switch_is(m_lType)] WBEM_REFRESH_INFO_UNION m_Info;
  506. long m_lCancelId;
  507. } WBEM_REFRESH_INFO;
  508. typedef struct _WBEM_REFRESHER_ID
  509. {
  510. [string] LPSTR m_szMachineName;
  511. DWORD m_dwProcessId;
  512. GUID m_guidRefresherId;
  513. } WBEM_REFRESHER_ID;
  514. [restricted, uuid(f72cacf8-57d9-11d1-ad87-00c04fd8fdff)]
  515. interface IWbemRefreshingServices : IUnknown
  516. {
  517. HRESULT AddObjectToRefresher(
  518. [in] WBEM_REFRESHER_ID* pRefresherId,
  519. [in, string] LPCWSTR wszPath,
  520. [in] long lFlags,
  521. [in] IWbemContext* pContext,
  522. [out] WBEM_REFRESH_INFO* pInfo);
  523. HRESULT RemoveObjectFromRefresher(
  524. [in] WBEM_REFRESHER_ID* pRefresherId,
  525. [in] long lId,
  526. [in] long lFlags);
  527. };
  528. [restricted, local, uuid(504e6fe4-dfcd-11d1-adb4-00c04fd8fdff)]
  529. interface IWbemUnloadingControl : IUnknown
  530. {
  531. HRESULT SetMustPreventUnloading([in] boolean bPrevent);
  532. };
  533. //
  534. // IWbemObjectInternals
  535. //
  536. // Allows access to internal elements of the BLOB backing
  537. // a WBEM object.
  538. //
  539. // It's main intent is to allow us to break apart and/or
  540. // disable components while marshalling/unmarshalling and
  541. // then repackage said components at a later point in time.
  542. //
  543. typedef enum tagWBEM_OBJINTERNALPARTS_INFO
  544. {
  545. WBEM_OBJ_DECORATION_PART = 0x1,
  546. WBEM_OBJ_INSTANCE_PART = 0x2,
  547. WBEM_OBJ_CLASS_PART = 0x4,
  548. WBEM_OBJ_CLASS_PART_INTERNAL = 0x8,
  549. WBEM_OBJ_CLASS_PART_SHARED = 0x10
  550. } WBEM_OBJINTERNALPARTS_INFO;
  551. [local, restricted, object, uuid(7A7EC9AE-11D6-11d2-B5F9-00104B703EFD)]
  552. interface IWbemObjectInternals : IUnknown
  553. {
  554. HRESULT QueryObjectInfo(
  555. [out] DWORD *pdwResult
  556. );
  557. HRESULT SetObjectMemory(
  558. [in] LPVOID pMem,
  559. [in] DWORD dwMemSize
  560. );
  561. HRESULT GetObjectMemory(
  562. [out] LPVOID pDestination,
  563. [in] DWORD dwDestBufSize,
  564. [out] DWORD *pdwUsed
  565. );
  566. HRESULT SetObjectParts(
  567. [in] LPVOID pMem,
  568. [in] DWORD dwDestBufSize,
  569. [in] DWORD dwParts
  570. );
  571. HRESULT GetObjectParts(
  572. [out] LPVOID pDestination,
  573. [in] DWORD dwDestBufSize,
  574. [in] DWORD dwParts,
  575. [out] DWORD *pdwUsed
  576. );
  577. HRESULT StripClassPart();
  578. HRESULT SetClassPart(
  579. [in] LPVOID pClassPart,
  580. [in] DWORD dwSize
  581. );
  582. HRESULT MergeClassPart(
  583. [in] IWbemClassObject *pClassPart
  584. );
  585. HRESULT IsObjectInstance();
  586. };
  587. //
  588. // IEnumWCOSmartEnum
  589. //
  590. // This Interface is intended to provide alternate synchronous enumeration of
  591. // objects for IEnumWbemClassObject. If this is called, it calls the normal
  592. // ::Next function, then repackages the data into a BYTE array which must
  593. // be appropriateky unmarshaled on the receiving end.
  594. //
  595. // Because it uses private data structures, it is intended to remain as an
  596. // internal only interface.
  597. //
  598. [restricted, object, uuid(423EC01E-2E35-11d2-B604-00104B703EFD)]
  599. interface IWbemWCOSmartEnum : IUnknown
  600. {
  601. HRESULT Next(
  602. [in] REFGUID proxyGUID,
  603. [in] LONG lTimeout,
  604. [in] ULONG uCount,
  605. [out] ULONG* puReturned,
  606. [out] ULONG* pdwBuffSize,
  607. [out, size_is(,*pdwBuffSize)] byte** pBuffer
  608. );
  609. };
  610. /*
  611. Client programming notes:
  612. (1) Client takes IWbemServices, and does QI to get IWbemPerfDataServices
  613. (2) Client retrieves objects through normal means, and can QI any IWbemClassObject
  614. to get IWbemClassObjectEx.
  615. (3) IWbemClassObjectEx will support scalar types VT_I4, VT_UI4, VT_I8, VT_UI8, VT_LPWSTR
  616. (4) To get continuous data, client must call IWbemPerfDataServices::GetRefresherByObject
  617. or IWbemPerfDataServices::GetRefreshByPath.
  618. (5) Client executes IWbemRefresher::Refresh() and then the associated object is updated.
  619. The object can again be retrieved through IWbemRefresher::GetObject. However, the
  620. pointer could simply have been maintained throughout.
  621. (6) After a GetObject() or Refresh(), the object maintains its state, and can be
  622. alternately accessed via IWbemClassObject or IWbemClassObjectEx.
  623. How does the client proxy know whether to carry out the refresh through the shared
  624. memory, local refresh, or remote?
  625. Answer: When GetRefresherByObject/...ByPath is called, a search is made for the object
  626. in CIMOM. If an in-proc provider is supported it will be transparently loaded
  627. into
  628. Provider programming notes:
  629. (1) Provider's class is in the repository.
  630. (2) Provider implements IWbemTimeCriticalProvider. The namespace is understood
  631. by the registration & CLSID.
  632. (3) QueryInstances() returns the instances to the provided sink.
  633. (4) CreateObjectRefresher() returns a refresher for a given instance.
  634. The incoming object is for reference purposes.
  635. The provider takes the incoming object or an equivalent one and
  636. calls MapObject(). The mapped object is gauranteed to be in shared
  637. memory.
  638. (5) Provider implements IWbemRefresher. When Refresh() is called
  639. the provider calls Lock() and updates the local copy mapped to
  640. the blob, followed by Unlock().
  641. [a] Provider can be CIMOM hosted, client-hosted, self-hosted, or remote-hosted.
  642. Continuous provider:
  643. (1) Becomes a general purpose provider, hosted by CIMOM.
  644. (2) Provider calls GetObject on class def, and creates the necessary
  645. instances.
  646. (3) Each instance is mapped using MapObject().
  647. (4) Properties are directly updated as required.
  648. (5) Provider can release any pointers held to CIMOM. However,
  649. if the provider is in-proc to CIMOM, this could result in
  650. the provider getting itself unloaded. Only out-of-proc
  651. providers need to worry about this.
  652. (6) Provider calls Lock() and updates the properties, followed
  653. by Unlock().
  654. (7) When client executes Refresh(), which calls Lock(), does a blob
  655. copy and then an Unlock().
  656. problems: Provider needs an IWbemServices pointer to get class definitions.
  657. */
  658. [uuid(027947f3-d731-11ce-a357-000000000001)]
  659. library WbemInternal_v1
  660. {
  661. importlib("stdole2.tlb");
  662. typedef enum tag_WBEM_MISC_FLAG_TYPE
  663. {
  664. WBEM_FLAG_NO_CLASS_PROVIDERS = 0x40,
  665. WBEM_FLAG_NO_EVENTS = 0x20,
  666. WBEM_FLAG_IGNORE_IDS = 0x80
  667. } WBEM_MISC_FLAG_TYPE;
  668. interface IWbemPropertySource;
  669. interface IWbemRawObjectSink;
  670. interface IWbemDecorator;
  671. interface IWbemEventSubsystem_m4;
  672. interface IWbemCausalityAccess;
  673. interface IWbemRefreshingServices;
  674. interface IWbemRemoteRefresher;
  675. interface IWbemMetaData;
  676. interface IWbemFilterStub;
  677. interface IWbemFilterProxy;
  678. interface IWbemLifeControl;
  679. /////////////////////////////////////////////////////////
  680. //
  681. // Marshaling proxy for WbemClassObjec
  682. //
  683. [restricted, uuid(4590f812-1d3a-11d0-891f-00aa004b2e24)]
  684. coclass WbemClassObjectProxy
  685. {
  686. interface IWbemClassObject;
  687. interface IMarshal;
  688. };
  689. [restricted, uuid(5d08b586-343a-11d0-ad46-00c04fd8fdff)]
  690. coclass WbemEventSubsystem
  691. {
  692. interface IWbemEventSubsystem_m4;
  693. };
  694. [restricted, uuid(08a59b5d-dd50-11d0-ad6b-00c04fd8fdff)]
  695. coclass HmmpEventConsumerProvider
  696. {
  697. interface IWbemUnboundObjectSink;
  698. };
  699. [restricted, uuid(6c19be35-7500-11d1-ad94-00c04fd8fdff)]
  700. coclass WbemFilterProxy
  701. {
  702. interface IWbemFilterProxy;
  703. interface IWbemObjectSink;
  704. };
  705. [restricted, uuid(4fa18276-912a-11d1-ad9b-00c04fd8fdff)]
  706. coclass InProcWbemLevel1Login
  707. {
  708. interface IWbemLevel1Login;
  709. };
  710. interface IWbemRefresher;
  711. interface IWbemConfigureRefresher;
  712. interface IWbemHiPerfProvider;
  713. [restricted, uuid(c71566f2-561e-11d1-ad87-00c04fd8fdff)]
  714. coclass WbemRefresher
  715. {
  716. interface IMarshal;
  717. interface IWbemRefresher;
  718. interface IWbemConfigureRefresher;
  719. };
  720. };