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.

1013 lines
28 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. WBEMINT.IDL
  5. Abstract:
  6. CIMOM Interfaces
  7. History:
  8. --*/
  9. import "objidl.idl";
  10. import "oleidl.idl";
  11. import "oaidl.idl";
  12. import "wbemtran.idl";
  13. import "wbemprov.idl";
  14. typedef VARIANT WBEM_VARIANT;
  15. typedef [string] WCHAR* WBEM_WSTR;
  16. typedef [string] const WCHAR* WBEM_CWSTR;
  17. #define OPTIONAL in, unique
  18. //==============================================================================
  19. //
  20. // IWbemPropertySource
  21. //
  22. // Makes the object look like a property set to enable condition testing
  23. // (see IWbemCondition below). It is useful when a provider wants to test a
  24. // a condition without the expense of constructing IWbemClassObject.
  25. //
  26. // Used: by WBEMOM inside standard IWbemCondition implementation
  27. // Implemented: by providers who wish to check if their objects satisfy a
  28. // condition without constructing IWbemClassObjects.
  29. //
  30. //==============================================================================
  31. //
  32. // GetPropertyValue
  33. //
  34. // Retrieves the value of a property by name. In the case where embedded
  35. // objects may be present, the name can be a complex one, e.g.
  36. // "OldVersion.Manufacturer".
  37. //
  38. // PARAMETERS:
  39. //
  40. // WCHAR wszPropertyName The name of the property to retrieve
  41. // long lFlags Reserved. For future compatibility, use 0.
  42. // WBEM_VARIANT* pvValue Destination for the value of the property. The
  43. // caller must VariantClear it on success.
  44. // RETURNS:
  45. //
  46. // WBEM_S_NO_ERROR On Success
  47. // WBEM_E_NOT_FOUND No such property
  48. // WBEM_E_NOT_AVAILABLE The value is not available. Condition
  49. // evaluators should attempt to evaluate the
  50. // condition without it.
  51. // WBEM_E_FAILED Other critical error.
  52. //
  53. //==============================================================================
  54. typedef enum
  55. {
  56. WBEM_NAME_ELEMENT_TYPE_PROPERTY = 0,
  57. WBEM_NAME_ELEMENT_TYPE_INDEX = 1
  58. } WBEM_NAME_ELEMENT_TYPE;
  59. typedef [switch_type(short)] union tag_NameElementUnion
  60. {
  61. [case(WBEM_NAME_ELEMENT_TYPE_PROPERTY)] WBEM_WSTR m_wszPropertyName;
  62. [case(WBEM_NAME_ELEMENT_TYPE_INDEX)] long m_lArrayIndex;
  63. } WBEM_NAME_ELEMENT_UNION;
  64. typedef struct tag_NameElement
  65. {
  66. short m_nType;
  67. [switch_is(m_nType)] WBEM_NAME_ELEMENT_UNION Element;
  68. } WBEM_NAME_ELEMENT;
  69. typedef struct _tag_WbemPropertyName
  70. {
  71. long m_lNumElements;
  72. [size_is(m_lNumElements)] WBEM_NAME_ELEMENT* m_aElements;
  73. } WBEM_PROPERTY_NAME;
  74. [restricted, object, uuid(e2451054-b06e-11d0-ad61-00c04fd8fdff)]
  75. interface IWbemPropertySource : IUnknown
  76. {
  77. HRESULT GetPropertyValue(
  78. [in] WBEM_PROPERTY_NAME* pName,
  79. [in] long lFlags,
  80. [in, unique, out] WBEM_WSTR* pwszCimType,
  81. [out] WBEM_VARIANT* pvValue);
  82. HRESULT InheritsFrom([in] WBEM_CWSTR wszClassName);
  83. };
  84. //==============================================================================
  85. //
  86. // QL operators
  87. //
  88. //==============================================================================
  89. typedef enum _tag_Ql1ComparisonOperator
  90. {
  91. QL1_OPERATOR_NONE = 0,
  92. QL1_OPERATOR_EQUALS = 1,
  93. QL1_OPERATOR_NOTEQUALS,
  94. QL1_OPERATOR_GREATER,
  95. QL1_OPERATOR_LESS,
  96. QL1_OPERATOR_LESSOREQUALS,
  97. QL1_OPERATOR_GREATEROREQUALS,
  98. QL1_OPERATOR_LIKE,
  99. QL1_OPERATOR_UNLIKE,
  100. QL1_OPERATOR_ISA,
  101. QL1_OPERATOR_ISNOTA,
  102. QL1_OPERATOR_INV_ISA,
  103. QL1_OPERATOR_INV_ISNOTA,
  104. } WBEM_QL1_COMPARISON_OPERATOR;
  105. typedef enum _tag_Ql1Function
  106. {
  107. QL1_FUNCTION_NONE = 0,
  108. QL1_FUNCTION_UPPER,
  109. QL1_FUNCTION_LOWER
  110. } WBEM_QL1_FUNCTION;
  111. typedef enum _tag_Ql1TokenType
  112. {
  113. QL1_NONE = 0,
  114. QL1_OR = 1,
  115. QL1_AND,
  116. QL1_NOT,
  117. QL1_OP_EXPRESSION
  118. } WBEM_QL1_TOKEN_TYPE;
  119. typedef struct _tag_WbemQl1Token
  120. {
  121. long m_lTokenType; // WbemSql1TokenType
  122. WBEM_PROPERTY_NAME m_PropertyName;
  123. WBEM_PROPERTY_NAME m_PropertyName2;
  124. long m_lOperator; // WbemSql1ComparisonOperator
  125. WBEM_VARIANT m_vConstValue;
  126. long m_lPropertyFunction; // WbemSql1Function
  127. long m_lConstFunction; // WbemSql1Function
  128. long m_bQuoted;
  129. long m_bPropComp;
  130. } WBEM_QL1_TOKEN;
  131. typedef struct _tag_WbemQl1Tolerance
  132. {
  133. boolean m_bExact;
  134. double m_fTolerance;
  135. } WBEM_QL1_TOLERANCE;
  136. typedef enum tag_WBEM_EVENT_TYPE{
  137. WBEM_EVENTTYPE_Invalid = 0,
  138. WBEM_EVENTTYPE_Extrinsic = 5,
  139. WBEM_EVENTTYPE_Timer,
  140. WBEM_EVENTTYPE_NamespaceCreation,
  141. WBEM_EVENTTYPE_NamespaceDeletion,
  142. WBEM_EVENTTYPE_NamespaceModification,
  143. WBEM_EVENTTYPE_ClassCreation,
  144. WBEM_EVENTTYPE_ClassDeletion,
  145. WBEM_EVENTTYPE_ClassModification,
  146. WBEM_EVENTTYPE_InstanceCreation,
  147. WBEM_EVENTTYPE_InstanceDeletion,
  148. WBEM_EVENTTYPE_InstanceModification,
  149. WBEM_EVENTTYPE_System
  150. } WBEM_EVENT_TYPE;
  151. //==============================================================================
  152. //==============================================================================
  153. //
  154. // Event-provider specific interfaces.
  155. //
  156. //==============================================================================
  157. //==============================================================================
  158. [restricted, object, local, uuid(a658b5d6-021d-11d1-ad74-00c04fd8fdff)]
  159. interface IWbemDecorator : IUnknown
  160. {
  161. HRESULT DecorateObject([in] IWbemClassObject* pObject,
  162. WBEM_CWSTR wszNamespace);
  163. HRESULT UndecorateObject([in] IWbemClassObject* pObject);
  164. };
  165. [restricted, object, local, uuid(a658b6d6-021d-11d1-ad74-00c04fd8fdff)]
  166. interface IWbemLifeControl : IUnknown
  167. {
  168. HRESULT AddRefCore();
  169. HRESULT ReleaseCore();
  170. };
  171. [restricted, object, uuid(a553f3f0-3805-11d0-b6b2-00aa003240c7)]
  172. interface IWbemEventSubsystem_m4 : IUnknown
  173. {
  174. HRESULT ProcessInternalEvent(
  175. [in] LONG lSendType,
  176. [in] BSTR strReserved1,
  177. [in] BSTR strReserved2,
  178. [in] BSTR strReserved3,
  179. [in] unsigned long dwReserved1,
  180. [in] unsigned long dwReserved2,
  181. [in] unsigned long dwNumObjects,
  182. [in, size_is(dwNumObjects)] IWbemClassObject** apObjects,
  183. [in] IWbemContext* pContext
  184. );
  185. HRESULT VerifyInternalEvent(
  186. [in] LONG lSendType,
  187. [in] BSTR strReserved1,
  188. [in] BSTR strReserved2,
  189. [in] BSTR strReserved3,
  190. [in] unsigned long dwReserved1,
  191. [in] unsigned long dwReserved2,
  192. [in] unsigned long dwNumObjects,
  193. [in, size_is(dwNumObjects)] IWbemClassObject** apObjects,
  194. [in] IWbemContext* pContext
  195. );
  196. HRESULT RegisterNotificationSink(
  197. [in] WBEM_CWSTR wszNamespace,
  198. [in] WBEM_CWSTR wszQueryLanguage,
  199. [in] WBEM_CWSTR wszQuery,
  200. [in] long lFlags,
  201. [in] IWbemContext* pContext,
  202. [in] IWbemObjectSink* pSink);
  203. HRESULT RemoveNotificationSink(
  204. [in] IWbemObjectSink* pSink);
  205. HRESULT GetNamespaceSink(
  206. [in] WBEM_CWSTR wszNamespace,
  207. [out] IWbemObjectSink** ppNamespaceSink);
  208. HRESULT Initialize(
  209. [in] WBEM_CWSTR wszServerName,
  210. [in] IWbemLocator* pAdminLocator,
  211. [in] IUnknown* pServices);
  212. HRESULT Shutdown();
  213. HRESULT LastCallForCore();
  214. };
  215. [object, restricted, uuid(6c19be32-7500-11d1-ad94-00c04fd8fdff)]
  216. interface IWbemMetaData : IUnknown
  217. {
  218. HRESULT GetClass(
  219. [in, string] LPCWSTR wszClassName,
  220. [in] IWbemContext* pContext,
  221. [out] IWbemClassObject** ppClass);
  222. };
  223. typedef DWORD WBEM_REMOTE_TARGET_ID_TYPE;
  224. typedef struct tag_WBEM_REM_TARGETS
  225. {
  226. long m_lNumTargets;
  227. [size_is(m_lNumTargets)] WBEM_REMOTE_TARGET_ID_TYPE* m_aTargets;
  228. } WBEM_REM_TARGETS;
  229. [object, restricted, uuid(755f9da6-7508-11d1-ad94-00c04fd8fdff)]
  230. interface IWbemMultiTarget : IUnknown
  231. {
  232. HRESULT DeliverEvent(
  233. [in] ULONG dwNumEvents,
  234. [in, size_is(dwNumEvents)] IWbemClassObject** aEvents,
  235. [in, size_is(dwNumEvents)] WBEM_REM_TARGETS* aTargets);
  236. HRESULT DeliverStatus(
  237. [in] long lFlags,
  238. [in] HRESULT hresStatus,
  239. [in, string] LPCWSTR wszStatus,
  240. [in] IWbemClassObject* pErrorObj,
  241. [in] WBEM_REM_TARGETS* pTargets);
  242. };
  243. [object, restricted, uuid(755f9da7-7508-11d1-ad94-00c04fd8fdff)]
  244. interface IWbemEventProviderRequirements : IUnknown
  245. {
  246. HRESULT DeliverProviderRequest(
  247. [in] long lFlags);
  248. };
  249. // Smart MultiTarget Interface for removal of redundant
  250. // class data
  251. [object, restricted, uuid(37196B38-CCCF-11d2-B35C-00105A1F8177)]
  252. interface IWbemSmartMultiTarget : IUnknown
  253. {
  254. HRESULT DeliverEvent(
  255. [in] ULONG dwNumEvents,
  256. [in] ULONG dwBuffSize,
  257. [in, size_is(dwBuffSize)] byte* pBuffer,
  258. [in, size_is(dwNumEvents)] WBEM_REM_TARGETS* pTargets);
  259. };
  260. //
  261. // IWbemFetchSmartMultiTarget
  262. //
  263. // This Interface is used to return a smart multi-target. It assists
  264. // us when we need to get an enumerator but want to do so without
  265. // causing AddRef problem with the Proxy Manager.
  266. //
  267. [restricted, object, uuid(37196B39-CCCF-11d2-B35C-00105A1F8177)]
  268. interface IWbemFetchSmartMultiTarget : IUnknown
  269. {
  270. HRESULT GetSmartMultiTarget(
  271. [out] IWbemSmartMultiTarget** ppSmartMultiTarget
  272. );
  273. };
  274. /* NO LONGER SUPPORTED AS OF M3
  275. typedef enum tag_WBEM_FILTER_TARGET_TYPE
  276. {
  277. WBEM_FILTER_TARGET_TYPE_NONE,
  278. WBEM_FILTER_TARGET_TYPE_INTERNAL,
  279. WBEM_FILTER_TARGET_TYPE_MARSHALLED,
  280. WBEM_FILTER_TARGET_TYPE_LOADABLE,
  281. } WBEM_FILTER_TARGET_TYPE;
  282. typedef struct tag_WBEM_FILTER_TARGET_LOAD_INFO
  283. {
  284. CLSID m_clsidConsumerProvider;
  285. IWbemClassObject* m_pLogicalConsumer;
  286. IWbemUnboundObjectSink* m_pCached;
  287. } WBEM_FILTER_TARGET_LOAD_INFO;
  288. typedef struct tag_WBEM_FILTER_TARGET_MARSHALLED_INFO
  289. {
  290. IWbemUnboundObjectSink* m_pSink;
  291. IWbemClassObject* m_pLogicalConsumer;
  292. } WBEM_FILTER_TARGET_MARSHALLED_INFO;
  293. typedef [switch_type(long)] union tag_WBEM_FILTER_TARGET_DATA
  294. {
  295. [case(WBEM_FILTER_TARGET_TYPE_INTERNAL)]
  296. WBEM_REMOTE_TARGET_ID_TYPE m_ID;
  297. [case(WBEM_FILTER_TARGET_TYPE_MARSHALLED)]
  298. WBEM_FILTER_TARGET_MARSHALLED_INFO m_MarshInfo;
  299. [case(WBEM_FILTER_TARGET_TYPE_LOADABLE)]
  300. WBEM_FILTER_TARGET_LOAD_INFO m_LoadInfo;
  301. [default]
  302. ;
  303. } WBEM_FILTER_TARGET_DATA;
  304. typedef struct tag_WBEM_FILTER_TARGET
  305. {
  306. long m_lType;
  307. [switch_is(m_lType)] WBEM_FILTER_TARGET_DATA m_Data;
  308. boolean m_bSynch;
  309. } WBEM_FILTER_TARGET;
  310. typedef struct tag_WBEM_FILTER_TARGETS
  311. {
  312. long m_lNumTargets;
  313. [size_is(m_lNumTargets)] WBEM_FILTER_TARGET* m_aTargets;
  314. } WBEM_FILTER_TARGETS;
  315. */
  316. [object, restricted, uuid(60e512d4-c47b-11d2-b338-00105a1f4aaf)]
  317. interface IWbemFilterProxy : IUnknown
  318. {
  319. HRESULT Initialize(
  320. [in] IWbemMetaData* pMetaData,
  321. [in] IWbemMultiTarget* pMultiTarget);
  322. HRESULT Lock();
  323. HRESULT Unlock();
  324. HRESULT AddFilter(
  325. [in] IWbemContext* pContext,
  326. [in, string] LPCWSTR wszQuery,
  327. [in] WBEM_REMOTE_TARGET_ID_TYPE Id);
  328. HRESULT RemoveFilter(
  329. [in] IWbemContext* pContext,
  330. [in] WBEM_REMOTE_TARGET_ID_TYPE Id);
  331. HRESULT RemoveAllFilters(
  332. [in] IWbemContext* pContext);
  333. HRESULT AddDefinitionQuery(
  334. [in] IWbemContext* pContext,
  335. [in] LPCWSTR wszQuery);
  336. HRESULT RemoveAllDefinitionQueries(
  337. [in] IWbemContext* pContext);
  338. HRESULT Disconnect();
  339. };
  340. [object, restricted, uuid(6c19be34-7500-11d1-ad94-00c04fd8fdff)]
  341. interface IWbemFilterStub : IUnknown
  342. {
  343. HRESULT RegisterProxy(
  344. [in] IWbemFilterProxy* pProxy);
  345. HRESULT UnregisterProxy(
  346. [in] IWbemFilterProxy* pProxy);
  347. };
  348. typedef GUID REQUESTID;
  349. [restricted, object, uuid(a57be31e-efe3-11d0-ad71-00c04fd8fdff)]
  350. interface IWbemCausalityAccess : IUnknown
  351. {
  352. HRESULT GetRequestId([out] REQUESTID* pId);
  353. HRESULT IsChildOf([in] REQUESTID Id);
  354. HRESULT CreateChild([out] IWbemCausalityAccess** ppChild);
  355. HRESULT GetParentId([out] REQUESTID* pId);
  356. HRESULT GetHistoryInfo([out] long* plNumParents, [out] long* plNumSiblings);
  357. HRESULT MakeSpecial();
  358. HRESULT IsSpecial();
  359. };
  360. //==============================================================================
  361. //==============================================================================
  362. //
  363. // Hi-perf specific interfaces.
  364. //
  365. //==============================================================================
  366. //==============================================================================
  367. typedef enum _WBEM_INSTANCE_BLOB_TYPE
  368. {
  369. WBEM_BLOB_TYPE_DATA_TABLE_ONLY,
  370. WBEM_BLOB_TYPE_DATA_AND_HEAP,
  371. WBEM_BLOB_TYPE_ALL,
  372. WBEM_BLOB_TYPE_ERROR, // m_lBlobLength contains error code
  373. WBEM_BLOB_TYPE_ENUM
  374. } WBEM_INSTANCE_BLOB_TYPE;
  375. typedef struct _WBEM_REFRESHED_OBJECT
  376. {
  377. long m_lRequestId;
  378. long m_lBlobType;
  379. long m_lBlobLength;
  380. [size_is(m_lBlobLength)] byte* m_pbBlob;
  381. } WBEM_REFRESHED_OBJECT;
  382. [restricted, uuid(F1E9C5B2-F59B-11d2-B362-00105A1F8177)]
  383. interface IWbemRemoteRefresher : IUnknown
  384. {
  385. HRESULT RemoteRefresh(
  386. [in] long lFlags,
  387. [out] long* plNumObjects,
  388. [out, size_is(,*plNumObjects)] WBEM_REFRESHED_OBJECT** paObjects);
  389. HRESULT StopRefreshing(
  390. [in] long lNumIds,
  391. [in,size_is(lNumIds)] long* aplIds,
  392. [in] long lFlags);
  393. HRESULT GetGuid(
  394. [in] long lFlags,
  395. [out] GUID* pGuid );
  396. };
  397. typedef struct _WBEM_REFRESH_INFO_CLIENT_LOADABLE
  398. {
  399. CLSID m_clsid;
  400. [string] WCHAR* m_wszNamespace;
  401. IWbemObjectAccess* m_pTemplate;
  402. } WBEM_REFRESH_INFO_CLIENT_LOADABLE;
  403. typedef struct _WBEM_REFRESH_INFO_REMOTE
  404. {
  405. IWbemRemoteRefresher* m_pRefresher;
  406. IWbemObjectAccess* m_pTemplate;
  407. GUID m_guid;
  408. } WBEM_REFRESH_INFO_REMOTE;
  409. typedef struct _WBEM_REFRESH_INFO_SHARED
  410. {
  411. [string] WCHAR* m_wszSharedMemoryName;
  412. IWbemRefresher* m_pRefresher;
  413. } WBEM_REFRESH_INFO_SHARED;
  414. typedef struct _WBEM_REFRESH_INFO_CONTINUOUS
  415. {
  416. [string] WCHAR* m_wszSharedMemoryName;
  417. } WBEM_REFRESH_INFO_CONTINUOUS;
  418. typedef struct _WBEM_REFRESH_INFO_DIRECT
  419. {
  420. CLSID m_clsid;
  421. [string] WCHAR* m_wszNamespace;
  422. IWbemObjectAccess* m_pTemplate;
  423. IWbemHiPerfProvider* m_pProvider;
  424. } WBEM_REFRESH_INFO_DIRECT;
  425. typedef enum _WBEM_REFRESH_TYPE
  426. {
  427. WBEM_REFRESH_TYPE_INVALID,
  428. WBEM_REFRESH_TYPE_DIRECT,
  429. WBEM_REFRESH_TYPE_CLIENT_LOADABLE,
  430. WBEM_REFRESH_TYPE_REMOTE,
  431. WBEM_REFRESH_TYPE_SHARED,
  432. WBEM_REFRESH_TYPE_CONTINUOUS
  433. } WBEM_REFRESH_TYPE;
  434. typedef enum _WBEM_RECONNECT_TYPE
  435. {
  436. WBEM_RECONNECT_TYPE_OBJECT,
  437. WBEM_RECONNECT_TYPE_ENUM,
  438. WBEM_RECONNECT_TYPE_LAST,
  439. } WBEM_RECONNECT_TYPE;
  440. typedef [switch_type(long)] union _WBEM_REFRESH_INFO_UNION
  441. {
  442. [case (WBEM_REFRESH_TYPE_CLIENT_LOADABLE)]
  443. WBEM_REFRESH_INFO_CLIENT_LOADABLE m_ClientLoadable;
  444. [case (WBEM_REFRESH_TYPE_REMOTE)]
  445. WBEM_REFRESH_INFO_REMOTE m_Remote;
  446. [case (WBEM_REFRESH_TYPE_SHARED)]
  447. WBEM_REFRESH_INFO_SHARED m_Shared;
  448. [case (WBEM_REFRESH_TYPE_CONTINUOUS)]
  449. WBEM_REFRESH_INFO_CONTINUOUS m_Continuous;
  450. [case (WBEM_REFRESH_TYPE_DIRECT)]
  451. WBEM_REFRESH_INFO_DIRECT m_Direct;
  452. [case (WBEM_REFRESH_TYPE_INVALID)]
  453. HRESULT m_hres;
  454. } WBEM_REFRESH_INFO_UNION;
  455. typedef struct _WBEM_REFRESH_INFO
  456. {
  457. long m_lType;
  458. [switch_is(m_lType)] WBEM_REFRESH_INFO_UNION m_Info;
  459. long m_lCancelId;
  460. } WBEM_REFRESH_INFO;
  461. typedef struct _WBEM_REFRESHER_ID
  462. {
  463. [string] LPSTR m_szMachineName;
  464. DWORD m_dwProcessId;
  465. GUID m_guidRefresherId;
  466. } WBEM_REFRESHER_ID;
  467. typedef struct _WBEM_RECONNECT_INFO
  468. {
  469. long m_lType;
  470. [string] LPCWSTR m_pwcsPath;
  471. } WBEM_RECONNECT_INFO;
  472. typedef struct _WBEM_RECONNECT_RESULTS
  473. {
  474. long m_lId;
  475. HRESULT m_hr;
  476. } WBEM_RECONNECT_RESULTS;
  477. [restricted, uuid(2C9273E0-1DC3-11d3-B364-00105A1F8177)]
  478. interface IWbemRefreshingServices : IUnknown
  479. {
  480. HRESULT AddObjectToRefresher(
  481. [in] WBEM_REFRESHER_ID* pRefresherId,
  482. [in, string] LPCWSTR wszPath,
  483. [in] long lFlags,
  484. [in] IWbemContext* pContext,
  485. [in] DWORD dwClientRefrVersion,
  486. [out] WBEM_REFRESH_INFO* pInfo,
  487. [out] DWORD* pdwSvrRefrVersion);
  488. HRESULT AddObjectToRefresherByTemplate(
  489. [in] WBEM_REFRESHER_ID* pRefresherId,
  490. [in] IWbemClassObject* pTemplate,
  491. [in] long lFlags,
  492. [in] IWbemContext* pContext,
  493. [in] DWORD dwClientRefrVersion,
  494. [out] WBEM_REFRESH_INFO* pInfo,
  495. [out] DWORD* pdwSvrRefrVersion);
  496. HRESULT AddEnumToRefresher(
  497. [in] WBEM_REFRESHER_ID* pRefresherId,
  498. [in, string] LPCWSTR wszClass,
  499. [in] long lFlags,
  500. [in] IWbemContext* pContext,
  501. [in] DWORD dwClientRefrVersion,
  502. [out] WBEM_REFRESH_INFO* pInfo,
  503. [out] DWORD* pdwSvrRefrVersion);
  504. HRESULT RemoveObjectFromRefresher(
  505. [in] WBEM_REFRESHER_ID* pRefresherId,
  506. [in] long lId,
  507. [in] long lFlags,
  508. [in] DWORD dwClientRefrVersion,
  509. [out] DWORD* pdwSvrRefrVersion);
  510. HRESULT GetRemoteRefresher( [in] WBEM_REFRESHER_ID* pRefresherId,
  511. [in] long lFlags,
  512. [in] DWORD dwClientRefrVersion,
  513. [out] IWbemRemoteRefresher** ppRemRefresher,
  514. [out] GUID* pGuid,
  515. [out] DWORD* pdwSvrRefrVersion);
  516. HRESULT ReconnectRemoteRefresher(
  517. [in] WBEM_REFRESHER_ID* pRefresherId,
  518. [in] long lFlags,
  519. [in] long lNumObjects,
  520. [in] DWORD dwClientRefrVersion,
  521. [in, size_is(lNumObjects)] WBEM_RECONNECT_INFO* apReconnectInfo,
  522. [in, out, size_is(lNumObjects)] WBEM_RECONNECT_RESULTS* apReconnectResults ,
  523. [out] DWORD* pdwSvrRefrVersion);
  524. };
  525. [restricted, local, uuid(504e6fe4-dfcd-11d1-adb4-00c04fd8fdff)]
  526. interface IWbemUnloadingControl : IUnknown
  527. {
  528. HRESULT SetMustPreventUnloading([in] boolean bPrevent);
  529. };
  530. [restricted, local, uuid(61d629e4-e546-11d2-b33a-00105a1f4aaf)]
  531. interface IWbemInternalServices : IUnknown
  532. {
  533. HRESULT FindKeyRoot(
  534. [in, string] LPCWSTR wszClassName,
  535. [out] IWbemClassObject** ppKeyRootClass);
  536. HRESULT InternalGetClass(
  537. [in, string] LPCWSTR wszClassName,
  538. [out] IWbemClassObject** ppClass);
  539. HRESULT InternalGetInstance(
  540. [in, string] LPCWSTR wszPath,
  541. [out] IWbemClassObject** ppInstance);
  542. HRESULT InternalExecQuery(
  543. [in, string] LPCWSTR wszQueryLanguage,
  544. [in, string] LPCWSTR wszQuery,
  545. [in] long lFlags,
  546. [in] IWbemObjectSink* pSink);
  547. HRESULT InternalCreateInstanceEnum(
  548. [in, string] LPCWSTR wszClassName,
  549. [in] long lFlags,
  550. [in] IWbemObjectSink* pSink);
  551. HRESULT GetDbInstance(
  552. [in, string] LPCWSTR wszDbKey,
  553. [out] IWbemClassObject** ppInstance);
  554. HRESULT GetDbReferences(
  555. [in] IWbemClassObject* pEndpoint,
  556. [in] IWbemObjectSink* pSink);
  557. HRESULT InternalPutInstance(
  558. [in] IWbemClassObject* pInstance);
  559. };
  560. //
  561. // IWbemObjectInternals
  562. //
  563. // Allows access to internal elements of the BLOB backing
  564. // a WBEM object.
  565. //
  566. // It's main intent is to allow us to break apart and/or
  567. // disable components while marshalling/unmarshalling and
  568. // then repackage said components at a later point in time.
  569. //
  570. typedef enum tagWBEM_OBJINTERNALPARTS_INFO
  571. {
  572. WBEM_OBJ_DECORATION_PART = 0x1,
  573. WBEM_OBJ_INSTANCE_PART = 0x2,
  574. WBEM_OBJ_CLASS_PART = 0x4,
  575. WBEM_OBJ_CLASS_PART_INTERNAL = 0x8,
  576. WBEM_OBJ_CLASS_PART_SHARED = 0x10
  577. } WBEM_OBJINTERNALPARTS_INFO;
  578. [local, restricted, object, uuid(7A7EC9AE-11D6-11d2-B5F9-00104B703EFD)]
  579. interface IWbemObjectInternals : IUnknown
  580. {
  581. HRESULT QueryObjectInfo(
  582. [out] DWORD *pdwResult
  583. );
  584. HRESULT SetObjectMemory(
  585. [in] LPVOID pMem,
  586. [in] DWORD dwMemSize
  587. );
  588. HRESULT GetObjectMemory(
  589. [out] LPVOID pDestination,
  590. [in] DWORD dwDestBufSize,
  591. [out] DWORD *pdwUsed
  592. );
  593. HRESULT SetObjectParts(
  594. [in] LPVOID pMem,
  595. [in] DWORD dwDestBufSize,
  596. [in] DWORD dwParts
  597. );
  598. HRESULT GetObjectParts(
  599. [out] LPVOID pDestination,
  600. [in] DWORD dwDestBufSize,
  601. [in] DWORD dwParts,
  602. [out] DWORD *pdwUsed
  603. );
  604. HRESULT StripClassPart();
  605. HRESULT SetClassPart(
  606. [in] LPVOID pClassPart,
  607. [in] DWORD dwSize
  608. );
  609. HRESULT MergeClassPart(
  610. [in] IWbemClassObject *pClassPart
  611. );
  612. HRESULT IsObjectInstance();
  613. HRESULT SetDecoration(
  614. [in, string] LPCWSTR pwcsServer,
  615. [in, string] LPCWSTR pwcsNamespace
  616. );
  617. HRESULT RemoveDecoration();
  618. HRESULT CompareClassParts(
  619. [in] IWbemClassObject* pObj,
  620. [in] long lFlags
  621. );
  622. HRESULT ClearWriteOnlyProperties();
  623. };
  624. //
  625. // IWbemWCOSmartEnum
  626. //
  627. // This Interface is intended to provide alternate synchronous enumeration of
  628. // objects for IEnumWbemClassObject. If this is called, it calls the normal
  629. // ::Next function, then repackages the data into a BYTE array which must
  630. // be appropriateky unmarshaled on the receiving end.
  631. //
  632. //
  633. [restricted, object, uuid(423EC01E-2E35-11d2-B604-00104B703EFD)]
  634. interface IWbemWCOSmartEnum : IUnknown
  635. {
  636. HRESULT Next(
  637. [in] REFGUID proxyGUID,
  638. [in] LONG lTimeout,
  639. [in] ULONG uCount,
  640. [out] ULONG* puReturned,
  641. [out] ULONG* pdwBuffSize,
  642. [out, size_is(,*pdwBuffSize)] byte** pBuffer
  643. );
  644. };
  645. //
  646. // IWbemFetchSmartEnum
  647. //
  648. // This Interface is used to return a smart enumerator. It assists
  649. // us when we need to get an enumerator but want to do so without
  650. // causing AddRef problem with the Proxy Manager.
  651. //
  652. [restricted, object, uuid(1C1C45EE-4395-11d2-B60B-00104B703EFD)]
  653. interface IWbemFetchSmartEnum : IUnknown
  654. {
  655. HRESULT GetSmartEnum(
  656. [out] IWbemWCOSmartEnum** ppSmartEnum
  657. );
  658. };
  659. //
  660. // IWbemLoginHelper
  661. //
  662. // This Interface is used to verify if a connection is on the same
  663. // machine.
  664. //
  665. [restricted, object, uuid(541679AB-2E5F-11d3-B34E-00104BCC4B4A)]
  666. interface IWbemLoginHelper : IUnknown
  667. {
  668. HRESULT SetEvent([in] LPCSTR sEventToSet);
  669. };
  670. //
  671. // ICreateSecondaryStub
  672. //
  673. // This Interface by unsecapp and winmgmt
  674. //
  675. [restricted, object, uuid(6468FE15-412D-11d3-B350-00104BCC4B4A)]
  676. interface IWbemCreateSecondaryStub : IUnknown
  677. {
  678. HRESULT CreateSecondaryStub([out] IUnknown** ppSecondaryStub);
  679. };
  680. //
  681. // IWinmgmtMofCompiler
  682. //
  683. //
  684. //
  685. [local, object, uuid(C10B4772-4DA0-11d2-A2F5-00C04F86FB7D)]
  686. interface IWinmgmtMofCompiler : IUnknown
  687. {
  688. HRESULT WinmgmtCompileFile(
  689. [in, string] LPWSTR FileName,
  690. [in, string] LPWSTR ServerAndNamespace,
  691. [in] LONG lOptionFlags, // autocomp, check, etc
  692. [in] LONG lClassFlags,
  693. [in] LONG lInstanceFlags,
  694. [in] IWbemServices * pOverride,
  695. [in] IWbemContext * pCtx,
  696. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  697. );
  698. // lFlags correspond to all the available command-line flags.
  699. HRESULT WinmgmtCompileBuffer(
  700. [in] long BuffSize,
  701. [in, size_is(BuffSize)]BYTE * pBuffer,
  702. [in] LONG lOptionFlags, // autocomp, check, etc
  703. [in] LONG lClassFlags,
  704. [in] LONG lInstanceFlags,
  705. [in] IWbemServices * pOverride,
  706. [in] IWbemContext * pCtx,
  707. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  708. );
  709. // lFlags correspond to all the available command-line flags.
  710. };
  711. /*
  712. Client programming notes:
  713. (1) Client takes IWbemServices, and does QI to get IWbemPerfDataServices
  714. (2) Client retrieves objects through normal means, and can QI any IWbemClassObject
  715. to get IWbemClassObjectEx.
  716. (3) IWbemClassObjectEx will support scalar types VT_I4, VT_UI4, VT_I8, VT_UI8, VT_LPWSTR
  717. (4) To get continuous data, client must call IWbemPerfDataServices::GetRefresherByObject
  718. or IWbemPerfDataServices::GetRefreshByPath.
  719. (5) Client executes IWbemRefresher::Refresh() and then the associated object is updated.
  720. The object can again be retrieved through IWbemRefresher::GetObject. However, the
  721. pointer could simply have been maintained throughout.
  722. (6) After a GetObject() or Refresh(), the object maintains its state, and can be
  723. alternately accessed via IWbemClassObject or IWbemClassObjectEx.
  724. How does the client proxy know whether to carry out the refresh through the shared
  725. memory, local refresh, or remote?
  726. Answer: When GetRefresherByObject/...ByPath is called, a search is made for the object
  727. in CIMOM. If an in-proc provider is supported it will be transparently loaded
  728. into
  729. Provider programming notes:
  730. (1) Provider's class is in the repository.
  731. (2) Provider implements IWbemTimeCriticalProvider. The namespace is understood
  732. by the registration & CLSID.
  733. (3) QueryInstances() returns the instances to the provided sink.
  734. (4) CreateObjectRefresher() returns a refresher for a given instance.
  735. The incoming object is for reference purposes.
  736. The provider takes the incoming object or an equivalent one and
  737. calls MapObject(). The mapped object is gauranteed to be in shared
  738. memory.
  739. (5) Provider implements IWbemRefresher. When Refresh() is called
  740. the provider calls Lock() and updates the local copy mapped to
  741. the blob, followed by Unlock().
  742. [a] Provider can be CIMOM hosted, client-hosted, self-hosted, or remote-hosted.
  743. Continuous provider:
  744. (1) Becomes a general purpose provider, hosted by CIMOM.
  745. (2) Provider calls GetObject on class def, and creates the necessary
  746. instances.
  747. (3) Each instance is mapped using MapObject().
  748. (4) Properties are directly updated as required.
  749. (5) Provider can release any pointers held to CIMOM. However,
  750. if the provider is in-proc to CIMOM, this could result in
  751. the provider getting itself unloaded. Only out-of-proc
  752. providers need to worry about this.
  753. (6) Provider calls Lock() and updates the properties, followed
  754. by Unlock().
  755. (7) When client executes Refresh(), which calls Lock(), does a blob
  756. copy and then an Unlock().
  757. problems: Provider needs an IWbemServices pointer to get class definitions.
  758. */
  759. [uuid(027947f3-d731-11ce-a357-000000000001)]
  760. library WbemInternal_v1
  761. {
  762. importlib("stdole32.tlb");
  763. typedef enum tag_WBEM_MISC_FLAG_TYPE
  764. {
  765. WBEM_FLAG_KEEP_SHAPE = 0x100000,
  766. WBEM_FLAG_NO_CLASS_PROVIDERS = 0x8000,
  767. WBEM_FLAG_NO_EVENTS = 0x4000,
  768. WBEM_FLAG_IGNORE_IDS = 0x2000,
  769. WBEM_FLAG_IS_INOUT = 0x1000,
  770. } WBEM_MISC_FLAG_TYPE;
  771. typedef enum tag_WBEM_CLASSPART_FLAG_TYPE
  772. {
  773. WBEM_FLAG_CLASSPART_NOT_LOCALIZED = 0x00,
  774. WBEM_FLAG_CLASSPART_LOCALIZED = 0x01,
  775. WBEM_FLAG_CLASSPART_LOCALIZATION_MASK = 0x01
  776. } WBEM_CLASSPART_FLAG_TYPE;
  777. typedef enum tag_WBEM_INSTANCEPART_FLAG_TYPE
  778. {
  779. WBEM_FLAG_INSTANCEPART_NOT_LOCALIZED = 0x00,
  780. WBEM_FLAG_INSTANCEPART_LOCALIZED = 0x01,
  781. WBEM_FLAG_INSTANCEPART_LOCALIZATION_MASK = 0x01
  782. } WBEM_INSTANCEPART_FLAG_TYPE;
  783. typedef enum tag_WBEM_CMPCLSPART_FLAG_TYPE
  784. {
  785. WBEM_FLAG_COMPARE_FULL = 0x00,
  786. WBEM_FLAG_COMPARE_BINARY = 0x01,
  787. WBEM_FLAG_COMPARE_LOCALIZED = 0x02
  788. } WBEM_CMPCLSPART_FLAG_TYPE;
  789. interface IWbemPropertySource;
  790. interface IWbemRawObjectSink;
  791. interface IWbemDecorator;
  792. interface IWbemEventSubsystem_m4;
  793. interface IWbemCausalityAccess;
  794. interface IWbemRefreshingServices;
  795. interface IWbemRemoteRefresher;
  796. interface IWbemMetaData;
  797. interface IWbemFilterStub;
  798. interface IWbemFilterProxy;
  799. interface IWbemLifeControl;
  800. interface IWbemCreateSecondaryStub;
  801. /////////////////////////////////////////////////////////
  802. //
  803. // Marshaling proxy for WbemClassObjec
  804. //
  805. [restricted, uuid(4590f812-1d3a-11d0-891f-00aa004b2e24)]
  806. coclass WbemClassObjectProxy
  807. {
  808. interface IWbemClassObject;
  809. interface IMarshal;
  810. };
  811. [restricted, uuid(5d08b586-343a-11d0-ad46-00c04fd8fdff)]
  812. coclass WbemEventSubsystem
  813. {
  814. interface IWbemEventSubsystem_m4;
  815. };
  816. [restricted, uuid(08a59b5d-dd50-11d0-ad6b-00c04fd8fdff)]
  817. coclass HmmpEventConsumerProvider
  818. {
  819. interface IWbemUnboundObjectSink;
  820. };
  821. [restricted, uuid(6c19be35-7500-11d1-ad94-00c04fd8fdff)]
  822. coclass WbemFilterProxy
  823. {
  824. interface IWbemFilterProxy;
  825. interface IWbemObjectSink;
  826. };
  827. [restricted, uuid(4fa18276-912a-11d1-ad9b-00c04fd8fdff)]
  828. coclass InProcWbemLevel1Login
  829. {
  830. interface IWbemLevel1Login;
  831. };
  832. [uuid(C10B4771-4DA0-11d2-A2F5-00C04F86FB7D)]
  833. coclass WinmgmtMofCompiler
  834. {
  835. interface IWinmgmtMofCompiler;
  836. };
  837. };