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.

3207 lines
83 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvWsv.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_Interceptor_IWbemServices_H
  9. #define _Server_Interceptor_IWbemServices_H
  10. #include <CGlobals.h>
  11. #include "ProvCache.h"
  12. #include "ProvRegInfo.h"
  13. #define ProxyIndex_IWbemServices 0
  14. #define ProxyIndex_IWbemPropertyProvider 1
  15. #define ProxyIndex_IWbemHiPerfProvider 2
  16. #define ProxyIndex_IWbemEventProvider 3
  17. #define ProxyIndex_IWbemEventProviderQuerySink 4
  18. #define ProxyIndex_IWbemEventProviderSecurity 5
  19. #define ProxyIndex_IWbemProviderIdentity 6
  20. #define ProxyIndex_IWbemEventConsumerProvider 7
  21. #define ProxyIndex_IWbemEventConsumerProviderEx 8
  22. #define ProxyIndex_IWbemUnboundObjectSink 9
  23. #define ProxyIndex_IWbemProviderInit 10
  24. #define ProxyIndex_Internal_IWbemServices 11
  25. #define ProxyIndex_Internal_IWbemPropertyProvider 12
  26. #define ProxyIndex_Internal_IWbemEventProvider 13
  27. #define ProxyIndex_Internal_IWbemEventProviderQuerySink 14
  28. #define ProxyIndex_Internal_IWbemEventProviderSecurity 15
  29. #define ProxyIndex_Internal_IWbemEventConsumerProvider 16
  30. #define ProxyIndex_Internal_IWbemEventConsumerProviderEx 17
  31. #define ProxyIndex_Internal_IWbemUnboundObjectSink 18
  32. #define ProxyIndex_Internal_IWbemProviderIdentity 19
  33. #define ProxyIndex_Internal_IWbemProviderInit 20
  34. #define ProxyIndex_IWbemShutdown 21
  35. #define ProxyIndex__IWmiProviderConfiguration 22
  36. #define ProxyIndex_Internal_IWmiProviderConfiguration 23
  37. #define ProxyIndex_Provider_Size 23
  38. #define ProxyIndex_UnBound_IWbemUnboundObjectSink 0
  39. #define ProxyIndex_UnBound_Internal_IWbemUnboundObjectSink 1
  40. #define ProxyIndex_UnBound_Size 2
  41. #define ProxyIndex_UnBoundSync_IWbemUnboundObjectSink 0
  42. #define ProxyIndex_UnBoundSync_Size 1
  43. /******************************************************************************
  44. *
  45. * Name:
  46. *
  47. *
  48. * Description:
  49. *
  50. *
  51. *****************************************************************************/
  52. class CInterceptor_IWbemUnboundObjectSink : public IWbemUnboundObjectSink ,
  53. public IWbemShutdown ,
  54. public VoidPointerContainerElement
  55. {
  56. private:
  57. WmiAllocator &m_Allocator ;
  58. CServerObject_ProviderRegistrationV1 *m_Registration ;
  59. _IWmiProviderAbnormalShutdown *m_Controller ;
  60. IUnknown *m_Unknown ;
  61. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  62. Internal_IWbemUnboundObjectSink *m_Provider_Internal_IWbemUnboundObjectSink ;
  63. ProxyContainer m_ProxyContainer ;
  64. DWORD m_ProcessIdentifier ;
  65. HRESULT m_InitializeResult ;
  66. protected:
  67. HRESULT Begin_Interface (
  68. IUnknown *a_ServerInterface ,
  69. REFIID a_InterfaceIdentifier ,
  70. DWORD a_ProxyIndex ,
  71. IUnknown *a_InternalServerInterface ,
  72. REFIID a_InternalInterfaceIdentifier ,
  73. DWORD a_InternalProxyIndex ,
  74. DWORD a_ProcessIdentifier ,
  75. HANDLE &a_IdentifyToken ,
  76. BOOL &a_Impersonating ,
  77. IUnknown *&a_OldContext ,
  78. IServerSecurity *&a_OldSecurity ,
  79. BOOL &a_IsProxy ,
  80. IUnknown *&a_Interface ,
  81. BOOL &a_Revert ,
  82. IUnknown *&a_Proxy ,
  83. IWbemContext *a_Context = NULL
  84. ) ;
  85. HRESULT End_Interface (
  86. IUnknown *a_ServerInterface ,
  87. REFIID a_InterfaceIdentifier ,
  88. DWORD a_ProxyIndex ,
  89. IUnknown *a_InternalServerInterface ,
  90. REFIID a_InternalInterfaceIdentifier ,
  91. DWORD a_InternalProxyIndex ,
  92. DWORD a_ProcessIdentifier ,
  93. HANDLE a_IdentifyToken ,
  94. BOOL a_Impersonating ,
  95. IUnknown *a_OldContext ,
  96. IServerSecurity *a_OldSecurity ,
  97. BOOL a_IsProxy ,
  98. IUnknown *a_Interface ,
  99. BOOL a_Revert ,
  100. IUnknown *a_Proxy
  101. ) ;
  102. public:
  103. CInterceptor_IWbemUnboundObjectSink (
  104. WmiAllocator &a_Allocator ,
  105. IUnknown *a_ServerSideProvider ,
  106. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  107. CServerObject_ProviderRegistrationV1 &a_Registration
  108. ) ;
  109. ~CInterceptor_IWbemUnboundObjectSink () ;
  110. HRESULT Initialize () ;
  111. public:
  112. STDMETHODIMP QueryInterface (
  113. REFIID iid ,
  114. LPVOID FAR *iplpv
  115. ) ;
  116. STDMETHODIMP_( ULONG ) AddRef () ;
  117. STDMETHODIMP_( ULONG ) Release () ;
  118. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  119. IWbemClassObject *a_LogicalConsumer ,
  120. long a_ObjectCount ,
  121. IWbemClassObject **a_Objects
  122. ) ;
  123. HRESULT STDMETHODCALLTYPE Shutdown (
  124. LONG a_Flags ,
  125. ULONG a_MaxMilliSeconds ,
  126. IWbemContext *a_Context
  127. ) ;
  128. } ;
  129. /******************************************************************************
  130. *
  131. * Name:
  132. *
  133. *
  134. * Description:
  135. *
  136. *
  137. *****************************************************************************/
  138. class CDecoupled_IWbemUnboundObjectSink : public IWbemUnboundObjectSink ,
  139. public IWbemShutdown ,
  140. public VoidPointerContainerElement
  141. {
  142. private:
  143. WmiAllocator &m_Allocator ;
  144. CServerObject_ProviderRegistrationV1 *m_Registration ;
  145. _IWmiProviderAbnormalShutdown *m_Controller ;
  146. IUnknown *m_Unknown ;
  147. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  148. Internal_IWbemUnboundObjectSink *m_Provider_Internal_IWbemUnboundObjectSink ;
  149. ProxyContainer m_ProxyContainer ;
  150. DWORD m_ProcessIdentifier ;
  151. HRESULT m_InitializeResult ;
  152. protected:
  153. HRESULT Begin_Interface (
  154. IUnknown *a_ServerInterface ,
  155. REFIID a_InterfaceIdentifier ,
  156. DWORD a_ProxyIndex ,
  157. IUnknown *a_InternalServerInterface ,
  158. REFIID a_InternalInterfaceIdentifier ,
  159. DWORD a_InternalProxyIndex ,
  160. DWORD a_ProcessIdentifier ,
  161. HANDLE &a_IdentifyToken ,
  162. BOOL &a_Impersonating ,
  163. IUnknown *&a_OldContext ,
  164. IServerSecurity *&a_OldSecurity ,
  165. BOOL &a_IsProxy ,
  166. IUnknown *&a_Interface ,
  167. BOOL &a_Revert ,
  168. IUnknown *&a_Proxy ,
  169. IWbemContext *a_Context = NULL
  170. ) ;
  171. HRESULT End_Interface (
  172. IUnknown *a_ServerInterface ,
  173. REFIID a_InterfaceIdentifier ,
  174. DWORD a_ProxyIndex ,
  175. IUnknown *a_InternalServerInterface ,
  176. REFIID a_InternalInterfaceIdentifier ,
  177. DWORD a_InternalProxyIndex ,
  178. DWORD a_ProcessIdentifier ,
  179. HANDLE a_IdentifyToken ,
  180. BOOL a_Impersonating ,
  181. IUnknown *a_OldContext ,
  182. IServerSecurity *a_OldSecurity ,
  183. BOOL a_IsProxy ,
  184. IUnknown *a_Interface ,
  185. BOOL a_Revert ,
  186. IUnknown *a_Proxy
  187. ) ;
  188. public:
  189. CDecoupled_IWbemUnboundObjectSink (
  190. WmiAllocator &a_Allocator ,
  191. IUnknown *a_ServerSideProvider ,
  192. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  193. CServerObject_ProviderRegistrationV1 &a_Registration
  194. ) ;
  195. ~CDecoupled_IWbemUnboundObjectSink () ;
  196. HRESULT Initialize () ;
  197. public:
  198. STDMETHODIMP QueryInterface (
  199. REFIID iid ,
  200. LPVOID FAR *iplpv
  201. ) ;
  202. STDMETHODIMP_( ULONG ) AddRef () ;
  203. STDMETHODIMP_( ULONG ) Release () ;
  204. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  205. IWbemClassObject *a_LogicalConsumer ,
  206. long a_ObjectCount ,
  207. IWbemClassObject **a_Objects
  208. ) ;
  209. HRESULT STDMETHODCALLTYPE Shutdown (
  210. LONG a_Flags ,
  211. ULONG a_MaxMilliSeconds ,
  212. IWbemContext *a_Context
  213. ) ;
  214. } ;
  215. /******************************************************************************
  216. *
  217. * Name:
  218. *
  219. *
  220. * Description:
  221. *
  222. *
  223. *****************************************************************************/
  224. class CInterceptor_IWbemProvider ;
  225. class InternalQuotaInterface : public _IWmiProviderQuota
  226. {
  227. private:
  228. LONG m_ReferenceCount ;
  229. _IWmiProviderQuota *m_Owner ;
  230. public:
  231. InternalQuotaInterface ( CInterceptor_IWbemProvider *a_Owner ) ;
  232. ~InternalQuotaInterface () ;
  233. HRESULT Initialize () ;
  234. STDMETHODIMP QueryInterface (
  235. REFIID iid ,
  236. LPVOID FAR *iplpv
  237. ) ;
  238. STDMETHODIMP_( ULONG ) AddRef () ;
  239. STDMETHODIMP_( ULONG ) Release () ;
  240. HRESULT STDMETHODCALLTYPE Violation (
  241. long a_Flags ,
  242. IWbemContext *a_Context ,
  243. IWbemClassObject *a_Object
  244. ) ;
  245. } ;
  246. /******************************************************************************
  247. *
  248. * Name:
  249. *
  250. *
  251. * Description:
  252. *
  253. *
  254. *****************************************************************************/
  255. class CInterceptor_IWbemProvider : public IWbemServices ,
  256. public IWbemPropertyProvider ,
  257. public IWbemEventProvider ,
  258. public IWbemEventProviderQuerySink ,
  259. public IWbemEventProviderSecurity ,
  260. public IWbemEventConsumerProviderEx ,
  261. public IWbemUnboundObjectSink ,
  262. public IWbemHiPerfProvider ,
  263. public IWbemProviderInit ,
  264. public _IWmiProviderInitialize ,
  265. public _IWmiProviderLoad ,
  266. public IWbemShutdown ,
  267. public _IWmiProviderQuota ,
  268. public _IWmiProviderConfiguration ,
  269. public _IWmiProviderStack ,
  270. public _IWmiProviderCache ,
  271. public _IWmiProviderAbnormalShutdown ,
  272. public ServiceCacheElement ,
  273. public CWbemGlobal_IWmiObjectSinkController
  274. {
  275. private:
  276. WmiAllocator &m_Allocator ;
  277. CServerObject_ProviderRegistrationV1 *m_Registration ;
  278. _IWmiProviderHost *m_Host ;
  279. InternalQuotaInterface *m_Quota ;
  280. IUnknown *m_Unknown ;
  281. IWbemServices *m_Provider_IWbemServices ;
  282. IWbemPropertyProvider *m_Provider_IWbemPropertyProvider ;
  283. IWbemHiPerfProvider *m_Provider_IWbemHiPerfProvider ;
  284. IWbemEventProvider *m_Provider_IWbemEventProvider ;
  285. IWbemEventProviderQuerySink *m_Provider_IWbemEventProviderQuerySink ;
  286. IWbemEventProviderSecurity *m_Provider_IWbemEventProviderSecurity ;
  287. IWbemEventConsumerProvider *m_Provider_IWbemEventConsumerProvider ;
  288. IWbemEventConsumerProviderEx *m_Provider_IWbemEventConsumerProviderEx ;
  289. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  290. _IWmiProviderConfiguration *m_Provider__IWmiProviderConfiguration ;
  291. Internal_IWbemServices *m_Provider_Internal_IWbemServices ;
  292. Internal_IWbemPropertyProvider *m_Provider_Internal_IWbemPropertyProvider ;
  293. Internal_IWbemEventProvider *m_Provider_Internal_IWbemEventProvider ;
  294. Internal_IWbemEventProviderQuerySink *m_Provider_Internal_IWbemEventProviderQuerySink ;
  295. Internal_IWbemEventProviderSecurity *m_Provider_Internal_IWbemEventProviderSecurity ;
  296. Internal_IWbemEventConsumerProvider *m_Provider_Internal_IWbemEventConsumerProvider ;
  297. Internal_IWbemEventConsumerProviderEx *m_Provider_Internal_IWbemEventConsumerProviderEx ;
  298. Internal_IWbemUnboundObjectSink *m_Provider_Internal_IWbemUnboundObjectSink ;
  299. Internal_IWmiProviderConfiguration *m_Provider_Internal_IWmiProviderConfiguration ;
  300. ProxyContainer m_ProxyContainer ;
  301. DWORD m_ProcessIdentifier ;
  302. BSTR m_Locale ;
  303. BSTR m_User ;
  304. BSTR m_Namespace ;
  305. LONG m_Initialized ;
  306. LONG m_UnInitialized ;
  307. HRESULT m_InitializeResult ;
  308. HANDLE m_InitializedEvent ;
  309. IWbemContext *m_InitializationContext ;
  310. LONG m_Resumed ;
  311. class InternalInterface : public _IWmiProviderQuota
  312. {
  313. private:
  314. CInterceptor_IWbemProvider *m_This ;
  315. public:
  316. InternalInterface ( CInterceptor_IWbemProvider *a_This ) : m_This ( a_This )
  317. {
  318. }
  319. STDMETHODIMP QueryInterface (
  320. REFIID iid ,
  321. LPVOID FAR *iplpv
  322. )
  323. {
  324. return m_This->QueryInterface (
  325. iid ,
  326. iplpv
  327. ) ;
  328. }
  329. STDMETHODIMP_( ULONG ) AddRef ()
  330. {
  331. return m_This->ServiceCacheElement :: NonCyclicAddRef () ;
  332. }
  333. STDMETHODIMP_( ULONG ) Release ()
  334. {
  335. return m_This->ServiceCacheElement :: NonCyclicRelease () ;
  336. }
  337. HRESULT STDMETHODCALLTYPE Violation (
  338. long a_Flags ,
  339. IWbemContext *a_Context ,
  340. IWbemClassObject *a_Object
  341. )
  342. {
  343. return m_This->Violation (
  344. a_Flags ,
  345. a_Context ,
  346. a_Object
  347. ) ;
  348. }
  349. } ;
  350. InternalInterface m_Internal ;
  351. void CallBackInternalRelease () ;
  352. HRESULT Begin_Interface_Context (
  353. IUnknown *a_ServerInterface ,
  354. REFIID a_InterfaceIdentifier ,
  355. DWORD a_ProxyIndex ,
  356. IUnknown *a_InternalServerInterface ,
  357. REFIID a_InternalInterfaceIdentifier ,
  358. DWORD a_InternalProxyIndex ,
  359. DWORD a_ProcessIdentifier ,
  360. HANDLE &a_IdentifyToken ,
  361. BOOL &a_Impersonating ,
  362. IUnknown *&a_OldContext ,
  363. IServerSecurity *&a_OldSecurity ,
  364. BOOL &a_IsProxy ,
  365. IUnknown *&a_Interface ,
  366. BOOL &a_Revert ,
  367. IUnknown *&a_Proxy ,
  368. IWbemContext *a_Context = NULL
  369. ) ;
  370. HRESULT End_Interface_Context (
  371. IUnknown *a_ServerInterface ,
  372. REFIID a_InterfaceIdentifier ,
  373. DWORD a_ProxyIndex ,
  374. IUnknown *a_InternalServerInterface ,
  375. REFIID a_InternalInterfaceIdentifier ,
  376. DWORD a_InternalProxyIndex ,
  377. DWORD a_ProcessIdentifier ,
  378. HANDLE a_IdentifyToken ,
  379. BOOL a_Impersonating ,
  380. IUnknown *a_OldContext ,
  381. IServerSecurity *a_OldSecurity ,
  382. BOOL a_IsProxy ,
  383. IUnknown *a_Interface ,
  384. BOOL a_Revert ,
  385. IUnknown *a_Proxy
  386. ) ;
  387. HRESULT Begin_Interface (
  388. IUnknown *a_ServerInterface ,
  389. REFIID a_InterfaceIdentifier ,
  390. DWORD a_ProxyIndex ,
  391. IUnknown *a_InternalServerInterface ,
  392. REFIID a_InternalInterfaceIdentifier ,
  393. DWORD a_InternalProxyIndex ,
  394. DWORD a_ProcessIdentifier ,
  395. HANDLE &a_IdentifyToken ,
  396. BOOL &a_Impersonating ,
  397. IUnknown *&a_OldContext ,
  398. IServerSecurity *&a_OldSecurity ,
  399. BOOL &a_IsProxy ,
  400. IUnknown *&a_Interface ,
  401. BOOL &a_Revert ,
  402. IUnknown *&a_Proxy ,
  403. IWbemContext *a_Context = NULL
  404. ) ;
  405. HRESULT End_Interface (
  406. IUnknown *a_ServerInterface ,
  407. REFIID a_InterfaceIdentifier ,
  408. DWORD a_ProxyIndex ,
  409. IUnknown *a_InternalServerInterface ,
  410. REFIID a_InternalInterfaceIdentifier ,
  411. DWORD a_InternalProxyIndex ,
  412. DWORD a_ProcessIdentifier ,
  413. HANDLE a_IdentifyToken ,
  414. BOOL a_Impersonating ,
  415. IUnknown *a_OldContext ,
  416. IServerSecurity *a_OldSecurity ,
  417. BOOL a_IsProxy ,
  418. IUnknown *a_Interface ,
  419. BOOL a_Revert ,
  420. IUnknown *a_Proxy
  421. ) ;
  422. public:
  423. CInterceptor_IWbemProvider (
  424. WmiAllocator &a_Allocator ,
  425. CWbemGlobal_IWmiProviderController *a_Controller ,
  426. const ProviderCacheKey &a_Key ,
  427. const ULONG &a_Period ,
  428. IWbemContext *a_InitializationContext ,
  429. CServerObject_ProviderRegistrationV1 &a_Registration
  430. ) ;
  431. ~CInterceptor_IWbemProvider () ;
  432. InternalQuotaInterface *GetQuota ()
  433. {
  434. return m_Quota ;
  435. }
  436. void SetResumed ( LONG a_Resumed )
  437. {
  438. if ( a_Resumed )
  439. {
  440. InterlockedExchange ( & m_Resumed , 1 ) ;
  441. }
  442. else
  443. {
  444. InterlockedExchange ( & m_Resumed , 0 ) ;
  445. }
  446. }
  447. LONG GetResumed ()
  448. {
  449. return m_Resumed ;
  450. }
  451. HRESULT SetProvider ( _IWmiProviderHost *a_Host , IUnknown *a_Unknown ) ;
  452. HRESULT SetInitialized ( HRESULT a_InitializeResult ) ;
  453. HRESULT IsIndependant ( IWbemContext *a_Context ) ;
  454. public:
  455. //Non-delegating object IUnknown
  456. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  457. STDMETHODIMP_( ULONG ) AddRef () ;
  458. STDMETHODIMP_( ULONG ) Release () ;
  459. /* IWbemServices methods */
  460. HRESULT STDMETHODCALLTYPE OpenNamespace (
  461. const BSTR a_Namespace ,
  462. long a_Flags ,
  463. IWbemContext *a_Context ,
  464. IWbemServices **a_Service ,
  465. IWbemCallResult **a_CallResult
  466. ) ;
  467. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  468. IWbemObjectSink *a_Sink
  469. ) ;
  470. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  471. long a_Flags ,
  472. IWbemObjectSink **a_Sink
  473. ) ;
  474. HRESULT STDMETHODCALLTYPE GetObject (
  475. const BSTR a_ObjectPath ,
  476. long a_Flags ,
  477. IWbemContext *a_Context ,
  478. IWbemClassObject **a_Object ,
  479. IWbemCallResult **a_CallResult
  480. ) ;
  481. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  482. const BSTR a_ObjectPath ,
  483. long a_Flags ,
  484. IWbemContext *a_Context ,
  485. IWbemObjectSink *a_Sink
  486. ) ;
  487. HRESULT STDMETHODCALLTYPE PutClass (
  488. IWbemClassObject *a_Object ,
  489. long a_Flags ,
  490. IWbemContext *a_Context ,
  491. IWbemCallResult **a_CallResult
  492. ) ;
  493. HRESULT STDMETHODCALLTYPE PutClassAsync (
  494. IWbemClassObject *a_Object ,
  495. long a_Flags ,
  496. IWbemContext *a_Context ,
  497. IWbemObjectSink *a_Sink
  498. ) ;
  499. HRESULT STDMETHODCALLTYPE DeleteClass (
  500. const BSTR a_Class ,
  501. long a_Flags ,
  502. IWbemContext *a_Context ,
  503. IWbemCallResult **a_CallResult
  504. ) ;
  505. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  506. const BSTR a_Class ,
  507. long a_Flags ,
  508. IWbemContext *a_Context ,
  509. IWbemObjectSink *a_Sink
  510. ) ;
  511. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  512. const BSTR a_Superclass ,
  513. long a_Flags ,
  514. IWbemContext *a_Context ,
  515. IEnumWbemClassObject **a_Enum
  516. ) ;
  517. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  518. const BSTR a_Superclass ,
  519. long a_Flags ,
  520. IWbemContext *a_Context ,
  521. IWbemObjectSink *a_Sink
  522. ) ;
  523. HRESULT STDMETHODCALLTYPE PutInstance (
  524. IWbemClassObject *a_Instance ,
  525. long a_Flags ,
  526. IWbemContext *a_Context ,
  527. IWbemCallResult **a_CallResult
  528. ) ;
  529. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  530. IWbemClassObject *a_Instance ,
  531. long a_Flags ,
  532. IWbemContext *a_Context ,
  533. IWbemObjectSink *a_Sink
  534. ) ;
  535. HRESULT STDMETHODCALLTYPE DeleteInstance (
  536. const BSTR a_ObjectPath ,
  537. long a_Flags ,
  538. IWbemContext *a_Context ,
  539. IWbemCallResult **a_CallResult
  540. ) ;
  541. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  542. const BSTR a_ObjectPath,
  543. long a_Flags,
  544. IWbemContext *a_Context ,
  545. IWbemObjectSink *a_Sink
  546. ) ;
  547. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  548. const BSTR a_Class ,
  549. long a_Flags ,
  550. IWbemContext *a_Context ,
  551. IEnumWbemClassObject **a_Enum
  552. ) ;
  553. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  554. const BSTR a_Class ,
  555. long a_Flags ,
  556. IWbemContext *a_Context ,
  557. IWbemObjectSink *a_Sink
  558. ) ;
  559. HRESULT STDMETHODCALLTYPE ExecQuery (
  560. const BSTR a_QueryLanguage,
  561. const BSTR a_Query,
  562. long a_Flags ,
  563. IWbemContext *a_Context ,
  564. IEnumWbemClassObject **a_Enum
  565. ) ;
  566. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  567. const BSTR a_QueryLanguage ,
  568. const BSTR a_Query ,
  569. long a_Flags ,
  570. IWbemContext *a_Context ,
  571. IWbemObjectSink *a_Sink
  572. ) ;
  573. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  574. const BSTR a_QueryLanguage ,
  575. const BSTR a_Query ,
  576. long a_Flags ,
  577. IWbemContext *a_Context ,
  578. IEnumWbemClassObject **a_Enum
  579. ) ;
  580. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  581. const BSTR a_QueryLanguage ,
  582. const BSTR a_Query ,
  583. long a_Flags ,
  584. IWbemContext *a_Context ,
  585. IWbemObjectSink *a_Sink
  586. ) ;
  587. HRESULT STDMETHODCALLTYPE ExecMethod (
  588. const BSTR a_ObjectPath ,
  589. const BSTR a_MethodName ,
  590. long a_Flags ,
  591. IWbemContext *a_Context ,
  592. IWbemClassObject *a_InParams ,
  593. IWbemClassObject **a_OutParams ,
  594. IWbemCallResult **a_CallResult
  595. ) ;
  596. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  597. const BSTR a_ObjectPath ,
  598. const BSTR a_MethodName ,
  599. long a_Flags ,
  600. IWbemContext *a_Context ,
  601. IWbemClassObject *a_InParams ,
  602. IWbemObjectSink *a_Sink
  603. ) ;
  604. /* IWbemPropertyProvider */
  605. HRESULT STDMETHODCALLTYPE GetProperty (
  606. long a_Flags ,
  607. const BSTR a_Locale ,
  608. const BSTR a_ClassMapping ,
  609. const BSTR a_InstanceMapping ,
  610. const BSTR a_PropertyMapping ,
  611. VARIANT *a_Value
  612. ) ;
  613. HRESULT STDMETHODCALLTYPE PutProperty (
  614. long a_Flags ,
  615. const BSTR a_Locale ,
  616. const BSTR a_ClassMapping ,
  617. const BSTR a_InstanceMapping ,
  618. const BSTR a_PropertyMapping ,
  619. const VARIANT *a_Value
  620. ) ;
  621. /* IWbemEventProvider */
  622. HRESULT STDMETHODCALLTYPE ProvideEvents (
  623. IWbemObjectSink *a_Sink ,
  624. long a_Flags
  625. ) ;
  626. /* IWbemEventProviderQuerySink */
  627. HRESULT STDMETHODCALLTYPE NewQuery (
  628. unsigned long a_Id ,
  629. WBEM_WSTR a_QueryLanguage ,
  630. WBEM_WSTR a_Query
  631. );
  632. HRESULT STDMETHODCALLTYPE CancelQuery (
  633. unsigned long a_Id
  634. ) ;
  635. /* IWbemEventProviderSecurity */
  636. HRESULT STDMETHODCALLTYPE AccessCheck (
  637. WBEM_CWSTR a_QueryLanguage ,
  638. WBEM_CWSTR a_Query ,
  639. long a_SidLength ,
  640. const BYTE *a_Sid
  641. ) ;
  642. /* IWbemEventConsumerProvider */
  643. HRESULT STDMETHODCALLTYPE FindConsumer (
  644. IWbemClassObject *a_LogicalConsumer ,
  645. IWbemUnboundObjectSink **a_Consumer
  646. );
  647. /* IWbemEventConsumerProviderEx */
  648. HRESULT STDMETHODCALLTYPE ValidateSubscription (
  649. IWbemClassObject *a_LogicalConsumer
  650. ) ;
  651. /* IWbemUnboundObjectSink */
  652. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  653. IWbemClassObject *a_LogicalConsumer ,
  654. long a_ObjectCount ,
  655. IWbemClassObject **a_Objects
  656. ) ;
  657. /* IWbemHiPerfProvider */
  658. HRESULT STDMETHODCALLTYPE QueryInstances (
  659. IWbemServices *a_Namespace ,
  660. WCHAR *a_Class ,
  661. long a_Flags ,
  662. IWbemContext *a_Context ,
  663. IWbemObjectSink *a_Sink
  664. ) ;
  665. HRESULT STDMETHODCALLTYPE CreateRefresher (
  666. IWbemServices *a_Namespace ,
  667. long a_Flags ,
  668. IWbemRefresher **a_Refresher
  669. ) ;
  670. HRESULT STDMETHODCALLTYPE CreateRefreshableObject (
  671. IWbemServices *a_Namespace ,
  672. IWbemObjectAccess *a_Template ,
  673. IWbemRefresher *a_Refresher ,
  674. long a_Flags ,
  675. IWbemContext *a_Context ,
  676. IWbemObjectAccess **a_Refreshable ,
  677. long *a_Id
  678. ) ;
  679. HRESULT STDMETHODCALLTYPE StopRefreshing (
  680. IWbemRefresher *a_Refresher ,
  681. long a_Id ,
  682. long a_Flags
  683. ) ;
  684. HRESULT STDMETHODCALLTYPE CreateRefreshableEnum (
  685. IWbemServices *a_Namespace ,
  686. LPCWSTR a_Class ,
  687. IWbemRefresher *a_Refresher ,
  688. long a_Flags ,
  689. IWbemContext *a_Context ,
  690. IWbemHiPerfEnum *a_HiPerfEnum ,
  691. long *a_Id
  692. ) ;
  693. HRESULT STDMETHODCALLTYPE GetObjects (
  694. IWbemServices *a_Namespace ,
  695. long a_ObjectCount ,
  696. IWbemObjectAccess **a_Objects ,
  697. long a_Flags ,
  698. IWbemContext *a_Context
  699. ) ;
  700. HRESULT STDMETHODCALLTYPE Call (
  701. IWbemServices *a_Service ,
  702. long a_Flags ,
  703. IWbemContext *a_Context ,
  704. LPCWSTR a_Class ,
  705. LPCWSTR a_Path ,
  706. const BSTR a_Method,
  707. IWbemClassObject *a_InParams,
  708. IWbemObjectSink *a_Sink
  709. ) ;
  710. /* _IWmiProviderConfiguration methods */
  711. HRESULT STDMETHODCALLTYPE Get (
  712. IWbemServices *a_Service ,
  713. long a_Flags ,
  714. IWbemContext *a_Context ,
  715. LPCWSTR a_Class ,
  716. LPCWSTR a_Path ,
  717. IWbemObjectSink *a_Sink
  718. ) ;
  719. HRESULT STDMETHODCALLTYPE Set (
  720. IWbemServices *a_Service ,
  721. long a_Flags ,
  722. IWbemContext *a_Context ,
  723. LPCWSTR a_Provider ,
  724. LPCWSTR a_Class ,
  725. LPCWSTR a_Path ,
  726. IWbemClassObject *a_OldObject ,
  727. IWbemClassObject *a_NewObject
  728. ) ;
  729. HRESULT STDMETHODCALLTYPE Deleted (
  730. IWbemServices *a_Service ,
  731. long a_Flags ,
  732. IWbemContext *a_Context ,
  733. LPCWSTR a_Provider ,
  734. LPCWSTR a_Class ,
  735. LPCWSTR a_Path ,
  736. IWbemClassObject *a_Object
  737. ) ;
  738. HRESULT STDMETHODCALLTYPE Enumerate (
  739. IWbemServices *a_Service ,
  740. long a_Flags ,
  741. IWbemContext *a_Context ,
  742. LPCWSTR a_Class ,
  743. IWbemObjectSink *a_Sink
  744. ) ;
  745. HRESULT STDMETHODCALLTYPE Shutdown (
  746. IWbemServices *a_Service ,
  747. long a_Flags ,
  748. IWbemContext *a_Context ,
  749. LPCWSTR a_Provider ,
  750. ULONG a_MilliSeconds
  751. ) ;
  752. HRESULT STDMETHODCALLTYPE Call (
  753. IWbemServices *a_Service ,
  754. long a_Flags ,
  755. IWbemContext *a_Context ,
  756. LPCWSTR a_Class ,
  757. LPCWSTR a_Path ,
  758. LPCWSTR a_Method,
  759. IWbemClassObject *a_InParams,
  760. IWbemObjectSink *a_Sink
  761. ) ;
  762. HRESULT STDMETHODCALLTYPE Query (
  763. IWbemServices *a_Service ,
  764. long a_Flags ,
  765. IWbemContext *a_Context ,
  766. WBEM_PROVIDER_CONFIGURATION_CLASS_ID a_ClassIdentifier ,
  767. WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID a_PropertyIdentifier ,
  768. VARIANT *a_Value
  769. ) ;
  770. HRESULT STDMETHODCALLTYPE Unload (
  771. long a_Flags ,
  772. IWbemContext *a_Context
  773. ) ;
  774. HRESULT STDMETHODCALLTYPE Load (
  775. long a_Flags ,
  776. IWbemContext *a_Context
  777. ) ;
  778. HRESULT STDMETHODCALLTYPE ForceReload () ;
  779. /* _IWmiProviderQuota */
  780. HRESULT STDMETHODCALLTYPE Violation (
  781. long a_Flags ,
  782. IWbemContext *a_Context ,
  783. IWbemClassObject *a_Object
  784. ) ;
  785. /* _IWmiProviderCache */
  786. HRESULT STDMETHODCALLTYPE Expel (
  787. long a_Flags ,
  788. IWbemContext *a_Context
  789. ) ;
  790. /* IWbemProviderInit methods */
  791. HRESULT STDMETHODCALLTYPE Initialize (
  792. LPWSTR a_User ,
  793. LONG a_Flags ,
  794. LPWSTR a_Namespace ,
  795. LPWSTR a_Locale ,
  796. IWbemServices *a_Core ,
  797. IWbemContext *a_Context ,
  798. IWbemProviderInitSink *a_Sink
  799. ) ;
  800. HRESULT STDMETHODCALLTYPE Initialize (
  801. LONG a_Flags ,
  802. IWbemContext *a_Context ,
  803. GUID *a_TransactionIdentifier,
  804. LPCWSTR a_User ,
  805. LPCWSTR a_Locale ,
  806. LPCWSTR a_Namespace ,
  807. IWbemServices *a_Repository ,
  808. IWbemServices *a_Service ,
  809. IWbemProviderInitSink *a_Sink
  810. )
  811. {
  812. return WBEM_E_NOT_AVAILABLE ;
  813. }
  814. HRESULT STDMETHODCALLTYPE WaitProvider ( IWbemContext *a_Context , ULONG a_Timeout ) ;
  815. HRESULT STDMETHODCALLTYPE GetInitializeResult () ;
  816. HRESULT STDMETHODCALLTYPE GetHosting ( ULONG *a_Value )
  817. {
  818. if ( a_Value )
  819. {
  820. *a_Value = m_Registration->GetHosting () ;
  821. return S_OK ;
  822. }
  823. else
  824. {
  825. return WBEM_E_INVALID_PARAMETER ;
  826. }
  827. }
  828. HRESULT STDMETHODCALLTYPE GetHostingGroup ( BSTR *a_Value )
  829. {
  830. if ( a_Value )
  831. {
  832. if ( m_Registration->GetHostingGroup () )
  833. {
  834. BSTR t_Value = SysAllocString ( m_Registration->GetHostingGroup () ) ;
  835. *a_Value = t_Value ;
  836. }
  837. else
  838. {
  839. *a_Value = NULL ;
  840. }
  841. return S_OK ;
  842. }
  843. else
  844. {
  845. return WBEM_E_INVALID_PARAMETER ;
  846. }
  847. }
  848. HRESULT STDMETHODCALLTYPE IsInternal ( BOOL *a_Value )
  849. {
  850. if ( a_Value )
  851. {
  852. *a_Value = FALSE ;
  853. return S_OK ;
  854. }
  855. else
  856. {
  857. return WBEM_E_INVALID_PARAMETER ;
  858. }
  859. }
  860. HRESULT STDMETHODCALLTYPE IsPerUserInitialization ( BOOL *a_Value )
  861. {
  862. if ( a_Value )
  863. {
  864. *a_Value = m_Registration->PerUserInitialization () ;
  865. return S_OK ;
  866. }
  867. else
  868. {
  869. return WBEM_E_INVALID_PARAMETER ;
  870. }
  871. }
  872. HRESULT STDMETHODCALLTYPE IsPerLocaleInitialization ( BOOL *a_Value )
  873. {
  874. if ( a_Value )
  875. {
  876. *a_Value = m_Registration->PerLocaleInitialization () ;
  877. return S_OK ;
  878. }
  879. else
  880. {
  881. return WBEM_E_INVALID_PARAMETER ;
  882. }
  883. }
  884. // _IWmiProviderStack
  885. HRESULT STDMETHODCALLTYPE DownLevel (
  886. long a_Flags ,
  887. IWbemContext *a_Context ,
  888. REFIID a_Riid,
  889. void **a_Interface
  890. ) ;
  891. HRESULT STDMETHODCALLTYPE AbnormalShutdown () ;
  892. // IWmi_UnInitialize members
  893. HRESULT STDMETHODCALLTYPE Shutdown (
  894. LONG a_Flags ,
  895. ULONG a_MaxMilliSeconds ,
  896. IWbemContext *a_Context
  897. ) ;
  898. } ;
  899. /******************************************************************************
  900. *
  901. * Name:
  902. *
  903. *
  904. * Description:
  905. *
  906. *
  907. *****************************************************************************/
  908. class CInterceptor_IWbemSyncUnboundObjectSink : public IWbemUnboundObjectSink ,
  909. public Internal_IWbemUnboundObjectSink ,
  910. public _IWmiProviderSite ,
  911. public IWbemShutdown ,
  912. public VoidPointerContainerElement
  913. {
  914. private:
  915. WmiAllocator &m_Allocator ;
  916. CServerObject_ProviderRegistrationV1 *m_Registration ;
  917. IUnknown *m_Unknown ;
  918. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  919. ProxyContainer m_ProxyContainer ;
  920. protected:
  921. HRESULT Begin_Interface_Consumer (
  922. bool a_Identify ,
  923. IUnknown *a_ServerInterface ,
  924. REFIID a_InterfaceIdentifier ,
  925. DWORD a_ProxyIndex ,
  926. BOOL &a_Impersonating ,
  927. IUnknown *&a_OldContext ,
  928. IServerSecurity *&a_OldSecurity ,
  929. BOOL &a_IsProxy ,
  930. IUnknown *&a_Interface ,
  931. BOOL &a_Revert ,
  932. IUnknown *&a_Proxy
  933. ) ;
  934. HRESULT End_Interface_Consumer (
  935. IUnknown *a_ServerInterface ,
  936. REFIID a_InterfaceIdentifier ,
  937. DWORD a_ProxyIndex ,
  938. BOOL a_Impersonating ,
  939. IUnknown *a_OldContext ,
  940. IServerSecurity *a_OldSecurity ,
  941. BOOL a_IsProxy ,
  942. IUnknown *a_Interface ,
  943. BOOL a_Revert ,
  944. IUnknown *a_Proxy
  945. ) ;
  946. HRESULT InternalEx_IndicateToConsumer (
  947. bool a_Identify ,
  948. IWbemClassObject *a_LogicalConsumer ,
  949. long a_ObjectCount ,
  950. IWbemClassObject **a_Objects
  951. ) ;
  952. public:
  953. CInterceptor_IWbemSyncUnboundObjectSink (
  954. WmiAllocator &a_Allocator ,
  955. IUnknown *a_ServerSideProvider ,
  956. CWbemGlobal_IWmiObjectSinkController *a_Controller ,
  957. CServerObject_ProviderRegistrationV1 &a_Registration
  958. ) ;
  959. ~CInterceptor_IWbemSyncUnboundObjectSink () ;
  960. HRESULT Initialize () ;
  961. public:
  962. STDMETHODIMP QueryInterface (
  963. REFIID iid ,
  964. LPVOID FAR *iplpv
  965. ) ;
  966. STDMETHODIMP_( ULONG ) AddRef () ;
  967. STDMETHODIMP_( ULONG ) Release () ;
  968. HRESULT STDMETHODCALLTYPE Internal_IndicateToConsumer (
  969. WmiInternalContext a_InternalContext ,
  970. IWbemClassObject *a_LogicalConsumer ,
  971. long a_ObjectCount ,
  972. IWbemClassObject **a_Objects
  973. ) ;
  974. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  975. IWbemClassObject *a_LogicalConsumer ,
  976. long a_ObjectCount ,
  977. IWbemClassObject **a_Objects
  978. ) ;
  979. /* _IWmiProviderSite */
  980. HRESULT STDMETHODCALLTYPE GetSite ( DWORD *a_ProcessIdentifier ) ;
  981. HRESULT STDMETHODCALLTYPE SetContainer ( IUnknown *a_Container ) ;
  982. HRESULT STDMETHODCALLTYPE Shutdown (
  983. LONG a_Flags ,
  984. ULONG a_MaxMilliSeconds ,
  985. IWbemContext *a_Context
  986. ) ;
  987. } ;
  988. /******************************************************************************
  989. *
  990. * Name:
  991. *
  992. *
  993. * Description:
  994. *
  995. *
  996. *****************************************************************************/
  997. class CInterceptor_IWbemSyncProvider : public IWbemServices ,
  998. public IWbemPropertyProvider ,
  999. public IWbemEventProvider ,
  1000. public IWbemEventProviderQuerySink ,
  1001. public IWbemEventProviderSecurity ,
  1002. public IWbemProviderIdentity ,
  1003. public IWbemEventConsumerProviderEx ,
  1004. public IWbemUnboundObjectSink ,
  1005. public IWbemHiPerfProvider ,
  1006. public Internal_IWbemServices ,
  1007. public Internal_IWbemPropertyProvider ,
  1008. public Internal_IWbemEventProvider ,
  1009. public Internal_IWbemEventProviderQuerySink ,
  1010. public Internal_IWbemEventProviderSecurity ,
  1011. public Internal_IWbemEventConsumerProviderEx ,
  1012. public Internal_IWbemUnboundObjectSink ,
  1013. public _IWmiProviderInitialize ,
  1014. public IWbemShutdown ,
  1015. public _IWmiProviderQuota ,
  1016. public _IWmiProviderSite ,
  1017. public _IWmiProviderConfiguration ,
  1018. public Internal_IWmiProviderConfiguration ,
  1019. public SyncProviderContainerElement ,
  1020. public CWbemGlobal_IWmiObjectSinkController
  1021. {
  1022. private:
  1023. IUnknown *m_Unknown ;
  1024. IWbemServices *m_Provider_IWbemServices ;
  1025. IWbemPropertyProvider *m_Provider_IWbemPropertyProvider ;
  1026. IWbemHiPerfProvider *m_Provider_IWbemHiPerfProvider ;
  1027. IWbemEventProvider *m_Provider_IWbemEventProvider ;
  1028. IWbemEventProviderQuerySink *m_Provider_IWbemEventProviderQuerySink ;
  1029. IWbemEventProviderSecurity *m_Provider_IWbemEventProviderSecurity ;
  1030. IWbemProviderIdentity *m_Provider_IWbemProviderIdentity ;
  1031. IWbemEventConsumerProvider *m_Provider_IWbemEventConsumerProvider ;
  1032. IWbemEventConsumerProviderEx *m_Provider_IWbemEventConsumerProviderEx ;
  1033. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  1034. _IWmiProviderQuota *m_Quota ;
  1035. IWbemServices *m_CoreStub ;
  1036. IWbemClassObject *m_ExtendedStatusObject ;
  1037. WmiAllocator &m_Allocator ;
  1038. ProxyContainer m_ProxyContainer ;
  1039. LONG m_Initialized ;
  1040. HRESULT m_InitializeResult ;
  1041. HANDLE m_InitializedEvent ;
  1042. IWbemContext *m_InitializationContext ;
  1043. public:
  1044. HRESULT SetInitialized ( HRESULT a_InitializeResult ) ;
  1045. public:
  1046. CServerObject_ProviderRegistrationV1 *m_Registration ;
  1047. BSTR m_Locale ;
  1048. BSTR m_User ;
  1049. BSTR m_Namespace ;
  1050. BSTR m_TransactionIdentifier ;
  1051. UINT64 m_ProviderOperation_GetObjectAsync ;
  1052. UINT64 m_ProviderOperation_PutClassAsync ;
  1053. UINT64 m_ProviderOperation_DeleteClassAsync ;
  1054. UINT64 m_ProviderOperation_CreateClassEnumAsync ;
  1055. UINT64 m_ProviderOperation_PutInstanceAsync ;
  1056. UINT64 m_ProviderOperation_DeleteInstanceAsync ;
  1057. UINT64 m_ProviderOperation_CreateInstanceEnumAsync ;
  1058. UINT64 m_ProviderOperation_ExecQueryAsync ;
  1059. UINT64 m_ProviderOperation_ExecNotificationQueryAsync ;
  1060. UINT64 m_ProviderOperation_ExecMethodAsync ;
  1061. UINT64 m_ProviderOperation_Begin ;
  1062. UINT64 m_ProviderOperation_Rollback ;
  1063. UINT64 m_ProviderOperation_Commit ;
  1064. UINT64 m_ProviderOperation_QueryState ;
  1065. UINT64 m_ProviderOperation_QueryInstances ;
  1066. UINT64 m_ProviderOperation_CreateRefresher ;
  1067. UINT64 m_ProviderOperation_CreateRefreshableObject ;
  1068. UINT64 m_ProviderOperation_StopRefreshing ;
  1069. UINT64 m_ProviderOperation_CreateRefreshableEnum ;
  1070. UINT64 m_ProviderOperation_GetObjects ;
  1071. UINT64 m_ProviderOperation_GetProperty ;
  1072. UINT64 m_ProviderOperation_PutProperty ;
  1073. UINT64 m_ProviderOperation_ProvideEvents ;
  1074. UINT64 m_ProviderOperation_NewQuery ;
  1075. UINT64 m_ProviderOperation_CancelQuery ;
  1076. UINT64 m_ProviderOperation_AccessCheck ;
  1077. UINT64 m_ProviderOperation_SetRegistrationObject ;
  1078. UINT64 m_ProviderOperation_FindConsumer ;
  1079. UINT64 m_ProviderOperation_ValidateSubscription ;
  1080. void Increment_ProviderOperation_GetObjectAsync () { m_ProviderOperation_GetObjectAsync ++ ; }
  1081. void Increment_ProviderOperation_PutClassAsync () { m_ProviderOperation_PutClassAsync ++ ; }
  1082. void Increment_ProviderOperation_DeleteClassAsync () { m_ProviderOperation_DeleteClassAsync ++ ; }
  1083. void Increment_ProviderOperation_CreateClassEnumAsync () { m_ProviderOperation_CreateClassEnumAsync ++ ; }
  1084. void Increment_ProviderOperation_PutInstanceAsync () { m_ProviderOperation_PutInstanceAsync ++ ; }
  1085. void Increment_ProviderOperation_DeleteInstanceAsync () { m_ProviderOperation_DeleteInstanceAsync ++ ; }
  1086. void Increment_ProviderOperation_CreateInstanceEnumAsync () { m_ProviderOperation_CreateInstanceEnumAsync ++ ; }
  1087. void Increment_ProviderOperation_ExecQueryAsync () { m_ProviderOperation_ExecQueryAsync ++ ; }
  1088. void Increment_ProviderOperation_ExecNotificationQueryAsync () { m_ProviderOperation_ExecNotificationQueryAsync ++ ; }
  1089. void Increment_ProviderOperation_ExecMethodAsync () { m_ProviderOperation_ExecMethodAsync ++ ; }
  1090. void Increment_ProviderOperation_Begin () { m_ProviderOperation_Begin ++ ; }
  1091. void Increment_ProviderOperation_Rollback () { m_ProviderOperation_Rollback ++ ; }
  1092. void Increment_ProviderOperation_Commit () { m_ProviderOperation_Commit ++ ; }
  1093. void Increment_ProviderOperation_QueryState () { m_ProviderOperation_QueryState ++ ; }
  1094. void Increment_ProviderOperation_QueryInstances () { m_ProviderOperation_QueryInstances ++ ; }
  1095. void Increment_ProviderOperation_CreateRefresher () { m_ProviderOperation_CreateRefresher ++ ; }
  1096. void Increment_ProviderOperation_CreateRefreshableObject () { m_ProviderOperation_CreateRefreshableObject ++ ; }
  1097. void Increment_ProviderOperation_StopRefreshing () { m_ProviderOperation_StopRefreshing ++ ; }
  1098. void Increment_ProviderOperation_CreateRefreshableEnum () { m_ProviderOperation_CreateRefreshableEnum ++ ; }
  1099. void Increment_ProviderOperation_GetObjects () { m_ProviderOperation_GetObjects ++ ; }
  1100. void Increment_ProviderOperation_GetProperty () { m_ProviderOperation_GetProperty ++ ; }
  1101. void Increment_ProviderOperation_PutProperty () { m_ProviderOperation_PutProperty ++ ; }
  1102. void Increment_ProviderOperation_ProvideEvents () { m_ProviderOperation_ProvideEvents ++ ; }
  1103. void Increment_ProviderOperation_NewQuery () { m_ProviderOperation_NewQuery ++ ; }
  1104. void Increment_ProviderOperation_CancelQuery () { m_ProviderOperation_CancelQuery ++ ; }
  1105. void Increment_ProviderOperation_AccessCheck () { m_ProviderOperation_AccessCheck ++ ; }
  1106. void Increment_ProviderOperation_SetRegistrationObject () { m_ProviderOperation_SetRegistrationObject ++ ; }
  1107. void Increment_ProviderOperation_FindConsumer () { m_ProviderOperation_FindConsumer ++ ; }
  1108. void Increment_ProviderOperation_ValidateSubscription () { m_ProviderOperation_ValidateSubscription ++ ; }
  1109. UINT64 Get_ProviderOperation_GetObjectAsync () { return m_ProviderOperation_GetObjectAsync ; }
  1110. UINT64 Get_ProviderOperation_PutClassAsync () { return m_ProviderOperation_PutClassAsync ; }
  1111. UINT64 Get_ProviderOperation_DeleteClassAsync () { return m_ProviderOperation_DeleteClassAsync ; }
  1112. UINT64 Get_ProviderOperation_CreateClassEnumAsync () { return m_ProviderOperation_CreateClassEnumAsync ; }
  1113. UINT64 Get_ProviderOperation_PutInstanceAsync () { return m_ProviderOperation_PutInstanceAsync ; }
  1114. UINT64 Get_ProviderOperation_DeleteInstanceAsync () { return m_ProviderOperation_DeleteInstanceAsync ; }
  1115. UINT64 Get_ProviderOperation_CreateInstanceEnumAsync () { return m_ProviderOperation_CreateInstanceEnumAsync ; }
  1116. UINT64 Get_ProviderOperation_ExecQueryAsync () { return m_ProviderOperation_ExecQueryAsync ; }
  1117. UINT64 Get_ProviderOperation_ExecNotificationQueryAsync () { return m_ProviderOperation_ExecNotificationQueryAsync ; }
  1118. UINT64 Get_ProviderOperation_ExecMethodAsync () { return m_ProviderOperation_ExecMethodAsync ; }
  1119. UINT64 Get_ProviderOperation_Begin () { return m_ProviderOperation_Begin ; }
  1120. UINT64 Get_ProviderOperation_Rollback () { return m_ProviderOperation_Rollback ; }
  1121. UINT64 Get_ProviderOperation_Commit () { return m_ProviderOperation_Commit ; }
  1122. UINT64 Get_ProviderOperation_QueryState () { return m_ProviderOperation_QueryState ; }
  1123. UINT64 Get_ProviderOperation_QueryInstances () { return m_ProviderOperation_QueryInstances ; }
  1124. UINT64 Get_ProviderOperation_CreateRefresher () { return m_ProviderOperation_CreateRefresher ; }
  1125. UINT64 Get_ProviderOperation_CreateRefreshableObject () { return m_ProviderOperation_CreateRefreshableObject ; }
  1126. UINT64 Get_ProviderOperation_StopRefreshing () { return m_ProviderOperation_StopRefreshing ; }
  1127. UINT64 Get_ProviderOperation_CreateRefreshableEnum () { return m_ProviderOperation_CreateRefreshableEnum ; }
  1128. UINT64 Get_ProviderOperation_GetObjects () { return m_ProviderOperation_GetObjects ; }
  1129. UINT64 Get_ProviderOperation_GetProperty () { return m_ProviderOperation_GetProperty ; }
  1130. UINT64 Get_ProviderOperation_PutProperty () { return m_ProviderOperation_PutProperty ; }
  1131. UINT64 Get_ProviderOperation_ProvideEvents () { return m_ProviderOperation_ProvideEvents ; }
  1132. UINT64 Get_ProviderOperation_NewQuery () { return m_ProviderOperation_NewQuery ; }
  1133. UINT64 Get_ProviderOperation_CancelQuery () { return m_ProviderOperation_CancelQuery ; }
  1134. UINT64 Get_ProviderOperation_AccessCheck () { return m_ProviderOperation_AccessCheck ; }
  1135. UINT64 Get_ProviderOperation_SetRegistrationObject () { return m_ProviderOperation_SetRegistrationObject ; }
  1136. UINT64 Get_ProviderOperation_FindConsumer () { return m_ProviderOperation_FindConsumer ; }
  1137. UINT64 Get_ProviderOperation_ValidateSubscription () { return m_ProviderOperation_ValidateSubscription ; }
  1138. private:
  1139. HRESULT SetStatus (
  1140. LPWSTR a_Operation ,
  1141. LPWSTR a_Parameters ,
  1142. LPWSTR a_Description ,
  1143. HRESULT a_Result ,
  1144. IWbemObjectSink *a_Sink
  1145. ) ;
  1146. HRESULT Begin_IWbemServices (
  1147. BOOL &a_Impersonating ,
  1148. IUnknown *&a_OldContext ,
  1149. IServerSecurity *&a_OldSecurity ,
  1150. BOOL &a_IsProxy ,
  1151. IWbemServices *&a_Interface ,
  1152. BOOL &a_Revert ,
  1153. IUnknown *&a_Proxy
  1154. ) ;
  1155. HRESULT End_IWbemServices (
  1156. BOOL a_Impersonating ,
  1157. IUnknown *a_OldContext ,
  1158. IServerSecurity *a_OldSecurity ,
  1159. BOOL a_IsProxy ,
  1160. IWbemServices *a_Interface ,
  1161. BOOL a_Revert ,
  1162. IUnknown *a_Proxy
  1163. ) ;
  1164. HRESULT Begin_Interface (
  1165. IUnknown *a_ServerInterface ,
  1166. REFIID a_InterfaceIdentifier ,
  1167. DWORD a_ProxyIndex ,
  1168. BOOL &a_Impersonating ,
  1169. IUnknown *&a_OldContext ,
  1170. IServerSecurity *&a_OldSecurity ,
  1171. BOOL &a_IsProxy ,
  1172. IUnknown *&a_Interface ,
  1173. BOOL &a_Revert ,
  1174. IUnknown *&a_Proxy
  1175. ) ;
  1176. HRESULT End_Interface (
  1177. IUnknown *a_ServerInterface ,
  1178. REFIID a_InterfaceIdentifier ,
  1179. DWORD a_ProxyIndex ,
  1180. BOOL a_Impersonating ,
  1181. IUnknown *a_OldContext ,
  1182. IServerSecurity *a_OldSecurity ,
  1183. BOOL a_IsProxy ,
  1184. IUnknown *a_Interface ,
  1185. BOOL a_Revert ,
  1186. IUnknown *a_Proxy
  1187. ) ;
  1188. HRESULT Begin_Interface_Events (
  1189. bool a_Identify ,
  1190. IUnknown *a_ServerInterface ,
  1191. REFIID a_InterfaceIdentifier ,
  1192. DWORD a_ProxyIndex ,
  1193. BOOL &a_Impersonating ,
  1194. IUnknown *&a_OldContext ,
  1195. IServerSecurity *&a_OldSecurity ,
  1196. BOOL &a_IsProxy ,
  1197. IUnknown *&a_Interface ,
  1198. BOOL &a_Revert ,
  1199. IUnknown *&a_Proxy
  1200. ) ;
  1201. HRESULT End_Interface_Events (
  1202. IUnknown *a_ServerInterface ,
  1203. REFIID a_InterfaceIdentifier ,
  1204. DWORD a_ProxyIndex ,
  1205. BOOL a_Impersonating ,
  1206. IUnknown *a_OldContext ,
  1207. IServerSecurity *a_OldSecurity ,
  1208. BOOL a_IsProxy ,
  1209. IUnknown *a_Interface ,
  1210. BOOL a_Revert ,
  1211. IUnknown *a_Proxy
  1212. ) ;
  1213. HRESULT AdjustGetContext (
  1214. IWbemContext *a_Context
  1215. ) ;
  1216. HRESULT Helper_HiPerfGetObjectAsync (
  1217. IWbemHiPerfProvider *a_HighPerformanceProvider ,
  1218. const BSTR a_ObjectPath ,
  1219. long a_Flags ,
  1220. IWbemContext *a_Context ,
  1221. IWbemObjectSink *a_Sink
  1222. ) ;
  1223. HRESULT Helper_GetObjectAsync (
  1224. BOOL a_IsProxy ,
  1225. const BSTR a_ObjectPath ,
  1226. long a_Flags ,
  1227. IWbemContext *a_Context ,
  1228. IWbemObjectSink *a_Sink ,
  1229. IWbemServices *a_Service
  1230. ) ;
  1231. HRESULT Helper_PutClassAsync (
  1232. BOOL a_IsProxy ,
  1233. IWbemClassObject *a_Object ,
  1234. long a_Flags ,
  1235. IWbemContext FAR *a_Context ,
  1236. IWbemObjectSink *a_Sink ,
  1237. IWbemServices *a_Service
  1238. ) ;
  1239. HRESULT Helper_DeleteClassAsync (
  1240. BOOL a_IsProxy ,
  1241. const BSTR a_Class ,
  1242. long a_Flags ,
  1243. IWbemContext FAR *a_Context ,
  1244. IWbemObjectSink *a_Sink ,
  1245. IWbemServices *a_Service
  1246. ) ;
  1247. HRESULT Helper_CreateClassEnumAsync (
  1248. BOOL a_IsProxy ,
  1249. const BSTR a_SuperClass ,
  1250. long a_Flags ,
  1251. IWbemContext FAR *a_Context ,
  1252. IWbemObjectSink *a_Sink ,
  1253. IWbemServices *a_Service
  1254. ) ;
  1255. HRESULT Helper_PutInstanceAsync (
  1256. BOOL a_IsProxy ,
  1257. IWbemClassObject *a_Instance ,
  1258. long a_Flags ,
  1259. IWbemContext FAR *a_Context ,
  1260. IWbemObjectSink *a_Sink ,
  1261. IWbemServices *a_Service
  1262. ) ;
  1263. HRESULT Helper_DeleteInstanceAsync (
  1264. BOOL a_IsProxy ,
  1265. const BSTR a_ObjectPath ,
  1266. long a_Flags ,
  1267. IWbemContext FAR *a_Context ,
  1268. IWbemObjectSink *a_Sink ,
  1269. IWbemServices *a_Service
  1270. ) ;
  1271. HRESULT Helper_CreateInstanceEnumAsync (
  1272. BOOL a_IsProxy ,
  1273. const BSTR a_Class ,
  1274. long a_Flags ,
  1275. IWbemContext *a_Context ,
  1276. IWbemObjectSink *a_Sink ,
  1277. IWbemServices *a_Service
  1278. ) ;
  1279. HRESULT Helper_QueryInstancesAsync (
  1280. IWbemHiPerfProvider *a_PerformanceProvider ,
  1281. const BSTR a_Class ,
  1282. long a_Flags ,
  1283. IWbemContext *a_Context ,
  1284. IWbemObjectSink *a_Sink
  1285. ) ;
  1286. HRESULT Helper_ExecQueryAsync (
  1287. BOOL a_IsProxy ,
  1288. const BSTR a_QueryLanguage ,
  1289. const BSTR a_Query,
  1290. long a_Flags ,
  1291. IWbemContext FAR *a_Context ,
  1292. IWbemObjectSink *a_Sink ,
  1293. IWbemServices *a_Service
  1294. ) ;
  1295. HRESULT Helper_ExecMethodAsync (
  1296. BOOL a_IsProxy ,
  1297. const BSTR a_ObjectPath ,
  1298. const BSTR a_MethodName ,
  1299. long a_Flags ,
  1300. IWbemContext *a_Context ,
  1301. IWbemClassObject *a_InParams ,
  1302. IWbemObjectSink *a_Sink ,
  1303. IWbemServices *a_Service
  1304. ) ;
  1305. HRESULT STDMETHODCALLTYPE InternalEx_ProvideEvents (
  1306. bool a_Identify ,
  1307. IWbemObjectSink *a_Sink ,
  1308. long a_Flags
  1309. ) ;
  1310. HRESULT STDMETHODCALLTYPE InternalEx_NewQuery (
  1311. bool a_Identify ,
  1312. unsigned long a_Id ,
  1313. WBEM_WSTR a_QueryLanguage ,
  1314. WBEM_WSTR a_Query
  1315. );
  1316. HRESULT STDMETHODCALLTYPE InternalEx_CancelQuery (
  1317. bool a_Identify ,
  1318. unsigned long a_Id
  1319. ) ;
  1320. HRESULT STDMETHODCALLTYPE InternalEx_AccessCheck (
  1321. bool a_Identify ,
  1322. WBEM_CWSTR a_QueryLanguage ,
  1323. WBEM_CWSTR a_Query ,
  1324. long a_SidLength ,
  1325. const BYTE *a_Sid
  1326. ) ;
  1327. HRESULT STDMETHODCALLTYPE InternalEx_FindConsumer (
  1328. bool a_Identify ,
  1329. IWbemClassObject *a_LogicalConsumer ,
  1330. IWbemUnboundObjectSink **a_Consumer
  1331. );
  1332. HRESULT STDMETHODCALLTYPE InternalEx_ValidateSubscription (
  1333. bool a_Identify ,
  1334. IWbemClassObject *a_LogicalConsumer
  1335. ) ;
  1336. HRESULT STDMETHODCALLTYPE InternalEx_IndicateToConsumer (
  1337. bool a_Identify ,
  1338. IWbemClassObject *a_LogicalConsumer ,
  1339. long a_ObjectCount ,
  1340. IWbemClassObject **a_Objects
  1341. ) ;
  1342. public:
  1343. CInterceptor_IWbemSyncProvider (
  1344. WmiAllocator &a_Allocator ,
  1345. IUnknown *a_ServerSideUnknown ,
  1346. IWbemServices *a_CoreStub ,
  1347. CWbemGlobal_IWbemSyncProviderController *a_Controller ,
  1348. IWbemContext *a_InitializationContext ,
  1349. CServerObject_ProviderRegistrationV1 &a_Registration ,
  1350. GUID &a_Guid
  1351. ) ;
  1352. ~CInterceptor_IWbemSyncProvider () ;
  1353. public:
  1354. //Non-delegating object IUnknown
  1355. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  1356. STDMETHODIMP_( ULONG ) AddRef () ;
  1357. STDMETHODIMP_( ULONG ) Release () ;
  1358. /* IWbemServices methods */
  1359. HRESULT STDMETHODCALLTYPE OpenNamespace (
  1360. const BSTR a_Namespace ,
  1361. long a_Flags ,
  1362. IWbemContext *a_Context ,
  1363. IWbemServices **a_Service ,
  1364. IWbemCallResult **a_CallResult
  1365. ) ;
  1366. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  1367. IWbemObjectSink *a_Sink
  1368. ) ;
  1369. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  1370. long a_Flags ,
  1371. IWbemObjectSink **a_Sink
  1372. ) ;
  1373. HRESULT STDMETHODCALLTYPE GetObject (
  1374. const BSTR a_ObjectPath ,
  1375. long a_Flags ,
  1376. IWbemContext *a_Context ,
  1377. IWbemClassObject **ppObject ,
  1378. IWbemCallResult **a_CallResult
  1379. ) ;
  1380. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  1381. const BSTR a_ObjectPath ,
  1382. long a_Flags ,
  1383. IWbemContext *a_Context ,
  1384. IWbemObjectSink *a_Sink
  1385. ) ;
  1386. HRESULT STDMETHODCALLTYPE PutClass (
  1387. IWbemClassObject *a_Object ,
  1388. long a_Flags ,
  1389. IWbemContext *a_Context ,
  1390. IWbemCallResult **a_CallResult
  1391. ) ;
  1392. HRESULT STDMETHODCALLTYPE PutClassAsync (
  1393. IWbemClassObject *a_Object ,
  1394. long a_Flags ,
  1395. IWbemContext *a_Context ,
  1396. IWbemObjectSink *a_Sink
  1397. ) ;
  1398. HRESULT STDMETHODCALLTYPE DeleteClass (
  1399. const BSTR a_Class ,
  1400. long a_Flags ,
  1401. IWbemContext *a_Context ,
  1402. IWbemCallResult **a_CallResult
  1403. ) ;
  1404. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  1405. const BSTR a_Class ,
  1406. long a_Flags ,
  1407. IWbemContext *a_Context ,
  1408. IWbemObjectSink *a_Sink
  1409. ) ;
  1410. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  1411. const BSTR a_Superclass ,
  1412. long a_Flags ,
  1413. IWbemContext *a_Context ,
  1414. IEnumWbemClassObject **a_Enum
  1415. ) ;
  1416. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  1417. const BSTR a_Superclass ,
  1418. long a_Flags ,
  1419. IWbemContext *a_Context ,
  1420. IWbemObjectSink *a_Sink
  1421. ) ;
  1422. HRESULT STDMETHODCALLTYPE PutInstance (
  1423. IWbemClassObject *a_Instance ,
  1424. long a_Flags ,
  1425. IWbemContext *a_Context ,
  1426. IWbemCallResult **a_CallResult
  1427. ) ;
  1428. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  1429. IWbemClassObject *a_Instance ,
  1430. long a_Flags ,
  1431. IWbemContext *a_Context ,
  1432. IWbemObjectSink *a_Sink
  1433. ) ;
  1434. HRESULT STDMETHODCALLTYPE DeleteInstance (
  1435. const BSTR a_ObjectPath ,
  1436. long a_Flags ,
  1437. IWbemContext *a_Context ,
  1438. IWbemCallResult **a_CallResult
  1439. ) ;
  1440. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  1441. const BSTR a_ObjectPath,
  1442. long a_Flags,
  1443. IWbemContext *a_Context ,
  1444. IWbemObjectSink *a_Sink
  1445. ) ;
  1446. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  1447. const BSTR a_Class ,
  1448. long a_Flags ,
  1449. IWbemContext *a_Context ,
  1450. IEnumWbemClassObject **a_Enum
  1451. ) ;
  1452. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  1453. const BSTR a_Class ,
  1454. long a_Flags ,
  1455. IWbemContext *a_Context ,
  1456. IWbemObjectSink *a_Sink
  1457. ) ;
  1458. HRESULT STDMETHODCALLTYPE ExecQuery (
  1459. const BSTR a_QueryLanguage,
  1460. const BSTR a_Query,
  1461. long a_Flags ,
  1462. IWbemContext *a_Context ,
  1463. IEnumWbemClassObject **a_Enum
  1464. ) ;
  1465. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  1466. const BSTR a_QueryLanguage ,
  1467. const BSTR a_Query ,
  1468. long a_Flags ,
  1469. IWbemContext *a_Context ,
  1470. IWbemObjectSink *a_Sink
  1471. ) ;
  1472. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  1473. const BSTR a_QueryLanguage ,
  1474. const BSTR a_Query ,
  1475. long a_Flags ,
  1476. IWbemContext *a_Context ,
  1477. IEnumWbemClassObject **a_Enum
  1478. ) ;
  1479. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  1480. const BSTR a_QueryLanguage ,
  1481. const BSTR a_Query ,
  1482. long a_Flags ,
  1483. IWbemContext *a_Context ,
  1484. IWbemObjectSink *a_Sink
  1485. ) ;
  1486. HRESULT STDMETHODCALLTYPE ExecMethod (
  1487. const BSTR a_ObjectPath ,
  1488. const BSTR a_MethodName ,
  1489. long a_Flags ,
  1490. IWbemContext *a_Context ,
  1491. IWbemClassObject *a_InParams ,
  1492. IWbemClassObject **a_OutParams ,
  1493. IWbemCallResult **a_CallResult
  1494. ) ;
  1495. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  1496. const BSTR a_ObjectPath ,
  1497. const BSTR a_MethodName ,
  1498. long a_Flags ,
  1499. IWbemContext *a_Context ,
  1500. IWbemClassObject *a_InParams ,
  1501. IWbemObjectSink *a_Sink
  1502. ) ;
  1503. /* IWbemPropertyProvider */
  1504. HRESULT STDMETHODCALLTYPE GetProperty (
  1505. long a_Flags ,
  1506. const BSTR a_Locale ,
  1507. const BSTR a_ClassMapping ,
  1508. const BSTR a_InstanceMapping ,
  1509. const BSTR a_PropertyMapping ,
  1510. VARIANT *a_Value
  1511. ) ;
  1512. HRESULT STDMETHODCALLTYPE PutProperty (
  1513. long a_Flags ,
  1514. const BSTR a_Locale ,
  1515. const BSTR a_ClassMapping ,
  1516. const BSTR a_InstanceMapping ,
  1517. const BSTR a_PropertyMapping ,
  1518. const VARIANT *a_Value
  1519. ) ;
  1520. /* IWbemEventProvider */
  1521. HRESULT STDMETHODCALLTYPE ProvideEvents (
  1522. IWbemObjectSink *a_Sink ,
  1523. long a_Flags
  1524. ) ;
  1525. /* IWbemEventProviderQuerySink */
  1526. HRESULT STDMETHODCALLTYPE NewQuery (
  1527. unsigned long a_Id ,
  1528. WBEM_WSTR a_QueryLanguage ,
  1529. WBEM_WSTR a_Query
  1530. );
  1531. HRESULT STDMETHODCALLTYPE CancelQuery (
  1532. unsigned long a_Id
  1533. ) ;
  1534. /* IWbemEventProviderSecurity */
  1535. HRESULT STDMETHODCALLTYPE AccessCheck (
  1536. WBEM_CWSTR a_QueryLanguage ,
  1537. WBEM_CWSTR a_Query ,
  1538. long a_SidLength ,
  1539. const BYTE *a_Sid
  1540. ) ;
  1541. /* IWbemProviderIdentity */
  1542. HRESULT STDMETHODCALLTYPE SetRegistrationObject (
  1543. long a_Flags ,
  1544. IWbemClassObject *a_ProviderRegistration
  1545. ) ;
  1546. /* IWbemEventConsumerProvider */
  1547. HRESULT STDMETHODCALLTYPE FindConsumer (
  1548. IWbemClassObject *a_LogicalConsumer ,
  1549. IWbemUnboundObjectSink **a_Consumer
  1550. );
  1551. /* IWbemEventConsumerProviderEx */
  1552. HRESULT STDMETHODCALLTYPE ValidateSubscription (
  1553. IWbemClassObject *a_LogicalConsumer
  1554. ) ;
  1555. /* IWbemUnboundObjectSink */
  1556. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  1557. IWbemClassObject *a_LogicalConsumer ,
  1558. long a_ObjectCount ,
  1559. IWbemClassObject **a_Objects
  1560. ) ;
  1561. /* IWbemHiPerfProvider */
  1562. HRESULT STDMETHODCALLTYPE QueryInstances (
  1563. IWbemServices *a_Namespace ,
  1564. WCHAR *a_Class ,
  1565. long a_Flags ,
  1566. IWbemContext *a_Context ,
  1567. IWbemObjectSink *a_Sink
  1568. ) ;
  1569. HRESULT STDMETHODCALLTYPE CreateRefresher (
  1570. IWbemServices *a_Namespace ,
  1571. long a_Flags ,
  1572. IWbemRefresher **a_Refresher
  1573. ) ;
  1574. HRESULT STDMETHODCALLTYPE CreateRefreshableObject (
  1575. IWbemServices *a_Namespace ,
  1576. IWbemObjectAccess *a_Template ,
  1577. IWbemRefresher *a_Refresher ,
  1578. long a_Flags ,
  1579. IWbemContext *a_Context ,
  1580. IWbemObjectAccess **a_Refreshable ,
  1581. long *a_Id
  1582. ) ;
  1583. HRESULT STDMETHODCALLTYPE StopRefreshing (
  1584. IWbemRefresher *a_Refresher ,
  1585. long a_Id ,
  1586. long a_Flags
  1587. ) ;
  1588. HRESULT STDMETHODCALLTYPE CreateRefreshableEnum (
  1589. IWbemServices *a_Namespace ,
  1590. LPCWSTR a_Class ,
  1591. IWbemRefresher *a_Refresher ,
  1592. long a_Flags ,
  1593. IWbemContext *a_Context ,
  1594. IWbemHiPerfEnum *a_HiPerfEnum ,
  1595. long *a_Id
  1596. ) ;
  1597. HRESULT STDMETHODCALLTYPE GetObjects (
  1598. IWbemServices *a_Namespace ,
  1599. long a_ObjectCount ,
  1600. IWbemObjectAccess **a_Objects ,
  1601. long a_Flags ,
  1602. IWbemContext *a_Context
  1603. ) ;
  1604. /* Internal_IWbemServices */
  1605. HRESULT STDMETHODCALLTYPE Internal_OpenNamespace (
  1606. WmiInternalContext a_InternalContext ,
  1607. const BSTR a_Namespace ,
  1608. long a_Flags ,
  1609. IWbemContext *a_Context ,
  1610. IWbemServices **a_Service ,
  1611. IWbemCallResult **a_CallResult
  1612. ) ;
  1613. HRESULT STDMETHODCALLTYPE Internal_CancelAsyncCall (
  1614. WmiInternalContext a_InternalContext ,
  1615. IWbemObjectSink *a_Sink
  1616. ) ;
  1617. HRESULT STDMETHODCALLTYPE Internal_QueryObjectSink (
  1618. WmiInternalContext a_InternalContext ,
  1619. long a_Flags ,
  1620. IWbemObjectSink **a_Sink
  1621. ) ;
  1622. HRESULT STDMETHODCALLTYPE Internal_GetObject (
  1623. WmiInternalContext a_InternalContext ,
  1624. const BSTR a_ObjectPath ,
  1625. long a_Flags ,
  1626. IWbemContext *a_Context ,
  1627. IWbemClassObject **ppObject ,
  1628. IWbemCallResult **a_CallResult
  1629. ) ;
  1630. HRESULT STDMETHODCALLTYPE Internal_GetObjectAsync (
  1631. WmiInternalContext a_InternalContext ,
  1632. const BSTR a_ObjectPath ,
  1633. long a_Flags ,
  1634. IWbemContext *a_Context ,
  1635. IWbemObjectSink *a_Sink
  1636. ) ;
  1637. HRESULT STDMETHODCALLTYPE Internal_PutClass (
  1638. WmiInternalContext a_InternalContext ,
  1639. IWbemClassObject *a_Object ,
  1640. long a_Flags ,
  1641. IWbemContext *a_Context ,
  1642. IWbemCallResult **a_CallResult
  1643. ) ;
  1644. HRESULT STDMETHODCALLTYPE Internal_PutClassAsync (
  1645. WmiInternalContext a_InternalContext ,
  1646. IWbemClassObject *a_Object ,
  1647. long a_Flags ,
  1648. IWbemContext *a_Context ,
  1649. IWbemObjectSink *a_Sink
  1650. ) ;
  1651. HRESULT STDMETHODCALLTYPE Internal_DeleteClass (
  1652. WmiInternalContext a_InternalContext ,
  1653. const BSTR a_Class ,
  1654. long a_Flags ,
  1655. IWbemContext *a_Context ,
  1656. IWbemCallResult **a_CallResult
  1657. ) ;
  1658. HRESULT STDMETHODCALLTYPE Internal_DeleteClassAsync (
  1659. WmiInternalContext a_InternalContext ,
  1660. const BSTR a_Class ,
  1661. long a_Flags ,
  1662. IWbemContext *a_Context ,
  1663. IWbemObjectSink *a_Sink
  1664. ) ;
  1665. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnum (
  1666. WmiInternalContext a_InternalContext ,
  1667. const BSTR a_Superclass ,
  1668. long a_Flags ,
  1669. IWbemContext *a_Context ,
  1670. IEnumWbemClassObject **a_Enum
  1671. ) ;
  1672. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnumAsync (
  1673. WmiInternalContext a_InternalContext ,
  1674. const BSTR a_Superclass ,
  1675. long a_Flags ,
  1676. IWbemContext *a_Context ,
  1677. IWbemObjectSink *a_Sink
  1678. ) ;
  1679. HRESULT STDMETHODCALLTYPE Internal_PutInstance (
  1680. WmiInternalContext a_InternalContext ,
  1681. IWbemClassObject *a_Instance ,
  1682. long a_Flags ,
  1683. IWbemContext *a_Context ,
  1684. IWbemCallResult **a_CallResult
  1685. ) ;
  1686. HRESULT STDMETHODCALLTYPE Internal_PutInstanceAsync (
  1687. WmiInternalContext a_InternalContext ,
  1688. IWbemClassObject *a_Instance ,
  1689. long a_Flags ,
  1690. IWbemContext *a_Context ,
  1691. IWbemObjectSink *a_Sink
  1692. ) ;
  1693. HRESULT STDMETHODCALLTYPE Internal_DeleteInstance (
  1694. WmiInternalContext a_InternalContext ,
  1695. const BSTR a_ObjectPath ,
  1696. long a_Flags ,
  1697. IWbemContext *a_Context ,
  1698. IWbemCallResult **a_CallResult
  1699. ) ;
  1700. HRESULT STDMETHODCALLTYPE Internal_DeleteInstanceAsync (
  1701. WmiInternalContext a_InternalContext ,
  1702. const BSTR a_ObjectPath,
  1703. long a_Flags,
  1704. IWbemContext *a_Context ,
  1705. IWbemObjectSink *a_Sink
  1706. ) ;
  1707. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnum (
  1708. WmiInternalContext a_InternalContext ,
  1709. const BSTR a_Class ,
  1710. long a_Flags ,
  1711. IWbemContext *a_Context ,
  1712. IEnumWbemClassObject **a_Enum
  1713. ) ;
  1714. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnumAsync (
  1715. WmiInternalContext a_InternalContext ,
  1716. const BSTR a_Class ,
  1717. long a_Flags ,
  1718. IWbemContext *a_Context ,
  1719. IWbemObjectSink *a_Sink
  1720. ) ;
  1721. HRESULT STDMETHODCALLTYPE Internal_ExecQuery (
  1722. WmiInternalContext a_InternalContext ,
  1723. const BSTR a_QueryLanguage,
  1724. const BSTR a_Query,
  1725. long a_Flags ,
  1726. IWbemContext *a_Context ,
  1727. IEnumWbemClassObject **a_Enum
  1728. ) ;
  1729. HRESULT STDMETHODCALLTYPE Internal_ExecQueryAsync (
  1730. WmiInternalContext a_InternalContext ,
  1731. const BSTR a_QueryLanguage ,
  1732. const BSTR a_Query ,
  1733. long a_Flags ,
  1734. IWbemContext *a_Context ,
  1735. IWbemObjectSink *a_Sink
  1736. ) ;
  1737. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQuery (
  1738. WmiInternalContext a_InternalContext ,
  1739. const BSTR a_QueryLanguage ,
  1740. const BSTR a_Query ,
  1741. long a_Flags ,
  1742. IWbemContext *a_Context ,
  1743. IEnumWbemClassObject **a_Enum
  1744. ) ;
  1745. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQueryAsync (
  1746. WmiInternalContext a_InternalContext ,
  1747. const BSTR a_QueryLanguage ,
  1748. const BSTR a_Query ,
  1749. long a_Flags ,
  1750. IWbemContext *a_Context ,
  1751. IWbemObjectSink *a_Sink
  1752. ) ;
  1753. HRESULT STDMETHODCALLTYPE Internal_ExecMethod (
  1754. WmiInternalContext a_InternalContext ,
  1755. const BSTR a_ObjectPath ,
  1756. const BSTR a_MethodName ,
  1757. long a_Flags ,
  1758. IWbemContext *a_Context ,
  1759. IWbemClassObject *a_InParams ,
  1760. IWbemClassObject **a_OutParams ,
  1761. IWbemCallResult **a_CallResult
  1762. ) ;
  1763. HRESULT STDMETHODCALLTYPE Internal_ExecMethodAsync (
  1764. WmiInternalContext a_InternalContext ,
  1765. const BSTR a_ObjectPath ,
  1766. const BSTR a_MethodName ,
  1767. long a_Flags ,
  1768. IWbemContext *a_Context ,
  1769. IWbemClassObject *a_InParams ,
  1770. IWbemObjectSink *a_Sink
  1771. ) ;
  1772. /* Internal_IWbemPropertyProvider */
  1773. HRESULT STDMETHODCALLTYPE Internal_GetProperty (
  1774. WmiInternalContext a_InternalContext ,
  1775. long a_Flags ,
  1776. const BSTR a_Locale ,
  1777. const BSTR a_ClassMapping ,
  1778. const BSTR a_InstanceMapping ,
  1779. const BSTR a_PropertyMapping ,
  1780. VARIANT *a_Value
  1781. ) ;
  1782. HRESULT STDMETHODCALLTYPE Internal_PutProperty (
  1783. WmiInternalContext a_InternalContext ,
  1784. long a_Flags ,
  1785. const BSTR a_Locale ,
  1786. const BSTR a_ClassMapping ,
  1787. const BSTR a_InstanceMapping ,
  1788. const BSTR a_PropertyMapping ,
  1789. const VARIANT *a_Value
  1790. ) ;
  1791. /* Internal_IWbemEventProvider */
  1792. HRESULT STDMETHODCALLTYPE Internal_ProvideEvents (
  1793. WmiInternalContext a_InternalContext ,
  1794. IWbemObjectSink *a_Sink ,
  1795. long a_Flags
  1796. ) ;
  1797. /* Internal_IWbemEventProviderQuerySink */
  1798. HRESULT STDMETHODCALLTYPE Internal_NewQuery (
  1799. WmiInternalContext a_InternalContext ,
  1800. unsigned long a_Id ,
  1801. WBEM_WSTR a_QueryLanguage ,
  1802. WBEM_WSTR a_Query
  1803. );
  1804. HRESULT STDMETHODCALLTYPE Internal_CancelQuery (
  1805. WmiInternalContext a_InternalContext ,
  1806. unsigned long a_Id
  1807. ) ;
  1808. /* Internal_IWbemEventProviderSecurity */
  1809. HRESULT STDMETHODCALLTYPE Internal_AccessCheck (
  1810. WmiInternalContext a_InternalContext ,
  1811. WBEM_CWSTR a_QueryLanguage ,
  1812. WBEM_CWSTR a_Query ,
  1813. long a_SidLength ,
  1814. const BYTE *a_Sid
  1815. ) ;
  1816. /* Internal_IWbemEventConsumerProvider */
  1817. HRESULT STDMETHODCALLTYPE Internal_FindConsumer (
  1818. WmiInternalContext a_InternalContext ,
  1819. IWbemClassObject *a_LogicalConsumer ,
  1820. IWbemUnboundObjectSink **a_Consumer
  1821. );
  1822. /* Internal_IWbemEventConsumerProviderEx */
  1823. HRESULT STDMETHODCALLTYPE Internal_ValidateSubscription (
  1824. WmiInternalContext a_InternalContext ,
  1825. IWbemClassObject *a_LogicalConsumer
  1826. ) ;
  1827. /* Internal_IWbemUnboundObjectSink */
  1828. HRESULT STDMETHODCALLTYPE Internal_IndicateToConsumer (
  1829. WmiInternalContext a_InternalContext ,
  1830. IWbemClassObject *a_LogicalConsumer ,
  1831. long a_ObjectCount ,
  1832. IWbemClassObject **a_Objects
  1833. ) ;
  1834. /* _IWmiProviderConfiguration methods */
  1835. HRESULT STDMETHODCALLTYPE Get (
  1836. IWbemServices *a_Service ,
  1837. long a_Flags ,
  1838. IWbemContext *a_Context ,
  1839. LPCWSTR a_Class ,
  1840. LPCWSTR a_Path ,
  1841. IWbemObjectSink *a_Sink
  1842. ) ;
  1843. HRESULT STDMETHODCALLTYPE Set (
  1844. IWbemServices *a_Service ,
  1845. long a_Flags ,
  1846. IWbemContext *a_Context ,
  1847. LPCWSTR a_Provider ,
  1848. LPCWSTR a_Class ,
  1849. LPCWSTR a_Path ,
  1850. IWbemClassObject *a_OldObject ,
  1851. IWbemClassObject *a_NewObject
  1852. ) ;
  1853. HRESULT STDMETHODCALLTYPE Deleted (
  1854. IWbemServices *a_Service ,
  1855. long a_Flags ,
  1856. IWbemContext *a_Context ,
  1857. LPCWSTR a_Provider ,
  1858. LPCWSTR a_Class ,
  1859. LPCWSTR a_Path ,
  1860. IWbemClassObject *a_Object
  1861. ) ;
  1862. HRESULT STDMETHODCALLTYPE Enumerate (
  1863. IWbemServices *a_Service ,
  1864. long a_Flags ,
  1865. IWbemContext *a_Context ,
  1866. LPCWSTR a_Class ,
  1867. IWbemObjectSink *a_Sink
  1868. ) ;
  1869. HRESULT STDMETHODCALLTYPE Shutdown (
  1870. IWbemServices *a_Service ,
  1871. long a_Flags ,
  1872. IWbemContext *a_Context ,
  1873. LPCWSTR a_Provider ,
  1874. ULONG a_MilliSeconds
  1875. ) ;
  1876. HRESULT STDMETHODCALLTYPE Call (
  1877. IWbemServices *a_Service ,
  1878. long a_Flags ,
  1879. IWbemContext *a_Context ,
  1880. LPCWSTR a_Class ,
  1881. LPCWSTR a_Path ,
  1882. LPCWSTR a_Method,
  1883. IWbemClassObject *a_InParams,
  1884. IWbemObjectSink *a_Sink
  1885. ) ;
  1886. HRESULT STDMETHODCALLTYPE Query (
  1887. IWbemServices *a_Service ,
  1888. long a_Flags ,
  1889. IWbemContext *a_Context ,
  1890. WBEM_PROVIDER_CONFIGURATION_CLASS_ID a_ClassIdentifier ,
  1891. WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID a_PropertyIdentifier ,
  1892. VARIANT *a_Value
  1893. ) ;
  1894. HRESULT STDMETHODCALLTYPE ForceReload () ;
  1895. /* Internal_IWmiProviderConfiguration methods */
  1896. HRESULT STDMETHODCALLTYPE Internal_Get (
  1897. WmiInternalContext a_InternalContext ,
  1898. IWbemServices *a_Service ,
  1899. long a_Flags ,
  1900. IWbemContext *a_Context ,
  1901. LPCWSTR a_Class ,
  1902. LPCWSTR a_Path ,
  1903. IWbemObjectSink *a_Sink
  1904. ) ;
  1905. HRESULT STDMETHODCALLTYPE Internal_Set (
  1906. WmiInternalContext a_InternalContext ,
  1907. IWbemServices *a_Service ,
  1908. long a_Flags ,
  1909. IWbemContext *a_Context ,
  1910. LPCWSTR a_Provider ,
  1911. LPCWSTR a_Class ,
  1912. LPCWSTR a_Path ,
  1913. IWbemClassObject *a_OldObject ,
  1914. IWbemClassObject *a_NewObject
  1915. ) ;
  1916. HRESULT STDMETHODCALLTYPE Internal_Deleted (
  1917. WmiInternalContext a_InternalContext ,
  1918. IWbemServices *a_Service ,
  1919. long a_Flags ,
  1920. IWbemContext *a_Context ,
  1921. LPCWSTR a_Provider ,
  1922. LPCWSTR a_Class ,
  1923. LPCWSTR a_Path ,
  1924. IWbemClassObject *a_Object
  1925. ) ;
  1926. HRESULT STDMETHODCALLTYPE Internal_Enumerate (
  1927. WmiInternalContext a_InternalContext ,
  1928. IWbemServices *a_Service ,
  1929. long a_Flags ,
  1930. IWbemContext *a_Context ,
  1931. LPCWSTR a_Class ,
  1932. IWbemObjectSink *a_Sink
  1933. ) ;
  1934. HRESULT STDMETHODCALLTYPE Internal_Shutdown (
  1935. WmiInternalContext a_InternalContext ,
  1936. IWbemServices *a_Service ,
  1937. long a_Flags ,
  1938. IWbemContext *a_Context ,
  1939. LPCWSTR a_Provider ,
  1940. ULONG a_MilliSeconds
  1941. ) ;
  1942. HRESULT STDMETHODCALLTYPE Internal_Call (
  1943. WmiInternalContext a_InternalContext ,
  1944. IWbemServices *a_Service ,
  1945. long a_Flags ,
  1946. IWbemContext *a_Context ,
  1947. LPCWSTR a_Class ,
  1948. LPCWSTR a_Path ,
  1949. LPCWSTR a_Method,
  1950. IWbemClassObject *a_InParams,
  1951. IWbemObjectSink *a_Sink
  1952. ) ;
  1953. HRESULT STDMETHODCALLTYPE Internal_Query (
  1954. WmiInternalContext a_InternalContext ,
  1955. IWbemServices *a_Service ,
  1956. long a_Flags ,
  1957. IWbemContext *a_Context ,
  1958. WBEM_PROVIDER_CONFIGURATION_CLASS_ID a_ClassIdentifier ,
  1959. WBEM_PROVIDER_CONFIGURATION_PROPERTY_ID a_PropertyIdentifier ,
  1960. VARIANT *a_Value
  1961. ) ;
  1962. /* _IWmiProviderQuota */
  1963. HRESULT STDMETHODCALLTYPE Violation (
  1964. long a_Flags ,
  1965. IWbemContext *a_Context ,
  1966. IWbemClassObject *a_Object
  1967. ) ;
  1968. /* _IWmiProviderSite */
  1969. HRESULT STDMETHODCALLTYPE GetSite ( DWORD *a_ProcessIdentifier ) ;
  1970. HRESULT STDMETHODCALLTYPE SetContainer ( IUnknown *a_Container ) ;
  1971. /* IWbemProviderInit methods */
  1972. HRESULT STDMETHODCALLTYPE Initialize (
  1973. LONG a_Flags ,
  1974. IWbemContext *a_Context ,
  1975. GUID *a_TransactionIdentifier,
  1976. LPCWSTR a_User ,
  1977. LPCWSTR a_Locale ,
  1978. LPCWSTR a_Namespace ,
  1979. IWbemServices *a_Repository ,
  1980. IWbemServices *a_Service ,
  1981. IWbemProviderInitSink *a_Sink
  1982. ) ;
  1983. HRESULT STDMETHODCALLTYPE WaitProvider ( IWbemContext *a_Context , ULONG a_Timeout ) ;
  1984. HRESULT STDMETHODCALLTYPE GetInitializeResult ()
  1985. {
  1986. return m_InitializeResult ;
  1987. }
  1988. HRESULT STDMETHODCALLTYPE GetHosting ( ULONG *a_Value )
  1989. {
  1990. return WBEM_E_NOT_AVAILABLE ;
  1991. }
  1992. HRESULT STDMETHODCALLTYPE GetHostingGroup ( BSTR *a_Value )
  1993. {
  1994. return WBEM_E_NOT_AVAILABLE ;
  1995. }
  1996. HRESULT STDMETHODCALLTYPE IsInternal ( BOOL *a_Value )
  1997. {
  1998. return WBEM_E_NOT_AVAILABLE ;
  1999. }
  2000. HRESULT STDMETHODCALLTYPE IsPerUserInitialization ( BOOL *a_Value )
  2001. {
  2002. return WBEM_E_NOT_AVAILABLE ;
  2003. }
  2004. HRESULT STDMETHODCALLTYPE IsPerLocaleInitialization ( BOOL *a_Value )
  2005. {
  2006. return WBEM_E_NOT_AVAILABLE ;
  2007. }
  2008. // IWmi_UnInitialize members
  2009. HRESULT STDMETHODCALLTYPE Shutdown (
  2010. LONG a_Flags ,
  2011. ULONG a_MaxMilliSeconds ,
  2012. IWbemContext *a_Context
  2013. ) ;
  2014. } ;
  2015. /******************************************************************************
  2016. *
  2017. * Name:
  2018. *
  2019. *
  2020. * Description:
  2021. *
  2022. *
  2023. *****************************************************************************/
  2024. class CInterceptor_IWbemDecoupledProvider : public IWbemServices ,
  2025. public IWbemPropertyProvider ,
  2026. public IWbemEventProvider ,
  2027. public IWbemEventProviderQuerySink ,
  2028. public IWbemEventProviderSecurity ,
  2029. public IWbemProviderInit ,
  2030. public IWbemProviderIdentity ,
  2031. public IWbemEventConsumerProviderEx ,
  2032. public IWbemUnboundObjectSink ,
  2033. public IWbemShutdown ,
  2034. public _IWmiProviderInitialize ,
  2035. public _IWmiProviderAbnormalShutdown ,
  2036. public SyncProviderContainerElement ,
  2037. public CWbemGlobal_IWmiObjectSinkController
  2038. {
  2039. private:
  2040. IUnknown *m_Unknown ;
  2041. IWbemServices *m_Provider_IWbemServices ;
  2042. IWbemPropertyProvider *m_Provider_IWbemPropertyProvider ;
  2043. IWbemEventProvider *m_Provider_IWbemEventProvider ;
  2044. IWbemEventProviderQuerySink *m_Provider_IWbemEventProviderQuerySink ;
  2045. IWbemEventProviderSecurity *m_Provider_IWbemEventProviderSecurity ;
  2046. IWbemEventConsumerProvider *m_Provider_IWbemEventConsumerProvider ;
  2047. IWbemEventConsumerProviderEx *m_Provider_IWbemEventConsumerProviderEx ;
  2048. IWbemUnboundObjectSink *m_Provider_IWbemUnboundObjectSink ;
  2049. IWbemProviderInit *m_Provider_IWbemProviderInit ;
  2050. IWbemProviderIdentity *m_Provider_IWbemProviderIdentity ;
  2051. Internal_IWbemServices *m_Provider_Internal_IWbemServices ;
  2052. Internal_IWbemPropertyProvider *m_Provider_Internal_IWbemPropertyProvider ;
  2053. Internal_IWbemEventProvider *m_Provider_Internal_IWbemEventProvider ;
  2054. Internal_IWbemEventProviderQuerySink *m_Provider_Internal_IWbemEventProviderQuerySink ;
  2055. Internal_IWbemEventProviderSecurity *m_Provider_Internal_IWbemEventProviderSecurity ;
  2056. Internal_IWbemEventConsumerProvider *m_Provider_Internal_IWbemEventConsumerProvider ;
  2057. Internal_IWbemEventConsumerProviderEx *m_Provider_Internal_IWbemEventConsumerProviderEx ;
  2058. Internal_IWbemUnboundObjectSink *m_Provider_Internal_IWbemUnboundObjectSink ;
  2059. Internal_IWmiProviderConfiguration *m_Provider_Internal_IWmiProviderConfiguration ;
  2060. Internal_IWbemProviderInit *m_Provider_Internal_IWbemProviderInit ;
  2061. Internal_IWbemProviderIdentity *m_Provider_Internal_IWbemProviderIdentity ;
  2062. IWbemServices *m_CoreStub ;
  2063. IWbemClassObject *m_ExtendedStatusObject ;
  2064. WmiAllocator &m_Allocator ;
  2065. ProxyContainer m_ProxyContainer ;
  2066. LONG m_Initialized ;
  2067. HRESULT m_InitializeResult ;
  2068. HANDLE m_InitializedEvent ;
  2069. IWbemContext *m_InitializationContext ;
  2070. SECURITY_DESCRIPTOR * m_expandedSD;
  2071. DWORD m_ProcessIdentifier ;
  2072. HRESULT Begin_Interface (
  2073. IUnknown *a_ServerInterface ,
  2074. REFIID a_InterfaceIdentifier ,
  2075. DWORD a_ProxyIndex ,
  2076. IUnknown *a_InternalServerInterface ,
  2077. REFIID a_InternalInterfaceIdentifier ,
  2078. DWORD a_InternalProxyIndex ,
  2079. DWORD a_ProcessIdentifier ,
  2080. HANDLE &a_IdentifyToken ,
  2081. BOOL &a_Impersonating ,
  2082. IUnknown *&a_OldContext ,
  2083. IServerSecurity *&a_OldSecurity ,
  2084. BOOL &a_IsProxy ,
  2085. IUnknown *&a_Interface ,
  2086. BOOL &a_Revert ,
  2087. IUnknown *&a_Proxy ,
  2088. IWbemContext *a_Context = NULL
  2089. ) ;
  2090. HRESULT End_Interface (
  2091. IUnknown *a_ServerInterface ,
  2092. REFIID a_InterfaceIdentifier ,
  2093. DWORD a_ProxyIndex ,
  2094. IUnknown *a_InternalServerInterface ,
  2095. REFIID a_InternalInterfaceIdentifier ,
  2096. DWORD a_InternalProxyIndex ,
  2097. DWORD a_ProcessIdentifier ,
  2098. HANDLE a_IdentifyToken ,
  2099. BOOL a_Impersonating ,
  2100. IUnknown *a_OldContext ,
  2101. IServerSecurity *a_OldSecurity ,
  2102. BOOL a_IsProxy ,
  2103. IUnknown *a_Interface ,
  2104. BOOL a_Revert ,
  2105. IUnknown *a_Proxy
  2106. ) ;
  2107. SECURITY_DESCRIPTOR* GetSD(){ if (m_expandedSD) return m_expandedSD; else return m_Registration->GetComRegistration ().GetSecurityDescriptor ();}
  2108. HRESULT AddProcessToSD (DWORD pid, SECURITY_DESCRIPTOR*& sourceSD, SECURITY_DESCRIPTOR* destSD );
  2109. public:
  2110. HRESULT SetInitialized ( HRESULT a_InitializeResult ) ;
  2111. public:
  2112. CServerObject_ProviderRegistrationV1 *m_Registration ;
  2113. BSTR m_Locale ;
  2114. BSTR m_User ;
  2115. BSTR m_Namespace ;
  2116. BSTR m_TransactionIdentifier ;
  2117. UINT64 m_ProviderOperation_GetObjectAsync ;
  2118. UINT64 m_ProviderOperation_PutClassAsync ;
  2119. UINT64 m_ProviderOperation_DeleteClassAsync ;
  2120. UINT64 m_ProviderOperation_CreateClassEnumAsync ;
  2121. UINT64 m_ProviderOperation_PutInstanceAsync ;
  2122. UINT64 m_ProviderOperation_DeleteInstanceAsync ;
  2123. UINT64 m_ProviderOperation_CreateInstanceEnumAsync ;
  2124. UINT64 m_ProviderOperation_ExecQueryAsync ;
  2125. UINT64 m_ProviderOperation_ExecNotificationQueryAsync ;
  2126. UINT64 m_ProviderOperation_ExecMethodAsync ;
  2127. UINT64 m_ProviderOperation_Begin ;
  2128. UINT64 m_ProviderOperation_Rollback ;
  2129. UINT64 m_ProviderOperation_Commit ;
  2130. UINT64 m_ProviderOperation_QueryState ;
  2131. UINT64 m_ProviderOperation_QueryInstances ;
  2132. UINT64 m_ProviderOperation_CreateRefresher ;
  2133. UINT64 m_ProviderOperation_CreateRefreshableObject ;
  2134. UINT64 m_ProviderOperation_StopRefreshing ;
  2135. UINT64 m_ProviderOperation_CreateRefreshableEnum ;
  2136. UINT64 m_ProviderOperation_GetObjects ;
  2137. UINT64 m_ProviderOperation_GetProperty ;
  2138. UINT64 m_ProviderOperation_PutProperty ;
  2139. UINT64 m_ProviderOperation_ProvideEvents ;
  2140. UINT64 m_ProviderOperation_NewQuery ;
  2141. UINT64 m_ProviderOperation_CancelQuery ;
  2142. UINT64 m_ProviderOperation_AccessCheck ;
  2143. UINT64 m_ProviderOperation_SetRegistrationObject ;
  2144. UINT64 m_ProviderOperation_FindConsumer ;
  2145. UINT64 m_ProviderOperation_ValidateSubscription ;
  2146. void Increment_ProviderOperation_GetObjectAsync () { m_ProviderOperation_GetObjectAsync ++ ; }
  2147. void Increment_ProviderOperation_PutClassAsync () { m_ProviderOperation_PutClassAsync ++ ; }
  2148. void Increment_ProviderOperation_DeleteClassAsync () { m_ProviderOperation_DeleteClassAsync ++ ; }
  2149. void Increment_ProviderOperation_CreateClassEnumAsync () { m_ProviderOperation_CreateClassEnumAsync ++ ; }
  2150. void Increment_ProviderOperation_PutInstanceAsync () { m_ProviderOperation_PutInstanceAsync ++ ; }
  2151. void Increment_ProviderOperation_DeleteInstanceAsync () { m_ProviderOperation_DeleteInstanceAsync ++ ; }
  2152. void Increment_ProviderOperation_CreateInstanceEnumAsync () { m_ProviderOperation_CreateInstanceEnumAsync ++ ; }
  2153. void Increment_ProviderOperation_ExecQueryAsync () { m_ProviderOperation_ExecQueryAsync ++ ; }
  2154. void Increment_ProviderOperation_ExecNotificationQueryAsync () { m_ProviderOperation_ExecNotificationQueryAsync ++ ; }
  2155. void Increment_ProviderOperation_ExecMethodAsync () { m_ProviderOperation_ExecMethodAsync ++ ; }
  2156. void Increment_ProviderOperation_Begin () { m_ProviderOperation_Begin ++ ; }
  2157. void Increment_ProviderOperation_Rollback () { m_ProviderOperation_Rollback ++ ; }
  2158. void Increment_ProviderOperation_Commit () { m_ProviderOperation_Commit ++ ; }
  2159. void Increment_ProviderOperation_QueryState () { m_ProviderOperation_QueryState ++ ; }
  2160. void Increment_ProviderOperation_QueryInstances () { m_ProviderOperation_QueryInstances ++ ; }
  2161. void Increment_ProviderOperation_CreateRefresher () { m_ProviderOperation_CreateRefresher ++ ; }
  2162. void Increment_ProviderOperation_CreateRefreshableObject () { m_ProviderOperation_CreateRefreshableObject ++ ; }
  2163. void Increment_ProviderOperation_StopRefreshing () { m_ProviderOperation_StopRefreshing ++ ; }
  2164. void Increment_ProviderOperation_CreateRefreshableEnum () { m_ProviderOperation_CreateRefreshableEnum ++ ; }
  2165. void Increment_ProviderOperation_GetObjects () { m_ProviderOperation_GetObjects ++ ; }
  2166. void Increment_ProviderOperation_GetProperty () { m_ProviderOperation_GetProperty ++ ; }
  2167. void Increment_ProviderOperation_PutProperty () { m_ProviderOperation_PutProperty ++ ; }
  2168. void Increment_ProviderOperation_ProvideEvents () { m_ProviderOperation_ProvideEvents ++ ; }
  2169. void Increment_ProviderOperation_NewQuery () { m_ProviderOperation_NewQuery ++ ; }
  2170. void Increment_ProviderOperation_CancelQuery () { m_ProviderOperation_CancelQuery ++ ; }
  2171. void Increment_ProviderOperation_AccessCheck () { m_ProviderOperation_AccessCheck ++ ; }
  2172. void Increment_ProviderOperation_SetRegistrationObject () { m_ProviderOperation_SetRegistrationObject ++ ; }
  2173. void Increment_ProviderOperation_FindConsumer () { m_ProviderOperation_FindConsumer ++ ; }
  2174. void Increment_ProviderOperation_ValidateSubscription () { m_ProviderOperation_ValidateSubscription ++ ; }
  2175. UINT64 Get_ProviderOperation_GetObjectAsync () { return m_ProviderOperation_GetObjectAsync ; }
  2176. UINT64 Get_ProviderOperation_PutClassAsync () { return m_ProviderOperation_PutClassAsync ; }
  2177. UINT64 Get_ProviderOperation_DeleteClassAsync () { return m_ProviderOperation_DeleteClassAsync ; }
  2178. UINT64 Get_ProviderOperation_CreateClassEnumAsync () { return m_ProviderOperation_CreateClassEnumAsync ; }
  2179. UINT64 Get_ProviderOperation_PutInstanceAsync () { return m_ProviderOperation_PutInstanceAsync ; }
  2180. UINT64 Get_ProviderOperation_DeleteInstanceAsync () { return m_ProviderOperation_DeleteInstanceAsync ; }
  2181. UINT64 Get_ProviderOperation_CreateInstanceEnumAsync () { return m_ProviderOperation_CreateInstanceEnumAsync ; }
  2182. UINT64 Get_ProviderOperation_ExecQueryAsync () { return m_ProviderOperation_ExecQueryAsync ; }
  2183. UINT64 Get_ProviderOperation_ExecNotificationQueryAsync () { return m_ProviderOperation_ExecNotificationQueryAsync ; }
  2184. UINT64 Get_ProviderOperation_ExecMethodAsync () { return m_ProviderOperation_ExecMethodAsync ; }
  2185. UINT64 Get_ProviderOperation_Begin () { return m_ProviderOperation_Begin ; }
  2186. UINT64 Get_ProviderOperation_Rollback () { return m_ProviderOperation_Rollback ; }
  2187. UINT64 Get_ProviderOperation_Commit () { return m_ProviderOperation_Commit ; }
  2188. UINT64 Get_ProviderOperation_QueryState () { return m_ProviderOperation_QueryState ; }
  2189. UINT64 Get_ProviderOperation_QueryInstances () { return m_ProviderOperation_QueryInstances ; }
  2190. UINT64 Get_ProviderOperation_CreateRefresher () { return m_ProviderOperation_CreateRefresher ; }
  2191. UINT64 Get_ProviderOperation_CreateRefreshableObject () { return m_ProviderOperation_CreateRefreshableObject ; }
  2192. UINT64 Get_ProviderOperation_StopRefreshing () { return m_ProviderOperation_StopRefreshing ; }
  2193. UINT64 Get_ProviderOperation_CreateRefreshableEnum () { return m_ProviderOperation_CreateRefreshableEnum ; }
  2194. UINT64 Get_ProviderOperation_GetObjects () { return m_ProviderOperation_GetObjects ; }
  2195. UINT64 Get_ProviderOperation_GetProperty () { return m_ProviderOperation_GetProperty ; }
  2196. UINT64 Get_ProviderOperation_PutProperty () { return m_ProviderOperation_PutProperty ; }
  2197. UINT64 Get_ProviderOperation_ProvideEvents () { return m_ProviderOperation_ProvideEvents ; }
  2198. UINT64 Get_ProviderOperation_NewQuery () { return m_ProviderOperation_NewQuery ; }
  2199. UINT64 Get_ProviderOperation_CancelQuery () { return m_ProviderOperation_CancelQuery ; }
  2200. UINT64 Get_ProviderOperation_AccessCheck () { return m_ProviderOperation_AccessCheck ; }
  2201. UINT64 Get_ProviderOperation_SetRegistrationObject () { return m_ProviderOperation_SetRegistrationObject ; }
  2202. UINT64 Get_ProviderOperation_FindConsumer () { return m_ProviderOperation_FindConsumer ; }
  2203. UINT64 Get_ProviderOperation_ValidateSubscription () { return m_ProviderOperation_ValidateSubscription ; }
  2204. public:
  2205. CInterceptor_IWbemDecoupledProvider (
  2206. WmiAllocator &a_Allocator ,
  2207. IUnknown *a_ServerSideUnknown ,
  2208. IWbemServices *a_CoreStub ,
  2209. CWbemGlobal_IWbemSyncProviderController *a_Controller ,
  2210. IWbemContext *a_InitializationContext ,
  2211. CServerObject_ProviderRegistrationV1 &a_Registration ,
  2212. GUID &a_Guid
  2213. ) ;
  2214. ~CInterceptor_IWbemDecoupledProvider () ;
  2215. public:
  2216. //Non-delegating object IUnknown
  2217. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  2218. STDMETHODIMP_( ULONG ) AddRef () ;
  2219. STDMETHODIMP_( ULONG ) Release () ;
  2220. /* IWbemServices methods */
  2221. HRESULT STDMETHODCALLTYPE OpenNamespace (
  2222. const BSTR a_Namespace ,
  2223. long a_Flags ,
  2224. IWbemContext *a_Context ,
  2225. IWbemServices **a_Service ,
  2226. IWbemCallResult **a_CallResult
  2227. ) ;
  2228. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  2229. IWbemObjectSink *a_Sink
  2230. ) ;
  2231. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  2232. long a_Flags ,
  2233. IWbemObjectSink **a_Sink
  2234. ) ;
  2235. HRESULT STDMETHODCALLTYPE GetObject (
  2236. const BSTR a_ObjectPath ,
  2237. long a_Flags ,
  2238. IWbemContext *a_Context ,
  2239. IWbemClassObject **ppObject ,
  2240. IWbemCallResult **a_CallResult
  2241. ) ;
  2242. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  2243. const BSTR a_ObjectPath ,
  2244. long a_Flags ,
  2245. IWbemContext *a_Context ,
  2246. IWbemObjectSink *a_Sink
  2247. ) ;
  2248. HRESULT STDMETHODCALLTYPE PutClass (
  2249. IWbemClassObject *a_Object ,
  2250. long a_Flags ,
  2251. IWbemContext *a_Context ,
  2252. IWbemCallResult **a_CallResult
  2253. ) ;
  2254. HRESULT STDMETHODCALLTYPE PutClassAsync (
  2255. IWbemClassObject *a_Object ,
  2256. long a_Flags ,
  2257. IWbemContext *a_Context ,
  2258. IWbemObjectSink *a_Sink
  2259. ) ;
  2260. HRESULT STDMETHODCALLTYPE DeleteClass (
  2261. const BSTR a_Class ,
  2262. long a_Flags ,
  2263. IWbemContext *a_Context ,
  2264. IWbemCallResult **a_CallResult
  2265. ) ;
  2266. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  2267. const BSTR a_Class ,
  2268. long a_Flags ,
  2269. IWbemContext *a_Context ,
  2270. IWbemObjectSink *a_Sink
  2271. ) ;
  2272. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  2273. const BSTR a_Superclass ,
  2274. long a_Flags ,
  2275. IWbemContext *a_Context ,
  2276. IEnumWbemClassObject **a_Enum
  2277. ) ;
  2278. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  2279. const BSTR a_Superclass ,
  2280. long a_Flags ,
  2281. IWbemContext *a_Context ,
  2282. IWbemObjectSink *a_Sink
  2283. ) ;
  2284. HRESULT STDMETHODCALLTYPE PutInstance (
  2285. IWbemClassObject *a_Instance ,
  2286. long a_Flags ,
  2287. IWbemContext *a_Context ,
  2288. IWbemCallResult **a_CallResult
  2289. ) ;
  2290. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  2291. IWbemClassObject *a_Instance ,
  2292. long a_Flags ,
  2293. IWbemContext *a_Context ,
  2294. IWbemObjectSink *a_Sink
  2295. ) ;
  2296. HRESULT STDMETHODCALLTYPE DeleteInstance (
  2297. const BSTR a_ObjectPath ,
  2298. long a_Flags ,
  2299. IWbemContext *a_Context ,
  2300. IWbemCallResult **a_CallResult
  2301. ) ;
  2302. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  2303. const BSTR a_ObjectPath,
  2304. long a_Flags,
  2305. IWbemContext *a_Context ,
  2306. IWbemObjectSink *a_Sink
  2307. ) ;
  2308. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  2309. const BSTR a_Class ,
  2310. long a_Flags ,
  2311. IWbemContext *a_Context ,
  2312. IEnumWbemClassObject **a_Enum
  2313. ) ;
  2314. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  2315. const BSTR a_Class ,
  2316. long a_Flags ,
  2317. IWbemContext *a_Context ,
  2318. IWbemObjectSink *a_Sink
  2319. ) ;
  2320. HRESULT STDMETHODCALLTYPE ExecQuery (
  2321. const BSTR a_QueryLanguage,
  2322. const BSTR a_Query,
  2323. long a_Flags ,
  2324. IWbemContext *a_Context ,
  2325. IEnumWbemClassObject **a_Enum
  2326. ) ;
  2327. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  2328. const BSTR a_QueryLanguage ,
  2329. const BSTR a_Query ,
  2330. long a_Flags ,
  2331. IWbemContext *a_Context ,
  2332. IWbemObjectSink *a_Sink
  2333. ) ;
  2334. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  2335. const BSTR a_QueryLanguage ,
  2336. const BSTR a_Query ,
  2337. long a_Flags ,
  2338. IWbemContext *a_Context ,
  2339. IEnumWbemClassObject **a_Enum
  2340. ) ;
  2341. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  2342. const BSTR a_QueryLanguage ,
  2343. const BSTR a_Query ,
  2344. long a_Flags ,
  2345. IWbemContext *a_Context ,
  2346. IWbemObjectSink *a_Sink
  2347. ) ;
  2348. HRESULT STDMETHODCALLTYPE ExecMethod (
  2349. const BSTR a_ObjectPath ,
  2350. const BSTR a_MethodName ,
  2351. long a_Flags ,
  2352. IWbemContext *a_Context ,
  2353. IWbemClassObject *a_InParams ,
  2354. IWbemClassObject **a_OutParams ,
  2355. IWbemCallResult **a_CallResult
  2356. ) ;
  2357. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  2358. const BSTR a_ObjectPath ,
  2359. const BSTR a_MethodName ,
  2360. long a_Flags ,
  2361. IWbemContext *a_Context ,
  2362. IWbemClassObject *a_InParams ,
  2363. IWbemObjectSink *a_Sink
  2364. ) ;
  2365. /* IWbemPropertyProvider */
  2366. HRESULT STDMETHODCALLTYPE GetProperty (
  2367. long a_Flags ,
  2368. const BSTR a_Locale ,
  2369. const BSTR a_ClassMapping ,
  2370. const BSTR a_InstanceMapping ,
  2371. const BSTR a_PropertyMapping ,
  2372. VARIANT *a_Value
  2373. ) ;
  2374. HRESULT STDMETHODCALLTYPE PutProperty (
  2375. long a_Flags ,
  2376. const BSTR a_Locale ,
  2377. const BSTR a_ClassMapping ,
  2378. const BSTR a_InstanceMapping ,
  2379. const BSTR a_PropertyMapping ,
  2380. const VARIANT *a_Value
  2381. ) ;
  2382. /* IWbemEventProvider */
  2383. HRESULT STDMETHODCALLTYPE ProvideEvents (
  2384. IWbemObjectSink *a_Sink ,
  2385. long a_Flags
  2386. ) ;
  2387. /* IWbemEventProviderQuerySink */
  2388. HRESULT STDMETHODCALLTYPE NewQuery (
  2389. unsigned long a_Id ,
  2390. WBEM_WSTR a_QueryLanguage ,
  2391. WBEM_WSTR a_Query
  2392. );
  2393. HRESULT STDMETHODCALLTYPE CancelQuery (
  2394. unsigned long a_Id
  2395. ) ;
  2396. /* IWbemEventProviderSecurity */
  2397. HRESULT STDMETHODCALLTYPE AccessCheck (
  2398. WBEM_CWSTR a_QueryLanguage ,
  2399. WBEM_CWSTR a_Query ,
  2400. long a_SidLength ,
  2401. const BYTE *a_Sid
  2402. ) ;
  2403. /* IWbemProviderIdentity */
  2404. HRESULT STDMETHODCALLTYPE SetRegistrationObject (
  2405. long a_Flags ,
  2406. IWbemClassObject *a_ProviderRegistration
  2407. ) ;
  2408. /* IWbemEventConsumerProvider */
  2409. HRESULT STDMETHODCALLTYPE FindConsumer (
  2410. IWbemClassObject *a_LogicalConsumer ,
  2411. IWbemUnboundObjectSink **a_Consumer
  2412. );
  2413. /* IWbemEventConsumerProviderEx */
  2414. HRESULT STDMETHODCALLTYPE ValidateSubscription (
  2415. IWbemClassObject *a_LogicalConsumer
  2416. ) ;
  2417. /* IWbemUnboundObjectSink */
  2418. HRESULT STDMETHODCALLTYPE IndicateToConsumer (
  2419. IWbemClassObject *a_LogicalConsumer ,
  2420. long a_ObjectCount ,
  2421. IWbemClassObject **a_Objects
  2422. ) ;
  2423. /* IWbemProviderInit methods */
  2424. HRESULT STDMETHODCALLTYPE Initialize (
  2425. LPWSTR a_User ,
  2426. LONG a_Flags ,
  2427. LPWSTR a_Namespace ,
  2428. LPWSTR a_Locale ,
  2429. IWbemServices *a_CoreService ,
  2430. IWbemContext *a_Context ,
  2431. IWbemProviderInitSink *a_Sink
  2432. ) ;
  2433. HRESULT STDMETHODCALLTYPE Initialize (
  2434. LONG a_Flags ,
  2435. IWbemContext *a_Context ,
  2436. GUID *a_TransactionIdentifier,
  2437. LPCWSTR a_User ,
  2438. LPCWSTR a_Locale ,
  2439. LPCWSTR a_Namespace ,
  2440. IWbemServices *a_Repository ,
  2441. IWbemServices *a_Service ,
  2442. IWbemProviderInitSink *a_Sink
  2443. ) ;
  2444. HRESULT STDMETHODCALLTYPE WaitProvider ( IWbemContext *a_Context , ULONG a_Timeout ) ;
  2445. HRESULT STDMETHODCALLTYPE GetInitializeResult ()
  2446. {
  2447. return m_InitializeResult ;
  2448. }
  2449. HRESULT STDMETHODCALLTYPE GetHosting ( ULONG *a_Value )
  2450. {
  2451. return WBEM_E_NOT_AVAILABLE ;
  2452. }
  2453. HRESULT STDMETHODCALLTYPE GetHostingGroup ( BSTR *a_Value )
  2454. {
  2455. return WBEM_E_NOT_AVAILABLE ;
  2456. }
  2457. HRESULT STDMETHODCALLTYPE IsInternal ( BOOL *a_Value )
  2458. {
  2459. return WBEM_E_NOT_AVAILABLE ;
  2460. }
  2461. HRESULT STDMETHODCALLTYPE IsPerUserInitialization ( BOOL *a_Value )
  2462. {
  2463. return WBEM_E_NOT_AVAILABLE ;
  2464. }
  2465. HRESULT STDMETHODCALLTYPE IsPerLocaleInitialization ( BOOL *a_Value )
  2466. {
  2467. return WBEM_E_NOT_AVAILABLE ;
  2468. }
  2469. HRESULT STDMETHODCALLTYPE AbnormalShutdown () ;
  2470. // IWmi_UnInitialize members
  2471. HRESULT STDMETHODCALLTYPE Shutdown (
  2472. LONG a_Flags ,
  2473. ULONG a_MaxMilliSeconds ,
  2474. IWbemContext *a_Context
  2475. ) ;
  2476. } ;
  2477. #endif // _Server_Interceptor_IWbemServices_H