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.

602 lines
16 KiB

  1. cpp_quote("/*******************************************************************************/" )
  2. cpp_quote("/* */" )
  3. cpp_quote("/* Copyright � Microsoft Corporation. All rights reserved. */" )
  4. cpp_quote("/* */" )
  5. cpp_quote("/*******************************************************************************/" )
  6. import "objidl.idl";
  7. import "oleidl.idl";
  8. import "oaidl.idl";
  9. import "wbemcli.idl";
  10. import "wmiutils.idl";
  11. // this is used by providers that do not wish to be instantiated
  12. // by winmgmt, rather the provider registers it's participation
  13. // in servicing client requests as and when desired. This is
  14. // primarily used by providers that act on the part of application
  15. // hosts and that export management information only when they are activated
  16. // via some application scenario.
  17. [uuid(4cfc7932-0f9d-4bef-9c32-8ea2a6b56fcb)]
  18. coclass WbemDecoupledRegistrar
  19. {
  20. interface IWbemDecoupledRegistrar ;
  21. };
  22. [uuid(f5f75737-2843-4f22-933d-c76a97cda62f)]
  23. coclass WbemDecoupledBasicEventProvider
  24. {
  25. interface IWbemDecoupledBasicEventProvider ;
  26. };
  27. [object, local, uuid(1005cbcf-e64f-4646-bcd3-3a089d8a84b4)]
  28. interface IWbemDecoupledRegistrar : IUnknown
  29. {
  30. HRESULT Register (
  31. [in] long a_Flags ,
  32. [in] IWbemContext *a_Context ,
  33. [in] LPCWSTR a_User ,
  34. [in] LPCWSTR a_Locale ,
  35. [in] LPCWSTR a_Scope ,
  36. [in] LPCWSTR a_Registration ,
  37. [in] IUnknown *a_Unknown
  38. ) ;
  39. HRESULT UnRegister () ;
  40. } ;
  41. [object, local, uuid(86336d20-ca11-4786-9ef1-bc8a946b42fc)]
  42. interface IWbemDecoupledBasicEventProvider : IWbemDecoupledRegistrar
  43. {
  44. HRESULT GetSink (
  45. [in] long a_Flags ,
  46. [in] IWbemContext *a_Context ,
  47. [out] IWbemObjectSink **a_Sink
  48. ) ;
  49. HRESULT GetService (
  50. [in] long a_Flags ,
  51. [in] IWbemContext *a_Context ,
  52. [out] IWbemServices **a_Service
  53. ) ;
  54. } ;
  55. typedef VARIANT WBEM_VARIANT;
  56. typedef [string] WCHAR* WBEM_WSTR;
  57. typedef [string] const WCHAR* WBEM_CWSTR;
  58. #define OPTIONAL in, unique
  59. typedef struct _tag_WmiInternalContext
  60. {
  61. unsigned __int64 m_IdentifyHandle ;
  62. unsigned long m_ProcessIdentifier ;
  63. } WmiInternalContext ;
  64. [object, uuid(1be41571-91dd-11d1-aeb2-00c04fb68820)]
  65. interface IWbemProviderInitSink : IUnknown
  66. {
  67. HRESULT SetStatus(
  68. [in] LONG lStatus,
  69. [in] LONG lFlags
  70. );
  71. };
  72. [restricted, object, uuid(e246107b-b06e-11d0-ad61-00c04fd8fdff)]
  73. interface IWbemUnboundObjectSink : IUnknown
  74. {
  75. HRESULT IndicateToConsumer(
  76. [in] IWbemClassObject* pLogicalConsumer,
  77. [in] long lNumObjects,
  78. [in, size_is(lNumObjects)] IWbemClassObject** apObjects);
  79. };
  80. [object,uuid(41aa40e6-2fba-4e80-ade9-34306567206d)]
  81. interface _IWmiProviderSubsystemRegistrar : IUnknown
  82. {
  83. HRESULT Register (
  84. [in] long a_Flags ,
  85. [in] IWbemContext *a_Context ,
  86. [in,unique] LPCWSTR a_User ,
  87. [in,unique] LPCWSTR a_Locale ,
  88. [in] LPCWSTR a_Scope ,
  89. [in] LPCWSTR a_Registration ,
  90. [in] DWORD a_ProcessIdentifier ,
  91. [in] IUnknown *a_Unknown ,
  92. [in] GUID a_Identity
  93. ) ;
  94. HRESULT UnRegister (
  95. [in] long a_Flags ,
  96. [in] IWbemContext *a_Context ,
  97. [in,unique] LPCWSTR a_User ,
  98. [in,unique] LPCWSTR a_Locale ,
  99. [in] LPCWSTR a_Scope ,
  100. [in] LPCWSTR a_Registration ,
  101. [in] GUID a_Identity
  102. ) ;
  103. } ;
  104. [object, uuid(6919dd07-1637-4611-a8a7-c16fac5b2d53)]
  105. interface Internal_IWbemProviderInit : IUnknown
  106. {
  107. HRESULT Internal_Initialize (
  108. [in] WmiInternalContext a_InternalContext ,
  109. [in, unique, string] LPWSTR wszUser,
  110. [in] LONG lFlags,
  111. [in, string] LPWSTR wszNamespace,
  112. [in, unique, string] LPWSTR wszLocale,
  113. [in] IWbemServices* pNamespace,
  114. [in] IWbemContext* pCtx,
  115. [in] IWbemProviderInitSink* pInitSink
  116. ) ;
  117. };
  118. [restricted, object, uuid(2b322b6e-a9df-44e3-97bf-259e3583fda4)]
  119. interface Internal_IWbemProviderIdentity : IUnknown
  120. {
  121. HRESULT Internal_SetRegistrationObject(
  122. [in] WmiInternalContext a_InternalContext ,
  123. [in] long lFlags,
  124. [in] IWbemClassObject* pProvReg);
  125. };
  126. [object, uuid(f50a28cf-5c9c-4f7e-9d80-e25e16e18c59)]
  127. interface Internal_IWbemServices : IUnknown
  128. {
  129. // Context.
  130. // ========
  131. HRESULT Internal_OpenNamespace (
  132. [in] WmiInternalContext a_InternalContext ,
  133. [in] const BSTR strNamespace,
  134. [in] long lFlags,
  135. [in] IWbemContext* pCtx,
  136. [out, OPTIONAL] IWbemServices** ppWorkingNamespace,
  137. [out, OPTIONAL] IWbemCallResult** ppResult
  138. );
  139. HRESULT Internal_CancelAsyncCall(
  140. [in] WmiInternalContext a_InternalContext ,
  141. [in] IWbemObjectSink* pSink
  142. );
  143. HRESULT Internal_QueryObjectSink(
  144. [in] WmiInternalContext a_InternalContext ,
  145. [in] long lFlags,
  146. [out] IWbemObjectSink** ppResponseHandler
  147. );
  148. // Classes and instances.
  149. // ======================
  150. HRESULT Internal_GetObject(
  151. [in] WmiInternalContext a_InternalContext ,
  152. [in] const BSTR strObjectPath,
  153. [in] long lFlags,
  154. [in] IWbemContext* pCtx,
  155. [out, OPTIONAL] IWbemClassObject** ppObject,
  156. [out, OPTIONAL] IWbemCallResult** ppCallResult
  157. );
  158. HRESULT Internal_GetObjectAsync(
  159. [in] WmiInternalContext a_InternalContext ,
  160. [in] const BSTR strObjectPath,
  161. [in] long lFlags,
  162. [in] IWbemContext* pCtx,
  163. [in] IWbemObjectSink* pResponseHandler
  164. );
  165. // Class manipulation.
  166. // ===================
  167. HRESULT Internal_PutClass(
  168. [in] WmiInternalContext a_InternalContext ,
  169. [in] IWbemClassObject* pObject,
  170. [in] long lFlags,
  171. [in] IWbemContext* pCtx,
  172. [out, OPTIONAL] IWbemCallResult** ppCallResult
  173. );
  174. HRESULT Internal_PutClassAsync(
  175. [in] WmiInternalContext a_InternalContext ,
  176. [in] IWbemClassObject* pObject,
  177. [in] long lFlags,
  178. [in] IWbemContext* pCtx,
  179. [in] IWbemObjectSink* pResponseHandler
  180. );
  181. HRESULT Internal_DeleteClass(
  182. [in] WmiInternalContext a_InternalContext ,
  183. [in] const BSTR strClass,
  184. [in] long lFlags,
  185. [in] IWbemContext* pCtx,
  186. [out, OPTIONAL] IWbemCallResult** ppCallResult
  187. );
  188. HRESULT Internal_DeleteClassAsync(
  189. [in] WmiInternalContext a_InternalContext ,
  190. [in] const BSTR strClass,
  191. [in] long lFlags,
  192. [in] IWbemContext* pCtx,
  193. [in] IWbemObjectSink* pResponseHandler
  194. );
  195. HRESULT Internal_CreateClassEnum(
  196. [in] WmiInternalContext a_InternalContext ,
  197. [in] const BSTR strSuperclass,
  198. [in] long lFlags,
  199. [in] IWbemContext* pCtx,
  200. [out] IEnumWbemClassObject** ppEnum
  201. );
  202. HRESULT Internal_CreateClassEnumAsync(
  203. [in] WmiInternalContext a_InternalContext ,
  204. [in] const BSTR strSuperclass,
  205. [in] long lFlags,
  206. [in] IWbemContext* pCtx,
  207. [in] IWbemObjectSink* pResponseHandler
  208. );
  209. // Instances.
  210. // ==========
  211. HRESULT Internal_PutInstance(
  212. [in] WmiInternalContext a_InternalContext ,
  213. [in] IWbemClassObject* pInst,
  214. [in] long lFlags,
  215. [in] IWbemContext* pCtx,
  216. [out, OPTIONAL] IWbemCallResult** ppCallResult
  217. );
  218. HRESULT Internal_PutInstanceAsync(
  219. [in] WmiInternalContext a_InternalContext ,
  220. [in] IWbemClassObject* pInst,
  221. [in] long lFlags,
  222. [in] IWbemContext* pCtx,
  223. [in] IWbemObjectSink* pResponseHandler
  224. );
  225. HRESULT Internal_DeleteInstance(
  226. [in] WmiInternalContext a_InternalContext ,
  227. [in] const BSTR strObjectPath,
  228. [in] long lFlags,
  229. [in] IWbemContext* pCtx,
  230. [out, OPTIONAL] IWbemCallResult** ppCallResult
  231. );
  232. HRESULT Internal_DeleteInstanceAsync(
  233. [in] WmiInternalContext a_InternalContext ,
  234. [in] const BSTR strObjectPath,
  235. [in] long lFlags,
  236. [in] IWbemContext* pCtx,
  237. [in] IWbemObjectSink* pResponseHandler
  238. );
  239. HRESULT Internal_CreateInstanceEnum(
  240. [in] WmiInternalContext a_InternalContext ,
  241. [in] const BSTR strFilter, // allow more things than a class name
  242. [in] long lFlags,
  243. [in] IWbemContext* pCtx,
  244. [out] IEnumWbemClassObject** ppEnum
  245. );
  246. HRESULT Internal_CreateInstanceEnumAsync(
  247. [in] WmiInternalContext a_InternalContext ,
  248. [in] const BSTR strFilter, // allow more things than a class name
  249. [in] long lFlags,
  250. [in] IWbemContext* pCtx,
  251. [in] IWbemObjectSink* pResponseHandler
  252. );
  253. // Queries.
  254. // ========
  255. HRESULT Internal_ExecQuery(
  256. [in] WmiInternalContext a_InternalContext ,
  257. [in] const BSTR strQueryLanguage,
  258. [in] const BSTR strQuery,
  259. [in] long lFlags,
  260. [in] IWbemContext* pCtx,
  261. [out] IEnumWbemClassObject** ppEnum
  262. );
  263. HRESULT Internal_ExecQueryAsync(
  264. [in] WmiInternalContext a_InternalContext ,
  265. [in] const BSTR strQueryLanguage,
  266. [in] const BSTR strQuery,
  267. [in] long lFlags,
  268. [in] IWbemContext* pCtx,
  269. [in] IWbemObjectSink* pResponseHandler
  270. );
  271. HRESULT Internal_ExecNotificationQuery(
  272. [in] WmiInternalContext a_InternalContext ,
  273. [in] const BSTR strQueryLanguage,
  274. [in] const BSTR strQuery,
  275. [in] long lFlags,
  276. [in] IWbemContext* pCtx,
  277. [out] IEnumWbemClassObject** ppEnum
  278. );
  279. HRESULT Internal_ExecNotificationQueryAsync(
  280. [in] WmiInternalContext a_InternalContext ,
  281. [in] const BSTR strQueryLanguage,
  282. [in] const BSTR strQuery,
  283. [in] long lFlags,
  284. [in] IWbemContext* pCtx,
  285. [in] IWbemObjectSink* pResponseHandler
  286. );
  287. // Methods
  288. // =======
  289. HRESULT Internal_ExecMethod(
  290. [in] WmiInternalContext a_InternalContext ,
  291. [in] const BSTR strObjectPath,
  292. [in] const BSTR strMethodName,
  293. [in] long lFlags,
  294. [in] IWbemContext* pCtx,
  295. [in] IWbemClassObject* pInParams,
  296. [out, OPTIONAL] IWbemClassObject** ppOutParams,
  297. [out, OPTIONAL] IWbemCallResult** ppCallResult
  298. );
  299. HRESULT Internal_ExecMethodAsync(
  300. [in] WmiInternalContext a_InternalContext ,
  301. [in] const BSTR strObjectPath,
  302. [in] const BSTR strMethodName,
  303. [in] long lFlags,
  304. [in] IWbemContext* pCtx,
  305. [in] IWbemClassObject* pInParams,
  306. [in] IWbemObjectSink* pResponseHandler
  307. );
  308. };
  309. //***************************************************************************
  310. //***************************************************************************
  311. [object,uuid(2db9fa90-9973-46cf-b310-9865b644699d)]
  312. interface Internal_IWbemObjectSink : IUnknown
  313. {
  314. HRESULT Internal_Indicate(
  315. [in] WmiInternalContext a_InternalContext ,
  316. [in] long lObjectCount,
  317. [in, size_is(lObjectCount)]
  318. IWbemClassObject** apObjArray
  319. );
  320. HRESULT Internal_SetStatus(
  321. [in] WmiInternalContext a_InternalContext ,
  322. [in] long lFlags,
  323. [in] HRESULT hResult,
  324. [in] BSTR strParam,
  325. [in] IWbemClassObject* pObjParam
  326. );
  327. };
  328. //***************************************************************************
  329. //***************************************************************************
  330. [object,uuid(ac9ea02a-2c8a-4acd-b562-d7e8ebee8e8e)]
  331. interface Internal_IEnumWbemClassObject : IUnknown
  332. {
  333. HRESULT Internal_Reset(
  334. [in] WmiInternalContext a_InternalContext
  335. );
  336. HRESULT Internal_Next(
  337. [in] WmiInternalContext a_InternalContext ,
  338. [in] long lTimeout,
  339. [in] ULONG uCount,
  340. [out, size_is(uCount), length_is(*puReturned)]
  341. IWbemClassObject** apObjects,
  342. [out] ULONG* puReturned
  343. );
  344. HRESULT Internal_NextAsync(
  345. [in] WmiInternalContext a_InternalContext ,
  346. [in] ULONG uCount,
  347. [in] IWbemObjectSink* pSink
  348. );
  349. HRESULT Internal_Clone(
  350. [in] WmiInternalContext a_InternalContext ,
  351. [out] IEnumWbemClassObject** ppEnum
  352. );
  353. HRESULT Internal_Skip(
  354. [in] WmiInternalContext a_InternalContext ,
  355. [in] long lTimeout,
  356. [in] ULONG nCount
  357. );
  358. };
  359. //***************************************************************************
  360. //***************************************************************************
  361. [object,uuid(11caa957-4e80-474e-a819-7fd72148ada9)]
  362. interface Internal_IWbemPropertyProvider : IUnknown
  363. {
  364. HRESULT Internal_GetProperty(
  365. [in] WmiInternalContext a_InternalContext ,
  366. [in] long lFlags,
  367. [in] const BSTR strLocale,
  368. [in] const BSTR strClassMapping,
  369. [in] const BSTR strInstMapping,
  370. [in] const BSTR strPropMapping,
  371. [out] VARIANT* pvValue
  372. );
  373. HRESULT Internal_PutProperty(
  374. [in] WmiInternalContext a_InternalContext ,
  375. [in] long lFlags,
  376. [in] const BSTR strLocale,
  377. [in] const BSTR strClassMapping,
  378. [in] const BSTR strInstMapping,
  379. [in] const BSTR strPropMapping,
  380. [in] const VARIANT* pvValue
  381. );
  382. };
  383. //***************************************************************************
  384. //***************************************************************************
  385. [object,uuid(fd450835-cf1b-4c87-9fd2-5e0d42fde081)]
  386. interface Internal_IWbemEventProvider : IUnknown
  387. {
  388. HRESULT Internal_ProvideEvents(
  389. [in] WmiInternalContext a_InternalContext ,
  390. [in] IWbemObjectSink* pSink,
  391. [in] long lFlags
  392. );
  393. };
  394. //***************************************************************************
  395. //***************************************************************************
  396. [object,uuid(df2373f5-efb2-475c-ad58-3102d61967d4)]
  397. interface Internal_IWbemEventProviderSecurity : IUnknown
  398. {
  399. HRESULT Internal_AccessCheck(
  400. [in] WmiInternalContext a_InternalContext ,
  401. [in] WBEM_CWSTR wszQueryLanguage,
  402. [in] WBEM_CWSTR wszQuery,
  403. [in] long lSidLength,
  404. [in, size_is(lSidLength), unique] const BYTE* pSid
  405. );
  406. };
  407. //***************************************************************************
  408. //***************************************************************************
  409. [object,uuid(854d745c-6742-42c0-8bb9-01ec466b6e87)]
  410. interface Internal_IWbemEventConsumerProvider : IUnknown
  411. {
  412. HRESULT Internal_FindConsumer(
  413. [in] WmiInternalContext a_InternalContext ,
  414. [in] IWbemClassObject* pLogicalConsumer,
  415. [out] IWbemUnboundObjectSink** ppConsumer
  416. );
  417. };
  418. //***************************************************************************
  419. //***************************************************************************
  420. [object,uuid(88f3781c-6902-4647-9a6b-a74f450af861)]
  421. interface Internal_IWbemEventConsumerProviderEx : Internal_IWbemEventConsumerProvider
  422. {
  423. HRESULT Internal_ValidateSubscription(
  424. [in] WmiInternalContext a_InternalContext ,
  425. [in] IWbemClassObject* pLogicalConsumer
  426. );
  427. };
  428. //***************************************************************************
  429. //***************************************************************************
  430. [object,uuid(8a0dc377-a9d3-41cb-bd69-ae1fdaf2dc68)]
  431. interface Internal_IWbemEventProviderQuerySink : IUnknown
  432. {
  433. HRESULT Internal_NewQuery(
  434. [in] WmiInternalContext a_InternalContext ,
  435. [in] unsigned long dwId,
  436. [in] WBEM_WSTR wszQueryLanguage,
  437. [in] WBEM_WSTR wszQuery
  438. );
  439. HRESULT Internal_CancelQuery(
  440. [in] WmiInternalContext a_InternalContext ,
  441. [in] unsigned long dwId
  442. );
  443. };
  444. //***************************************************************************
  445. //***************************************************************************
  446. [object,uuid(a210bfe9-c9f7-4919-b114-0d98b3d5341e)]
  447. interface Internal_IWbemUnboundObjectSink : IUnknown
  448. {
  449. HRESULT Internal_IndicateToConsumer(
  450. [in] WmiInternalContext a_InternalContext ,
  451. [in] IWbemClassObject* pLogicalConsumer,
  452. [in] long lNumObjects,
  453. [in, size_is(lNumObjects)] IWbemClassObject** apObjects
  454. );
  455. };
  456. [object,uuid(fec1b0ac-5808-4033-a915-c0185934581e)]
  457. interface _IWmiProviderSite : IUnknown
  458. {
  459. HRESULT GetSite ( [out] DWORD *a_ProcessIdentifier ) ;
  460. HRESULT SetContainer ( [in,unique] IUnknown *a_Container ) ;
  461. } ;