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.

1176 lines
32 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvWsv.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Decopled_Interceptor_IWbemServices_H
  9. #define _Decopled_Interceptor_IWbemServices_H
  10. #include <Allocator.h>
  11. #include <Algorithms.h>
  12. #include <TPQueue.h>
  13. #include <BasicTree.h>
  14. #include <Cache.h>
  15. #include <CGlobals.h>
  16. #include <ProvRegInfo.h>
  17. #include <ProvObjectSink.h>
  18. /******************************************************************************
  19. *
  20. * Name:
  21. *
  22. *
  23. * Description:
  24. *
  25. *
  26. *****************************************************************************/
  27. typedef WmiContainerController <void *> CWbemGlobal_VoidPointerController ;
  28. typedef CWbemGlobal_VoidPointerController :: Container CWbemGlobal_VoidPointerController_Container ;
  29. typedef CWbemGlobal_VoidPointerController :: Container_Iterator CWbemGlobal_VoidPointerController_Container_Iterator ;
  30. typedef CWbemGlobal_VoidPointerController :: WmiContainerElement VoidPointerContainerElement ;
  31. /******************************************************************************
  32. *
  33. * Name:
  34. *
  35. *
  36. * Description:
  37. *
  38. *
  39. *****************************************************************************/
  40. class CInterceptor_IWbemObjectSink ;
  41. #define CWbemGlobal_IWmiObjectSinkController CWbemGlobal_VoidPointerController
  42. #define CWbemGlobal_IWmiObjectSinkController_Container CWbemGlobal_VoidPointerController_Container
  43. #define CWbemGlobal_IWmiObjectSinkController_Container_Iterator CWbemGlobal_VoidPointerController_Container_Iterator
  44. #define ObjectSinkContainerElement VoidPointerContainerElement
  45. /******************************************************************************
  46. *
  47. * Name:
  48. *
  49. *
  50. * Description:
  51. *
  52. *
  53. *****************************************************************************/
  54. #define ProxyIndex_IWbemServices 0
  55. #define ProxyIndex_IWbemPropertyProvider 1
  56. #define ProxyIndex_IWbemEventProvider 2
  57. #define ProxyIndex_IWbemEventProviderQuerySink 3
  58. #define ProxyIndex_IWbemEventProviderSecurity 4
  59. #define ProxyIndex_IWbemProviderIdentity 5
  60. #define ProxyIndex_IWbemEventConsumerProvider 6
  61. #define ProxyIndex_IWbemEventConsumerProviderEx 7
  62. #define ProxyIndex_IWbemUnboundObjectSink 8
  63. #define ProxyIndex_Internal_IWbemServices 9
  64. #define ProxyIndex_Internal_IWbemPropertyProvider 10
  65. #define ProxyIndex_Internal_IWbemEventProvider 11
  66. #define ProxyIndex_Internal_IWbemEventProviderQuerySink 12
  67. #define ProxyIndex_Internal_IWbemEventProviderSecurity 13
  68. #define ProxyIndex_Internal_IWbemEventConsumerProvider 14
  69. #define ProxyIndex_Internal_IWbemEventConsumerProviderEx 15
  70. #define ProxyIndex_Internal_IWbemUnboundObjectSink 16
  71. #define ProxyIndex_IWbemShutdown 17
  72. #define ProxyIndex_Provider_Size 18
  73. #define ProxyIndex_UnBoundSync_IWbemUnboundObjectSink 0
  74. #define ProxyIndex_UnBoundSync_Size 1
  75. /******************************************************************************
  76. *
  77. * Name:
  78. *
  79. *
  80. * Description:
  81. *
  82. *
  83. *****************************************************************************/
  84. class CDecoupled_IWbemSyncObjectSink : public CCommon_IWbemSyncObjectSink
  85. {
  86. private:
  87. protected:
  88. public:
  89. CDecoupled_IWbemSyncObjectSink (
  90. WmiAllocator &a_Allocator ,
  91. IWbemObjectSink *a_InterceptedSink ,
  92. IUnknown *a_Unknown ,
  93. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  94. ULONG a_Dependant = FALSE
  95. ) ;
  96. ~CDecoupled_IWbemSyncObjectSink () ;
  97. } ;
  98. /******************************************************************************
  99. *
  100. * Name:
  101. *
  102. *
  103. * Description:
  104. *
  105. *
  106. *****************************************************************************/
  107. class CDecoupled_Batching_IWbemSyncObjectSink : public CCommon_Batching_IWbemSyncObjectSink
  108. {
  109. private:
  110. protected:
  111. public:
  112. CDecoupled_Batching_IWbemSyncObjectSink (
  113. WmiAllocator &a_Allocator ,
  114. IWbemObjectSink *a_InterceptedSink ,
  115. IUnknown *a_Unknown ,
  116. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  117. ULONG a_Dependant = FALSE
  118. ) ;
  119. ~CDecoupled_Batching_IWbemSyncObjectSink () ;
  120. } ;
  121. /******************************************************************************
  122. *
  123. * Name:
  124. *
  125. *
  126. * Description:
  127. *
  128. *
  129. *****************************************************************************/
  130. class CInterceptor_IWbemDecoupledUnboundObjectSink : public IWbemUnboundObjectSink ,
  131. public Internal_IWbemUnboundObjectSink ,
  132. public IWbemShutdown ,
  133. public VoidPointerContainerElement
  134. {
  135. private:
  136. WmiAllocator &m_Allocator ;
  137. CServerObject_ProviderRegistrationV1 *m_Registration ;
  138. IUnknown *m_Unknown ;
  139. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  140. ProxyContainer m_ProxyContainer ;
  141. protected:
  142. public:
  143. CInterceptor_IWbemDecoupledUnboundObjectSink (
  144. WmiAllocator &a_Allocator ,
  145. IUnknown *a_ServerSideProvider ,
  146. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  147. CServerObject_ProviderRegistrationV1 &a_Registration
  148. ) ;
  149. ~CInterceptor_IWbemDecoupledUnboundObjectSink () ;
  150. HRESULT Initialize () ;
  151. public:
  152. STDMETHODIMP QueryInterface (
  153. REFIID iid ,
  154. LPVOID FAR *iplpv
  155. ) ;
  156. STDMETHODIMP_( ULONG ) AddRef () ;
  157. STDMETHODIMP_( ULONG ) Release () ;
  158. HRESULT STDMETHODCALLTYPE Internal_IndicateToConsumer (
  159. WmiInternalContext a_InternalContext ,
  160. IWbemClassObject *a_LogicalConsumer ,
  161. long a_ObjectCount ,
  162. IWbemClassObject **a_Objects
  163. ) ;
  164. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  165. IWbemClassObject *a_LogicalConsumer ,
  166. long a_ObjectCount ,
  167. IWbemClassObject **a_Objects
  168. ) ;
  169. /* _IWmiProviderSite */
  170. HRESULT STDMETHODCALLTYPE GetSite ( DWORD *a_ProcessIdentifier ) ;
  171. HRESULT STDMETHODCALLTYPE SetContainer ( IUnknown *a_Container ) ;
  172. HRESULT STDMETHODCALLTYPE Shutdown (
  173. LONG a_Flags ,
  174. ULONG a_MaxMilliSeconds ,
  175. IWbemContext *a_Context
  176. ) ;
  177. } ;
  178. /******************************************************************************
  179. *
  180. * Name:
  181. *
  182. *
  183. * Description:
  184. *
  185. *
  186. *****************************************************************************/
  187. class CInterceptor_DecoupledClient : public IWbemServices ,
  188. public IWbemPropertyProvider ,
  189. public IWbemEventProvider ,
  190. public IWbemEventProviderQuerySink ,
  191. public IWbemEventProviderSecurity ,
  192. public IWbemProviderIdentity ,
  193. public IWbemEventConsumerProviderEx ,
  194. public IWbemUnboundObjectSink ,
  195. public IWbemProviderInit ,
  196. public Internal_IWbemProviderInit ,
  197. public Internal_IWbemServices ,
  198. public Internal_IWbemPropertyProvider ,
  199. public Internal_IWbemEventProvider ,
  200. public Internal_IWbemEventProviderQuerySink ,
  201. public Internal_IWbemEventProviderSecurity ,
  202. public Internal_IWbemEventConsumerProviderEx ,
  203. public Internal_IWbemUnboundObjectSink ,
  204. public _IWmiProviderSite ,
  205. public IWbemShutdown ,
  206. public CWbemGlobal_IWmiObjectSinkController
  207. {
  208. private:
  209. LONG m_ReferenceCount ;
  210. IUnknown *m_Unknown ;
  211. IWbemServices *m_Provider_IWbemServices ;
  212. IWbemPropertyProvider *m_Provider_IWbemPropertyProvider ;
  213. IWbemEventProvider *m_Provider_IWbemEventProvider ;
  214. IWbemEventProviderQuerySink *m_Provider_IWbemEventProviderQuerySink ;
  215. IWbemEventProviderSecurity *m_Provider_IWbemEventProviderSecurity ;
  216. IWbemProviderIdentity *m_Provider_IWbemProviderIdentity ;
  217. IWbemEventConsumerProvider *m_Provider_IWbemEventConsumerProvider ;
  218. IWbemEventConsumerProviderEx *m_Provider_IWbemEventConsumerProviderEx ;
  219. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  220. IWbemServices *m_CoreStub ;
  221. WmiAllocator &m_Allocator ;
  222. ProxyContainer m_ProxyContainer ;
  223. BSTR m_Locale ;
  224. BSTR m_User ;
  225. BSTR m_Namespace ;
  226. BSTR m_TransactionIdentifier ;
  227. public:
  228. CServerObject_ProviderRegistrationV1 *m_Registration ;
  229. UINT64 m_ProviderOperation_GetObjectAsync ;
  230. UINT64 m_ProviderOperation_PutClassAsync ;
  231. UINT64 m_ProviderOperation_DeleteClassAsync ;
  232. UINT64 m_ProviderOperation_CreateClassEnumAsync ;
  233. UINT64 m_ProviderOperation_PutInstanceAsync ;
  234. UINT64 m_ProviderOperation_DeleteInstanceAsync ;
  235. UINT64 m_ProviderOperation_CreateInstanceEnumAsync ;
  236. UINT64 m_ProviderOperation_ExecQueryAsync ;
  237. UINT64 m_ProviderOperation_ExecNotificationQueryAsync ;
  238. UINT64 m_ProviderOperation_ExecMethodAsync ;
  239. UINT64 m_ProviderOperation_Begin ;
  240. UINT64 m_ProviderOperation_Rollback ;
  241. UINT64 m_ProviderOperation_Commit ;
  242. UINT64 m_ProviderOperation_QueryState ;
  243. UINT64 m_ProviderOperation_QueryInstances ;
  244. UINT64 m_ProviderOperation_CreateRefresher ;
  245. UINT64 m_ProviderOperation_CreateRefreshableObject ;
  246. UINT64 m_ProviderOperation_StopRefreshing ;
  247. UINT64 m_ProviderOperation_CreateRefreshableEnum ;
  248. UINT64 m_ProviderOperation_GetObjects ;
  249. UINT64 m_ProviderOperation_GetProperty ;
  250. UINT64 m_ProviderOperation_PutProperty ;
  251. UINT64 m_ProviderOperation_ProvideEvents ;
  252. UINT64 m_ProviderOperation_NewQuery ;
  253. UINT64 m_ProviderOperation_CancelQuery ;
  254. UINT64 m_ProviderOperation_AccessCheck ;
  255. UINT64 m_ProviderOperation_SetRegistrationObject ;
  256. UINT64 m_ProviderOperation_FindConsumer ;
  257. UINT64 m_ProviderOperation_ValidateSubscription ;
  258. void Increment_ProviderOperation_GetObjectAsync () { m_ProviderOperation_GetObjectAsync ++ ; }
  259. void Increment_ProviderOperation_PutClassAsync () { m_ProviderOperation_PutClassAsync ++ ; }
  260. void Increment_ProviderOperation_DeleteClassAsync () { m_ProviderOperation_DeleteClassAsync ++ ; }
  261. void Increment_ProviderOperation_CreateClassEnumAsync () { m_ProviderOperation_CreateClassEnumAsync ++ ; }
  262. void Increment_ProviderOperation_PutInstanceAsync () { m_ProviderOperation_PutInstanceAsync ++ ; }
  263. void Increment_ProviderOperation_DeleteInstanceAsync () { m_ProviderOperation_DeleteInstanceAsync ++ ; }
  264. void Increment_ProviderOperation_CreateInstanceEnumAsync () { m_ProviderOperation_CreateInstanceEnumAsync ++ ; }
  265. void Increment_ProviderOperation_ExecQueryAsync () { m_ProviderOperation_ExecQueryAsync ++ ; }
  266. void Increment_ProviderOperation_ExecNotificationQueryAsync () { m_ProviderOperation_ExecNotificationQueryAsync ++ ; }
  267. void Increment_ProviderOperation_ExecMethodAsync () { m_ProviderOperation_ExecMethodAsync ++ ; }
  268. void Increment_ProviderOperation_Begin () { m_ProviderOperation_Begin ++ ; }
  269. void Increment_ProviderOperation_Rollback () { m_ProviderOperation_Rollback ++ ; }
  270. void Increment_ProviderOperation_Commit () { m_ProviderOperation_Commit ++ ; }
  271. void Increment_ProviderOperation_QueryState () { m_ProviderOperation_QueryState ++ ; }
  272. void Increment_ProviderOperation_QueryInstances () { m_ProviderOperation_QueryInstances ++ ; }
  273. void Increment_ProviderOperation_CreateRefresher () { m_ProviderOperation_CreateRefresher ++ ; }
  274. void Increment_ProviderOperation_CreateRefreshableObject () { m_ProviderOperation_CreateRefreshableObject ++ ; }
  275. void Increment_ProviderOperation_StopRefreshing () { m_ProviderOperation_StopRefreshing ++ ; }
  276. void Increment_ProviderOperation_CreateRefreshableEnum () { m_ProviderOperation_CreateRefreshableEnum ++ ; }
  277. void Increment_ProviderOperation_GetObjects () { m_ProviderOperation_GetObjects ++ ; }
  278. void Increment_ProviderOperation_GetProperty () { m_ProviderOperation_GetProperty ++ ; }
  279. void Increment_ProviderOperation_PutProperty () { m_ProviderOperation_PutProperty ++ ; }
  280. void Increment_ProviderOperation_ProvideEvents () { m_ProviderOperation_ProvideEvents ++ ; }
  281. void Increment_ProviderOperation_NewQuery () { m_ProviderOperation_NewQuery ++ ; }
  282. void Increment_ProviderOperation_CancelQuery () { m_ProviderOperation_CancelQuery ++ ; }
  283. void Increment_ProviderOperation_AccessCheck () { m_ProviderOperation_AccessCheck ++ ; }
  284. void Increment_ProviderOperation_SetRegistrationObject () { m_ProviderOperation_SetRegistrationObject ++ ; }
  285. void Increment_ProviderOperation_FindConsumer () { m_ProviderOperation_FindConsumer ++ ; }
  286. void Increment_ProviderOperation_ValidateSubscription () { m_ProviderOperation_ValidateSubscription ++ ; }
  287. UINT64 Get_ProviderOperation_GetObjectAsync () { return m_ProviderOperation_GetObjectAsync ; }
  288. UINT64 Get_ProviderOperation_PutClassAsync () { return m_ProviderOperation_PutClassAsync ; }
  289. UINT64 Get_ProviderOperation_DeleteClassAsync () { return m_ProviderOperation_DeleteClassAsync ; }
  290. UINT64 Get_ProviderOperation_CreateClassEnumAsync () { return m_ProviderOperation_CreateClassEnumAsync ; }
  291. UINT64 Get_ProviderOperation_PutInstanceAsync () { return m_ProviderOperation_PutInstanceAsync ; }
  292. UINT64 Get_ProviderOperation_DeleteInstanceAsync () { return m_ProviderOperation_DeleteInstanceAsync ; }
  293. UINT64 Get_ProviderOperation_CreateInstanceEnumAsync () { return m_ProviderOperation_CreateInstanceEnumAsync ; }
  294. UINT64 Get_ProviderOperation_ExecQueryAsync () { return m_ProviderOperation_ExecQueryAsync ; }
  295. UINT64 Get_ProviderOperation_ExecNotificationQueryAsync () { return m_ProviderOperation_ExecNotificationQueryAsync ; }
  296. UINT64 Get_ProviderOperation_ExecMethodAsync () { return m_ProviderOperation_ExecMethodAsync ; }
  297. UINT64 Get_ProviderOperation_Begin () { return m_ProviderOperation_Begin ; }
  298. UINT64 Get_ProviderOperation_Rollback () { return m_ProviderOperation_Rollback ; }
  299. UINT64 Get_ProviderOperation_Commit () { return m_ProviderOperation_Commit ; }
  300. UINT64 Get_ProviderOperation_QueryState () { return m_ProviderOperation_QueryState ; }
  301. UINT64 Get_ProviderOperation_QueryInstances () { return m_ProviderOperation_QueryInstances ; }
  302. UINT64 Get_ProviderOperation_CreateRefresher () { return m_ProviderOperation_CreateRefresher ; }
  303. UINT64 Get_ProviderOperation_CreateRefreshableObject () { return m_ProviderOperation_CreateRefreshableObject ; }
  304. UINT64 Get_ProviderOperation_StopRefreshing () { return m_ProviderOperation_StopRefreshing ; }
  305. UINT64 Get_ProviderOperation_CreateRefreshableEnum () { return m_ProviderOperation_CreateRefreshableEnum ; }
  306. UINT64 Get_ProviderOperation_GetObjects () { return m_ProviderOperation_GetObjects ; }
  307. UINT64 Get_ProviderOperation_GetProperty () { return m_ProviderOperation_GetProperty ; }
  308. UINT64 Get_ProviderOperation_PutProperty () { return m_ProviderOperation_PutProperty ; }
  309. UINT64 Get_ProviderOperation_ProvideEvents () { return m_ProviderOperation_ProvideEvents ; }
  310. UINT64 Get_ProviderOperation_NewQuery () { return m_ProviderOperation_NewQuery ; }
  311. UINT64 Get_ProviderOperation_CancelQuery () { return m_ProviderOperation_CancelQuery ; }
  312. UINT64 Get_ProviderOperation_AccessCheck () { return m_ProviderOperation_AccessCheck ; }
  313. UINT64 Get_ProviderOperation_SetRegistrationObject () { return m_ProviderOperation_SetRegistrationObject ; }
  314. UINT64 Get_ProviderOperation_FindConsumer () { return m_ProviderOperation_FindConsumer ; }
  315. UINT64 Get_ProviderOperation_ValidateSubscription () { return m_ProviderOperation_ValidateSubscription ; }
  316. private:
  317. HRESULT SetStatus (
  318. LPWSTR a_Operation ,
  319. LPWSTR a_Parameters ,
  320. LPWSTR a_Description ,
  321. HRESULT a_Result ,
  322. IWbemObjectSink *a_Sink
  323. ) ;
  324. HRESULT Begin_IWbemServices (
  325. BOOL &a_Impersonating ,
  326. IUnknown *&a_OldContext ,
  327. IServerSecurity *&a_OldSecurity ,
  328. BOOL &a_IsProxy ,
  329. IWbemServices *&a_Interface ,
  330. BOOL &a_Revert ,
  331. IUnknown *&a_Proxy
  332. ) ;
  333. HRESULT End_IWbemServices (
  334. BOOL a_Impersonating ,
  335. IUnknown *a_OldContext ,
  336. IServerSecurity *a_OldSecurity ,
  337. BOOL a_IsProxy ,
  338. IWbemServices *a_Interface ,
  339. BOOL a_Revert ,
  340. IUnknown *a_Proxy
  341. ) ;
  342. HRESULT AdjustGetContext (
  343. IWbemContext *a_Context
  344. ) ;
  345. HRESULT Helper_GetObjectAsync (
  346. BOOL a_IsProxy ,
  347. const BSTR a_ObjectPath ,
  348. long a_Flags ,
  349. IWbemContext *a_Context ,
  350. IWbemObjectSink *a_Sink ,
  351. IWbemServices *a_Service
  352. ) ;
  353. HRESULT Helper_PutClassAsync (
  354. BOOL a_IsProxy ,
  355. IWbemClassObject *a_Object ,
  356. long a_Flags ,
  357. IWbemContext FAR *a_Context ,
  358. IWbemObjectSink *a_Sink ,
  359. IWbemServices *a_Service
  360. ) ;
  361. HRESULT Helper_DeleteClassAsync (
  362. BOOL a_IsProxy ,
  363. const BSTR a_Class ,
  364. long a_Flags ,
  365. IWbemContext FAR *a_Context ,
  366. IWbemObjectSink *a_Sink ,
  367. IWbemServices *a_Service
  368. ) ;
  369. HRESULT Helper_CreateClassEnumAsync (
  370. BOOL a_IsProxy ,
  371. const BSTR a_SuperClass ,
  372. long a_Flags ,
  373. IWbemContext FAR *a_Context ,
  374. IWbemObjectSink *a_Sink ,
  375. IWbemServices *a_Service
  376. ) ;
  377. HRESULT Helper_PutInstanceAsync (
  378. BOOL a_IsProxy ,
  379. IWbemClassObject *a_Instance ,
  380. long a_Flags ,
  381. IWbemContext FAR *a_Context ,
  382. IWbemObjectSink *a_Sink ,
  383. IWbemServices *a_Service
  384. ) ;
  385. HRESULT Helper_DeleteInstanceAsync (
  386. BOOL a_IsProxy ,
  387. const BSTR a_ObjectPath ,
  388. long a_Flags ,
  389. IWbemContext FAR *a_Context ,
  390. IWbemObjectSink *a_Sink ,
  391. IWbemServices *a_Service
  392. ) ;
  393. HRESULT Helper_CreateInstanceEnumAsync (
  394. BOOL a_IsProxy ,
  395. const BSTR a_Class ,
  396. long a_Flags ,
  397. IWbemContext *a_Context ,
  398. IWbemObjectSink *a_Sink ,
  399. IWbemServices *a_Service
  400. ) ;
  401. HRESULT Helper_ExecQueryAsync (
  402. BOOL a_IsProxy ,
  403. const BSTR a_QueryLanguage ,
  404. const BSTR a_Query,
  405. long a_Flags ,
  406. IWbemContext FAR *a_Context ,
  407. IWbemObjectSink *a_Sink ,
  408. IWbemServices *a_Service
  409. ) ;
  410. HRESULT Helper_ExecMethodAsync (
  411. BOOL a_IsProxy ,
  412. const BSTR a_ObjectPath ,
  413. const BSTR a_MethodName ,
  414. long a_Flags ,
  415. IWbemContext *a_Context ,
  416. IWbemClassObject *a_InParams ,
  417. IWbemObjectSink *a_Sink ,
  418. IWbemServices *a_Service
  419. ) ;
  420. public:
  421. CInterceptor_DecoupledClient (
  422. WmiAllocator &a_Allocator ,
  423. IUnknown *a_ServerSideUnknown ,
  424. IWbemServices *a_CoreStub ,
  425. CServerObject_ProviderRegistrationV1 &a_Registration
  426. ) ;
  427. ~CInterceptor_DecoupledClient () ;
  428. HRESULT ProviderInitialize () ;
  429. public:
  430. //Non-delegating object IUnknown
  431. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  432. STDMETHODIMP_( ULONG ) AddRef () ;
  433. STDMETHODIMP_( ULONG ) Release () ;
  434. /* IWbemServices methods */
  435. HRESULT STDMETHODCALLTYPE OpenNamespace (
  436. const BSTR a_Namespace ,
  437. long a_Flags ,
  438. IWbemContext *a_Context ,
  439. IWbemServices **a_Service ,
  440. IWbemCallResult **a_CallResult
  441. ) ;
  442. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  443. IWbemObjectSink *a_Sink
  444. ) ;
  445. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  446. long a_Flags ,
  447. IWbemObjectSink **a_Sink
  448. ) ;
  449. HRESULT STDMETHODCALLTYPE GetObject (
  450. const BSTR a_ObjectPath ,
  451. long a_Flags ,
  452. IWbemContext *a_Context ,
  453. IWbemClassObject **ppObject ,
  454. IWbemCallResult **a_CallResult
  455. ) ;
  456. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  457. const BSTR a_ObjectPath ,
  458. long a_Flags ,
  459. IWbemContext *a_Context ,
  460. IWbemObjectSink *a_Sink
  461. ) ;
  462. HRESULT STDMETHODCALLTYPE PutClass (
  463. IWbemClassObject *a_Object ,
  464. long a_Flags ,
  465. IWbemContext *a_Context ,
  466. IWbemCallResult **a_CallResult
  467. ) ;
  468. HRESULT STDMETHODCALLTYPE PutClassAsync (
  469. IWbemClassObject *a_Object ,
  470. long a_Flags ,
  471. IWbemContext *a_Context ,
  472. IWbemObjectSink *a_Sink
  473. ) ;
  474. HRESULT STDMETHODCALLTYPE DeleteClass (
  475. const BSTR a_Class ,
  476. long a_Flags ,
  477. IWbemContext *a_Context ,
  478. IWbemCallResult **a_CallResult
  479. ) ;
  480. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  481. const BSTR a_Class ,
  482. long a_Flags ,
  483. IWbemContext *a_Context ,
  484. IWbemObjectSink *a_Sink
  485. ) ;
  486. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  487. const BSTR a_Superclass ,
  488. long a_Flags ,
  489. IWbemContext *a_Context ,
  490. IEnumWbemClassObject **a_Enum
  491. ) ;
  492. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  493. const BSTR a_Superclass ,
  494. long a_Flags ,
  495. IWbemContext *a_Context ,
  496. IWbemObjectSink *a_Sink
  497. ) ;
  498. HRESULT STDMETHODCALLTYPE PutInstance (
  499. IWbemClassObject *a_Instance ,
  500. long a_Flags ,
  501. IWbemContext *a_Context ,
  502. IWbemCallResult **a_CallResult
  503. ) ;
  504. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  505. IWbemClassObject *a_Instance ,
  506. long a_Flags ,
  507. IWbemContext *a_Context ,
  508. IWbemObjectSink *a_Sink
  509. ) ;
  510. HRESULT STDMETHODCALLTYPE DeleteInstance (
  511. const BSTR a_ObjectPath ,
  512. long a_Flags ,
  513. IWbemContext *a_Context ,
  514. IWbemCallResult **a_CallResult
  515. ) ;
  516. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  517. const BSTR a_ObjectPath,
  518. long a_Flags,
  519. IWbemContext *a_Context ,
  520. IWbemObjectSink *a_Sink
  521. ) ;
  522. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  523. const BSTR a_Class ,
  524. long a_Flags ,
  525. IWbemContext *a_Context ,
  526. IEnumWbemClassObject **a_Enum
  527. ) ;
  528. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  529. const BSTR a_Class ,
  530. long a_Flags ,
  531. IWbemContext *a_Context ,
  532. IWbemObjectSink *a_Sink
  533. ) ;
  534. HRESULT STDMETHODCALLTYPE ExecQuery (
  535. const BSTR a_QueryLanguage,
  536. const BSTR a_Query,
  537. long a_Flags ,
  538. IWbemContext *a_Context ,
  539. IEnumWbemClassObject **a_Enum
  540. ) ;
  541. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  542. const BSTR a_QueryLanguage ,
  543. const BSTR a_Query ,
  544. long a_Flags ,
  545. IWbemContext *a_Context ,
  546. IWbemObjectSink *a_Sink
  547. ) ;
  548. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  549. const BSTR a_QueryLanguage ,
  550. const BSTR a_Query ,
  551. long a_Flags ,
  552. IWbemContext *a_Context ,
  553. IEnumWbemClassObject **a_Enum
  554. ) ;
  555. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  556. const BSTR a_QueryLanguage ,
  557. const BSTR a_Query ,
  558. long a_Flags ,
  559. IWbemContext *a_Context ,
  560. IWbemObjectSink *a_Sink
  561. ) ;
  562. HRESULT STDMETHODCALLTYPE ExecMethod (
  563. const BSTR a_ObjectPath ,
  564. const BSTR a_MethodName ,
  565. long a_Flags ,
  566. IWbemContext *a_Context ,
  567. IWbemClassObject *a_InParams ,
  568. IWbemClassObject **a_OutParams ,
  569. IWbemCallResult **a_CallResult
  570. ) ;
  571. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  572. const BSTR a_ObjectPath ,
  573. const BSTR a_MethodName ,
  574. long a_Flags ,
  575. IWbemContext *a_Context ,
  576. IWbemClassObject *a_InParams ,
  577. IWbemObjectSink *a_Sink
  578. ) ;
  579. /* IWbemPropertyProvider */
  580. HRESULT STDMETHODCALLTYPE GetProperty (
  581. long a_Flags ,
  582. const BSTR a_Locale ,
  583. const BSTR a_ClassMapping ,
  584. const BSTR a_InstanceMapping ,
  585. const BSTR a_PropertyMapping ,
  586. VARIANT *a_Value
  587. ) ;
  588. HRESULT STDMETHODCALLTYPE PutProperty (
  589. long a_Flags ,
  590. const BSTR a_Locale ,
  591. const BSTR a_ClassMapping ,
  592. const BSTR a_InstanceMapping ,
  593. const BSTR a_PropertyMapping ,
  594. const VARIANT *a_Value
  595. ) ;
  596. /* IWbemEventProvider */
  597. HRESULT STDMETHODCALLTYPE ProvideEvents (
  598. IWbemObjectSink *a_Sink ,
  599. long a_Flags
  600. ) ;
  601. /* IWbemEventProviderQuerySink */
  602. HRESULT STDMETHODCALLTYPE NewQuery (
  603. unsigned long a_Id ,
  604. WBEM_WSTR a_QueryLanguage ,
  605. WBEM_WSTR a_Query
  606. );
  607. HRESULT STDMETHODCALLTYPE CancelQuery (
  608. unsigned long a_Id
  609. ) ;
  610. /* IWbemEventProviderSecurity */
  611. HRESULT STDMETHODCALLTYPE AccessCheck (
  612. WBEM_CWSTR a_QueryLanguage ,
  613. WBEM_CWSTR a_Query ,
  614. long a_SidLength ,
  615. const BYTE *a_Sid
  616. ) ;
  617. /* IWbemProviderIdentity */
  618. HRESULT STDMETHODCALLTYPE SetRegistrationObject (
  619. long a_Flags ,
  620. IWbemClassObject *a_ProviderRegistration
  621. ) ;
  622. /* IWbemEventConsumerProvider */
  623. HRESULT STDMETHODCALLTYPE FindConsumer (
  624. IWbemClassObject *a_LogicalConsumer ,
  625. IWbemUnboundObjectSink **a_Consumer
  626. );
  627. /* IWbemEventConsumerProviderEx */
  628. HRESULT STDMETHODCALLTYPE ValidateSubscription (
  629. IWbemClassObject *a_LogicalConsumer
  630. ) ;
  631. /* IWbemUnboundObjectSink */
  632. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  633. IWbemClassObject *a_LogicalConsumer ,
  634. long a_ObjectCount ,
  635. IWbemClassObject **a_Objects
  636. ) ;
  637. /* Internal_IWbemServices */
  638. HRESULT STDMETHODCALLTYPE Internal_OpenNamespace (
  639. WmiInternalContext a_InternalContext ,
  640. const BSTR a_Namespace ,
  641. long a_Flags ,
  642. IWbemContext *a_Context ,
  643. IWbemServices **a_Service ,
  644. IWbemCallResult **a_CallResult
  645. ) ;
  646. HRESULT STDMETHODCALLTYPE Internal_CancelAsyncCall (
  647. WmiInternalContext a_InternalContext ,
  648. IWbemObjectSink *a_Sink
  649. ) ;
  650. HRESULT STDMETHODCALLTYPE Internal_QueryObjectSink (
  651. WmiInternalContext a_InternalContext ,
  652. long a_Flags ,
  653. IWbemObjectSink **a_Sink
  654. ) ;
  655. HRESULT STDMETHODCALLTYPE Internal_GetObject (
  656. WmiInternalContext a_InternalContext ,
  657. const BSTR a_ObjectPath ,
  658. long a_Flags ,
  659. IWbemContext *a_Context ,
  660. IWbemClassObject **ppObject ,
  661. IWbemCallResult **a_CallResult
  662. ) ;
  663. HRESULT STDMETHODCALLTYPE Internal_GetObjectAsync (
  664. WmiInternalContext a_InternalContext ,
  665. const BSTR a_ObjectPath ,
  666. long a_Flags ,
  667. IWbemContext *a_Context ,
  668. IWbemObjectSink *a_Sink
  669. ) ;
  670. HRESULT STDMETHODCALLTYPE Internal_PutClass (
  671. WmiInternalContext a_InternalContext ,
  672. IWbemClassObject *a_Object ,
  673. long a_Flags ,
  674. IWbemContext *a_Context ,
  675. IWbemCallResult **a_CallResult
  676. ) ;
  677. HRESULT STDMETHODCALLTYPE Internal_PutClassAsync (
  678. WmiInternalContext a_InternalContext ,
  679. IWbemClassObject *a_Object ,
  680. long a_Flags ,
  681. IWbemContext *a_Context ,
  682. IWbemObjectSink *a_Sink
  683. ) ;
  684. HRESULT STDMETHODCALLTYPE Internal_DeleteClass (
  685. WmiInternalContext a_InternalContext ,
  686. const BSTR a_Class ,
  687. long a_Flags ,
  688. IWbemContext *a_Context ,
  689. IWbemCallResult **a_CallResult
  690. ) ;
  691. HRESULT STDMETHODCALLTYPE Internal_DeleteClassAsync (
  692. WmiInternalContext a_InternalContext ,
  693. const BSTR a_Class ,
  694. long a_Flags ,
  695. IWbemContext *a_Context ,
  696. IWbemObjectSink *a_Sink
  697. ) ;
  698. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnum (
  699. WmiInternalContext a_InternalContext ,
  700. const BSTR a_Superclass ,
  701. long a_Flags ,
  702. IWbemContext *a_Context ,
  703. IEnumWbemClassObject **a_Enum
  704. ) ;
  705. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnumAsync (
  706. WmiInternalContext a_InternalContext ,
  707. const BSTR a_Superclass ,
  708. long a_Flags ,
  709. IWbemContext *a_Context ,
  710. IWbemObjectSink *a_Sink
  711. ) ;
  712. HRESULT STDMETHODCALLTYPE Internal_PutInstance (
  713. WmiInternalContext a_InternalContext ,
  714. IWbemClassObject *a_Instance ,
  715. long a_Flags ,
  716. IWbemContext *a_Context ,
  717. IWbemCallResult **a_CallResult
  718. ) ;
  719. HRESULT STDMETHODCALLTYPE Internal_PutInstanceAsync (
  720. WmiInternalContext a_InternalContext ,
  721. IWbemClassObject *a_Instance ,
  722. long a_Flags ,
  723. IWbemContext *a_Context ,
  724. IWbemObjectSink *a_Sink
  725. ) ;
  726. HRESULT STDMETHODCALLTYPE Internal_DeleteInstance (
  727. WmiInternalContext a_InternalContext ,
  728. const BSTR a_ObjectPath ,
  729. long a_Flags ,
  730. IWbemContext *a_Context ,
  731. IWbemCallResult **a_CallResult
  732. ) ;
  733. HRESULT STDMETHODCALLTYPE Internal_DeleteInstanceAsync (
  734. WmiInternalContext a_InternalContext ,
  735. const BSTR a_ObjectPath,
  736. long a_Flags,
  737. IWbemContext *a_Context ,
  738. IWbemObjectSink *a_Sink
  739. ) ;
  740. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnum (
  741. WmiInternalContext a_InternalContext ,
  742. const BSTR a_Class ,
  743. long a_Flags ,
  744. IWbemContext *a_Context ,
  745. IEnumWbemClassObject **a_Enum
  746. ) ;
  747. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnumAsync (
  748. WmiInternalContext a_InternalContext ,
  749. const BSTR a_Class ,
  750. long a_Flags ,
  751. IWbemContext *a_Context ,
  752. IWbemObjectSink *a_Sink
  753. ) ;
  754. HRESULT STDMETHODCALLTYPE Internal_ExecQuery (
  755. WmiInternalContext a_InternalContext ,
  756. const BSTR a_QueryLanguage,
  757. const BSTR a_Query,
  758. long a_Flags ,
  759. IWbemContext *a_Context ,
  760. IEnumWbemClassObject **a_Enum
  761. ) ;
  762. HRESULT STDMETHODCALLTYPE Internal_ExecQueryAsync (
  763. WmiInternalContext a_InternalContext ,
  764. const BSTR a_QueryLanguage ,
  765. const BSTR a_Query ,
  766. long a_Flags ,
  767. IWbemContext *a_Context ,
  768. IWbemObjectSink *a_Sink
  769. ) ;
  770. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQuery (
  771. WmiInternalContext a_InternalContext ,
  772. const BSTR a_QueryLanguage ,
  773. const BSTR a_Query ,
  774. long a_Flags ,
  775. IWbemContext *a_Context ,
  776. IEnumWbemClassObject **a_Enum
  777. ) ;
  778. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQueryAsync (
  779. WmiInternalContext a_InternalContext ,
  780. const BSTR a_QueryLanguage ,
  781. const BSTR a_Query ,
  782. long a_Flags ,
  783. IWbemContext *a_Context ,
  784. IWbemObjectSink *a_Sink
  785. ) ;
  786. HRESULT STDMETHODCALLTYPE Internal_ExecMethod (
  787. WmiInternalContext a_InternalContext ,
  788. const BSTR a_ObjectPath ,
  789. const BSTR a_MethodName ,
  790. long a_Flags ,
  791. IWbemContext *a_Context ,
  792. IWbemClassObject *a_InParams ,
  793. IWbemClassObject **a_OutParams ,
  794. IWbemCallResult **a_CallResult
  795. ) ;
  796. HRESULT STDMETHODCALLTYPE Internal_ExecMethodAsync (
  797. WmiInternalContext a_InternalContext ,
  798. const BSTR a_ObjectPath ,
  799. const BSTR a_MethodName ,
  800. long a_Flags ,
  801. IWbemContext *a_Context ,
  802. IWbemClassObject *a_InParams ,
  803. IWbemObjectSink *a_Sink
  804. ) ;
  805. /* Internal_IWbemPropertyProvider */
  806. HRESULT STDMETHODCALLTYPE Internal_GetProperty (
  807. WmiInternalContext a_InternalContext ,
  808. long a_Flags ,
  809. const BSTR a_Locale ,
  810. const BSTR a_ClassMapping ,
  811. const BSTR a_InstanceMapping ,
  812. const BSTR a_PropertyMapping ,
  813. VARIANT *a_Value
  814. ) ;
  815. HRESULT STDMETHODCALLTYPE Internal_PutProperty (
  816. WmiInternalContext a_InternalContext ,
  817. long a_Flags ,
  818. const BSTR a_Locale ,
  819. const BSTR a_ClassMapping ,
  820. const BSTR a_InstanceMapping ,
  821. const BSTR a_PropertyMapping ,
  822. const VARIANT *a_Value
  823. ) ;
  824. /* Internal_IWbemEventProvider */
  825. HRESULT STDMETHODCALLTYPE Internal_ProvideEvents (
  826. WmiInternalContext a_InternalContext ,
  827. IWbemObjectSink *a_Sink ,
  828. long a_Flags
  829. ) ;
  830. /* Internal_IWbemEventProviderQuerySink */
  831. HRESULT STDMETHODCALLTYPE Internal_NewQuery (
  832. WmiInternalContext a_InternalContext ,
  833. unsigned long a_Id ,
  834. WBEM_WSTR a_QueryLanguage ,
  835. WBEM_WSTR a_Query
  836. );
  837. HRESULT STDMETHODCALLTYPE Internal_CancelQuery (
  838. WmiInternalContext a_InternalContext ,
  839. unsigned long a_Id
  840. ) ;
  841. /* Internal_IWbemEventProviderSecurity */
  842. HRESULT STDMETHODCALLTYPE Internal_AccessCheck (
  843. WmiInternalContext a_InternalContext ,
  844. WBEM_CWSTR a_QueryLanguage ,
  845. WBEM_CWSTR a_Query ,
  846. long a_SidLength ,
  847. const BYTE *a_Sid
  848. ) ;
  849. /* Internal_IWbemEventConsumerProvider */
  850. HRESULT STDMETHODCALLTYPE Internal_FindConsumer (
  851. WmiInternalContext a_InternalContext ,
  852. IWbemClassObject *a_LogicalConsumer ,
  853. IWbemUnboundObjectSink **a_Consumer
  854. );
  855. /* Internal_IWbemEventConsumerProviderEx */
  856. HRESULT STDMETHODCALLTYPE Internal_ValidateSubscription (
  857. WmiInternalContext a_InternalContext ,
  858. IWbemClassObject *a_LogicalConsumer
  859. ) ;
  860. /* Internal_IWbemUnboundObjectSink */
  861. HRESULT STDMETHODCALLTYPE Internal_IndicateToConsumer (
  862. WmiInternalContext a_InternalContext ,
  863. IWbemClassObject *a_LogicalConsumer ,
  864. long a_ObjectCount ,
  865. IWbemClassObject **a_Objects
  866. ) ;
  867. /* IWbemProviderInit methods */
  868. HRESULT STDMETHODCALLTYPE Initialize (
  869. LPWSTR a_User ,
  870. LONG a_Flags ,
  871. LPWSTR a_Namespace ,
  872. LPWSTR a_Locale ,
  873. IWbemServices *a_CoreService ,
  874. IWbemContext *a_Context ,
  875. IWbemProviderInitSink *a_Sink
  876. ) ;
  877. HRESULT STDMETHODCALLTYPE Internal_Initialize (
  878. WmiInternalContext a_InternalContext ,
  879. LPWSTR a_User ,
  880. LONG a_Flags ,
  881. LPWSTR a_Namespace ,
  882. LPWSTR a_Locale ,
  883. IWbemServices *a_CoreService ,
  884. IWbemContext *a_Context ,
  885. IWbemProviderInitSink *a_Sink
  886. ) ;
  887. /* _IWmiProviderSite */
  888. HRESULT STDMETHODCALLTYPE GetSite ( DWORD *a_ProcessIdentifier ) ;
  889. HRESULT STDMETHODCALLTYPE SetContainer ( IUnknown *a_Container ) ;
  890. // IWmi_UnInitialize members
  891. HRESULT STDMETHODCALLTYPE Shutdown (
  892. LONG a_Flags ,
  893. ULONG a_MaxMilliSeconds ,
  894. IWbemContext *a_Context
  895. ) ;
  896. } ;
  897. #endif // _Decopled_Interceptor_IWbemServices_H