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.

1945 lines
44 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvResv.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_Interceptor_IWbemServices_Stub_H
  9. #define _Server_Interceptor_IWbemServices_Stub_H
  10. #define ProxyIndex_Proxy_IWbemServices 0
  11. #define ProxyIndex_Proxy_IWbemRefreshingServices 1
  12. #define ProxyIndex_Proxy_Internal_IWbemServices 2
  13. #define ProxyIndex_Proxy_Size 3
  14. #define ProxyIndex_EnumProxy_IEnumWbemClassObject 0
  15. #define ProxyIndex_EnumProxy_Internal_IEnumWbemClassObject 1
  16. #define ProxyIndex_EnumProxy_Size 2
  17. /******************************************************************************
  18. *
  19. * Name:
  20. *
  21. *
  22. * Description:
  23. *
  24. *
  25. *****************************************************************************/
  26. class CInterceptor_IWbemServices_Interceptor : public IWbemServices ,
  27. public IWbemRefreshingServices ,
  28. public IWbemShutdown
  29. {
  30. private:
  31. LONG m_ReferenceCount ; //Object reference count
  32. LONG m_GateClosed ;
  33. LONG m_InProgress ;
  34. CriticalSection m_CriticalSection ;
  35. WmiAllocator &m_Allocator ;
  36. IWbemServices *m_Core_IWbemServices ;
  37. IWbemRefreshingServices *m_Core_IWbemRefreshingServices ;
  38. public:
  39. CInterceptor_IWbemServices_Interceptor (
  40. WmiAllocator &a_Allocator ,
  41. IWbemServices *a_Service
  42. ) ;
  43. ~CInterceptor_IWbemServices_Interceptor () ;
  44. public:
  45. //Non-delegating object IUnknown
  46. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  47. STDMETHODIMP_( ULONG ) AddRef () ;
  48. STDMETHODIMP_( ULONG ) Release () ;
  49. /* IWbemServices methods */
  50. HRESULT STDMETHODCALLTYPE OpenNamespace (
  51. const BSTR a_Namespace ,
  52. long a_Flags ,
  53. IWbemContext *a_Context ,
  54. IWbemServices **a_Service ,
  55. IWbemCallResult **a_CallResult
  56. ) ;
  57. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  58. IWbemObjectSink *a_Sink
  59. ) ;
  60. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  61. long a_Flags ,
  62. IWbemObjectSink **a_Sink
  63. ) ;
  64. HRESULT STDMETHODCALLTYPE GetObject (
  65. const BSTR a_ObjectPath ,
  66. long a_Flags ,
  67. IWbemContext *a_Context ,
  68. IWbemClassObject **ppObject ,
  69. IWbemCallResult **a_CallResult
  70. ) ;
  71. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  72. const BSTR a_ObjectPath ,
  73. long a_Flags ,
  74. IWbemContext *a_Context ,
  75. IWbemObjectSink *a_Sink
  76. ) ;
  77. HRESULT STDMETHODCALLTYPE PutClass (
  78. IWbemClassObject *a_Object ,
  79. long a_Flags ,
  80. IWbemContext *a_Context ,
  81. IWbemCallResult **a_CallResult
  82. ) ;
  83. HRESULT STDMETHODCALLTYPE PutClassAsync (
  84. IWbemClassObject *a_Object ,
  85. long a_Flags ,
  86. IWbemContext *a_Context ,
  87. IWbemObjectSink *a_Sink
  88. ) ;
  89. HRESULT STDMETHODCALLTYPE DeleteClass (
  90. const BSTR a_Class ,
  91. long a_Flags ,
  92. IWbemContext *a_Context ,
  93. IWbemCallResult **a_CallResult
  94. ) ;
  95. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  96. const BSTR a_Class ,
  97. long a_Flags ,
  98. IWbemContext *a_Context ,
  99. IWbemObjectSink *a_Sink
  100. ) ;
  101. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  102. const BSTR a_Superclass ,
  103. long a_Flags ,
  104. IWbemContext *a_Context ,
  105. IEnumWbemClassObject **a_Enum
  106. ) ;
  107. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  108. const BSTR a_Superclass ,
  109. long a_Flags ,
  110. IWbemContext *a_Context ,
  111. IWbemObjectSink *a_Sink
  112. ) ;
  113. HRESULT STDMETHODCALLTYPE PutInstance (
  114. IWbemClassObject *a_Instance ,
  115. long a_Flags ,
  116. IWbemContext *a_Context ,
  117. IWbemCallResult **a_CallResult
  118. ) ;
  119. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  120. IWbemClassObject *a_Instance ,
  121. long a_Flags ,
  122. IWbemContext *a_Context ,
  123. IWbemObjectSink *a_Sink
  124. ) ;
  125. HRESULT STDMETHODCALLTYPE DeleteInstance (
  126. const BSTR a_ObjectPath ,
  127. long a_Flags ,
  128. IWbemContext *a_Context ,
  129. IWbemCallResult **a_CallResult
  130. ) ;
  131. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  132. const BSTR a_ObjectPath,
  133. long a_Flags,
  134. IWbemContext *a_Context ,
  135. IWbemObjectSink *a_Sink
  136. ) ;
  137. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  138. const BSTR a_Class ,
  139. long a_Flags ,
  140. IWbemContext *a_Context ,
  141. IEnumWbemClassObject **a_Enum
  142. ) ;
  143. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  144. const BSTR a_Class ,
  145. long a_Flags ,
  146. IWbemContext *a_Context ,
  147. IWbemObjectSink *a_Sink
  148. ) ;
  149. HRESULT STDMETHODCALLTYPE ExecQuery (
  150. const BSTR a_QueryLanguage,
  151. const BSTR a_Query,
  152. long a_Flags ,
  153. IWbemContext *a_Context ,
  154. IEnumWbemClassObject **a_Enum
  155. ) ;
  156. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  157. const BSTR a_QueryLanguage ,
  158. const BSTR a_Query ,
  159. long a_Flags ,
  160. IWbemContext *a_Context ,
  161. IWbemObjectSink *a_Sink
  162. ) ;
  163. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  164. const BSTR a_QueryLanguage ,
  165. const BSTR a_Query ,
  166. long a_Flags ,
  167. IWbemContext *a_Context ,
  168. IEnumWbemClassObject **a_Enum
  169. ) ;
  170. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  171. const BSTR a_QueryLanguage ,
  172. const BSTR a_Query ,
  173. long a_Flags ,
  174. IWbemContext *a_Context ,
  175. IWbemObjectSink *a_Sink
  176. ) ;
  177. HRESULT STDMETHODCALLTYPE ExecMethod (
  178. const BSTR a_ObjectPath ,
  179. const BSTR a_MethodName ,
  180. long a_Flags ,
  181. IWbemContext *a_Context ,
  182. IWbemClassObject *a_InParams ,
  183. IWbemClassObject **a_OutParams ,
  184. IWbemCallResult **a_CallResult
  185. ) ;
  186. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  187. const BSTR a_ObjectPath ,
  188. const BSTR a_MethodName ,
  189. long a_Flags ,
  190. IWbemContext *a_Context ,
  191. IWbemClassObject *a_InParams ,
  192. IWbemObjectSink *a_Sink
  193. ) ;
  194. HRESULT STDMETHODCALLTYPE AddObjectToRefresher (
  195. WBEM_REFRESHER_ID *a_RefresherId ,
  196. LPCWSTR a_Path,
  197. long a_Flags ,
  198. IWbemContext *a_Context,
  199. DWORD a_ClientRefresherVersion ,
  200. WBEM_REFRESH_INFO *a_Information ,
  201. DWORD *a_ServerRefresherVersion
  202. ) ;
  203. HRESULT STDMETHODCALLTYPE AddObjectToRefresherByTemplate (
  204. WBEM_REFRESHER_ID *a_RefresherId ,
  205. IWbemClassObject *a_Template ,
  206. long a_Flags ,
  207. IWbemContext *a_Context ,
  208. DWORD a_ClientRefresherVersion ,
  209. WBEM_REFRESH_INFO *a_Information ,
  210. DWORD *a_ServerRefresherVersion
  211. ) ;
  212. HRESULT STDMETHODCALLTYPE AddEnumToRefresher(
  213. WBEM_REFRESHER_ID *a_RefresherId ,
  214. LPCWSTR a_Class ,
  215. long a_Flags ,
  216. IWbemContext *a_Context,
  217. DWORD a_ClientRefresherVersion ,
  218. WBEM_REFRESH_INFO *a_Information ,
  219. DWORD *a_ServerRefresherVersion
  220. ) ;
  221. HRESULT STDMETHODCALLTYPE RemoveObjectFromRefresher (
  222. WBEM_REFRESHER_ID *a_RefresherId ,
  223. long a_Id ,
  224. long a_Flags ,
  225. DWORD a_ClientRefresherVersion ,
  226. DWORD *a_ServerRefresherVersion
  227. ) ;
  228. HRESULT STDMETHODCALLTYPE GetRemoteRefresher (
  229. WBEM_REFRESHER_ID *a_RefresherId ,
  230. long a_Flags ,
  231. DWORD a_ClientRefresherVersion ,
  232. IWbemRemoteRefresher **a_RemoteRefresher ,
  233. GUID *a_Guid ,
  234. DWORD *a_ServerRefresherVersion
  235. ) ;
  236. HRESULT STDMETHODCALLTYPE ReconnectRemoteRefresher (
  237. WBEM_REFRESHER_ID *a_RefresherId,
  238. long a_Flags,
  239. long a_NumberOfObjects,
  240. DWORD a_ClientRefresherVersion ,
  241. WBEM_RECONNECT_INFO *a_ReconnectInformation ,
  242. WBEM_RECONNECT_RESULTS *a_ReconnectResults ,
  243. DWORD *a_ServerRefresherVersion
  244. ) ;
  245. HRESULT ServiceInitialize () ;
  246. HRESULT STDMETHODCALLTYPE Shutdown (
  247. LONG a_Flags ,
  248. ULONG a_MaxMilliSeconds ,
  249. IWbemContext *a_Context
  250. ) ;
  251. } ;
  252. /******************************************************************************
  253. *
  254. * Name:
  255. *
  256. *
  257. * Description:
  258. *
  259. *
  260. *****************************************************************************/
  261. class CInterceptor_IWbemServices_RestrictingInterceptor : public IWbemServices ,
  262. public IWbemRefreshingServices ,
  263. public IWbemShutdown
  264. {
  265. private:
  266. LONG m_ReferenceCount ; //Object reference count
  267. LONG m_GateClosed ;
  268. LONG m_InProgress ;
  269. CriticalSection m_CriticalSection ;
  270. WmiAllocator &m_Allocator ;
  271. IWbemServices *m_Core_IWbemServices ;
  272. IWbemRefreshingServices *m_Core_IWbemRefreshingServices ;
  273. CServerObject_ProviderRegistrationV1 &m_Registration ;
  274. ProxyContainer m_ProxyContainer ;
  275. private:
  276. HRESULT Begin_IWbemServices (
  277. BOOL &a_Impersonating ,
  278. IUnknown *&a_OldContext ,
  279. IServerSecurity *&a_OldSecurity ,
  280. BOOL &a_IsProxy ,
  281. IWbemServices *&a_Interface ,
  282. BOOL &a_Revert ,
  283. IUnknown *&a_Proxy ,
  284. IWbemContext *a_Context = NULL
  285. ) ;
  286. HRESULT End_IWbemServices (
  287. BOOL a_Impersonating ,
  288. IUnknown *a_OldContext ,
  289. IServerSecurity *a_OldSecurity ,
  290. BOOL a_IsProxy ,
  291. IWbemServices *a_Interface ,
  292. BOOL a_Revert ,
  293. IUnknown *a_Proxy
  294. ) ;
  295. HRESULT Begin_IWbemRefreshingServices (
  296. BOOL &a_Impersonating ,
  297. IUnknown *&a_OldContext ,
  298. IServerSecurity *&a_OldSecurity ,
  299. BOOL &a_IsProxy ,
  300. IWbemRefreshingServices *&a_Interface ,
  301. BOOL &a_Revert ,
  302. IUnknown *&a_Proxy ,
  303. IWbemContext *a_Context = NULL
  304. ) ;
  305. HRESULT End_IWbemRefreshingServices (
  306. BOOL a_Impersonating ,
  307. IUnknown *a_OldContext ,
  308. IServerSecurity *a_OldSecurity ,
  309. BOOL a_IsProxy ,
  310. IWbemRefreshingServices *a_Interface ,
  311. BOOL a_Revert ,
  312. IUnknown *a_Proxy
  313. ) ;
  314. public:
  315. CInterceptor_IWbemServices_RestrictingInterceptor (
  316. WmiAllocator &a_Allocator ,
  317. IWbemServices *a_Service ,
  318. CServerObject_ProviderRegistrationV1 &a_Registration
  319. ) ;
  320. ~CInterceptor_IWbemServices_RestrictingInterceptor () ;
  321. public:
  322. //Non-delegating object IUnknown
  323. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  324. STDMETHODIMP_( ULONG ) AddRef () ;
  325. STDMETHODIMP_( ULONG ) Release () ;
  326. /* IWbemServices methods */
  327. HRESULT STDMETHODCALLTYPE OpenNamespace (
  328. const BSTR a_Namespace ,
  329. long a_Flags ,
  330. IWbemContext *a_Context ,
  331. IWbemServices **a_Service ,
  332. IWbemCallResult **a_CallResult
  333. ) ;
  334. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  335. IWbemObjectSink *a_Sink
  336. ) ;
  337. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  338. long a_Flags ,
  339. IWbemObjectSink **a_Sink
  340. ) ;
  341. HRESULT STDMETHODCALLTYPE GetObject (
  342. const BSTR a_ObjectPath ,
  343. long a_Flags ,
  344. IWbemContext *a_Context ,
  345. IWbemClassObject **ppObject ,
  346. IWbemCallResult **a_CallResult
  347. ) ;
  348. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  349. const BSTR a_ObjectPath ,
  350. long a_Flags ,
  351. IWbemContext *a_Context ,
  352. IWbemObjectSink *a_Sink
  353. ) ;
  354. HRESULT STDMETHODCALLTYPE PutClass (
  355. IWbemClassObject *a_Object ,
  356. long a_Flags ,
  357. IWbemContext *a_Context ,
  358. IWbemCallResult **a_CallResult
  359. ) ;
  360. HRESULT STDMETHODCALLTYPE PutClassAsync (
  361. IWbemClassObject *a_Object ,
  362. long a_Flags ,
  363. IWbemContext *a_Context ,
  364. IWbemObjectSink *a_Sink
  365. ) ;
  366. HRESULT STDMETHODCALLTYPE DeleteClass (
  367. const BSTR a_Class ,
  368. long a_Flags ,
  369. IWbemContext *a_Context ,
  370. IWbemCallResult **a_CallResult
  371. ) ;
  372. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  373. const BSTR a_Class ,
  374. long a_Flags ,
  375. IWbemContext *a_Context ,
  376. IWbemObjectSink *a_Sink
  377. ) ;
  378. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  379. const BSTR a_Superclass ,
  380. long a_Flags ,
  381. IWbemContext *a_Context ,
  382. IEnumWbemClassObject **a_Enum
  383. ) ;
  384. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  385. const BSTR a_Superclass ,
  386. long a_Flags ,
  387. IWbemContext *a_Context ,
  388. IWbemObjectSink *a_Sink
  389. ) ;
  390. HRESULT STDMETHODCALLTYPE PutInstance (
  391. IWbemClassObject *a_Instance ,
  392. long a_Flags ,
  393. IWbemContext *a_Context ,
  394. IWbemCallResult **a_CallResult
  395. ) ;
  396. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  397. IWbemClassObject *a_Instance ,
  398. long a_Flags ,
  399. IWbemContext *a_Context ,
  400. IWbemObjectSink *a_Sink
  401. ) ;
  402. HRESULT STDMETHODCALLTYPE DeleteInstance (
  403. const BSTR a_ObjectPath ,
  404. long a_Flags ,
  405. IWbemContext *a_Context ,
  406. IWbemCallResult **a_CallResult
  407. ) ;
  408. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  409. const BSTR a_ObjectPath,
  410. long a_Flags,
  411. IWbemContext *a_Context ,
  412. IWbemObjectSink *a_Sink
  413. ) ;
  414. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  415. const BSTR a_Class ,
  416. long a_Flags ,
  417. IWbemContext *a_Context ,
  418. IEnumWbemClassObject **a_Enum
  419. ) ;
  420. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  421. const BSTR a_Class ,
  422. long a_Flags ,
  423. IWbemContext *a_Context ,
  424. IWbemObjectSink *a_Sink
  425. ) ;
  426. HRESULT STDMETHODCALLTYPE ExecQuery (
  427. const BSTR a_QueryLanguage,
  428. const BSTR a_Query,
  429. long a_Flags ,
  430. IWbemContext *a_Context ,
  431. IEnumWbemClassObject **a_Enum
  432. ) ;
  433. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  434. const BSTR a_QueryLanguage ,
  435. const BSTR a_Query ,
  436. long a_Flags ,
  437. IWbemContext *a_Context ,
  438. IWbemObjectSink *a_Sink
  439. ) ;
  440. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  441. const BSTR a_QueryLanguage ,
  442. const BSTR a_Query ,
  443. long a_Flags ,
  444. IWbemContext *a_Context ,
  445. IEnumWbemClassObject **a_Enum
  446. ) ;
  447. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  448. const BSTR a_QueryLanguage ,
  449. const BSTR a_Query ,
  450. long a_Flags ,
  451. IWbemContext *a_Context ,
  452. IWbemObjectSink *a_Sink
  453. ) ;
  454. HRESULT STDMETHODCALLTYPE ExecMethod (
  455. const BSTR a_ObjectPath ,
  456. const BSTR a_MethodName ,
  457. long a_Flags ,
  458. IWbemContext *a_Context ,
  459. IWbemClassObject *a_InParams ,
  460. IWbemClassObject **a_OutParams ,
  461. IWbemCallResult **a_CallResult
  462. ) ;
  463. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  464. const BSTR a_ObjectPath ,
  465. const BSTR a_MethodName ,
  466. long a_Flags ,
  467. IWbemContext *a_Context ,
  468. IWbemClassObject *a_InParams ,
  469. IWbemObjectSink *a_Sink
  470. ) ;
  471. HRESULT STDMETHODCALLTYPE AddObjectToRefresher (
  472. WBEM_REFRESHER_ID *a_RefresherId ,
  473. LPCWSTR a_Path,
  474. long a_Flags ,
  475. IWbemContext *a_Context,
  476. DWORD a_ClientRefresherVersion ,
  477. WBEM_REFRESH_INFO *a_Information ,
  478. DWORD *a_ServerRefresherVersion
  479. ) ;
  480. HRESULT STDMETHODCALLTYPE AddObjectToRefresherByTemplate (
  481. WBEM_REFRESHER_ID *a_RefresherId ,
  482. IWbemClassObject *a_Template ,
  483. long a_Flags ,
  484. IWbemContext *a_Context ,
  485. DWORD a_ClientRefresherVersion ,
  486. WBEM_REFRESH_INFO *a_Information ,
  487. DWORD *a_ServerRefresherVersion
  488. ) ;
  489. HRESULT STDMETHODCALLTYPE AddEnumToRefresher(
  490. WBEM_REFRESHER_ID *a_RefresherId ,
  491. LPCWSTR a_Class ,
  492. long a_Flags ,
  493. IWbemContext *a_Context,
  494. DWORD a_ClientRefresherVersion ,
  495. WBEM_REFRESH_INFO *a_Information ,
  496. DWORD *a_ServerRefresherVersion
  497. ) ;
  498. HRESULT STDMETHODCALLTYPE RemoveObjectFromRefresher (
  499. WBEM_REFRESHER_ID *a_RefresherId ,
  500. long a_Id ,
  501. long a_Flags ,
  502. DWORD a_ClientRefresherVersion ,
  503. DWORD *a_ServerRefresherVersion
  504. ) ;
  505. HRESULT STDMETHODCALLTYPE GetRemoteRefresher (
  506. WBEM_REFRESHER_ID *a_RefresherId ,
  507. long a_Flags ,
  508. DWORD a_ClientRefresherVersion ,
  509. IWbemRemoteRefresher **a_RemoteRefresher ,
  510. GUID *a_Guid ,
  511. DWORD *a_ServerRefresherVersion
  512. ) ;
  513. HRESULT STDMETHODCALLTYPE ReconnectRemoteRefresher (
  514. WBEM_REFRESHER_ID *a_RefresherId,
  515. long a_Flags,
  516. long a_NumberOfObjects,
  517. DWORD a_ClientRefresherVersion ,
  518. WBEM_RECONNECT_INFO *a_ReconnectInformation ,
  519. WBEM_RECONNECT_RESULTS *a_ReconnectResults ,
  520. DWORD *a_ServerRefresherVersion
  521. ) ;
  522. HRESULT ServiceInitialize () ;
  523. HRESULT STDMETHODCALLTYPE Shutdown (
  524. LONG a_Flags ,
  525. ULONG a_MaxMilliSeconds ,
  526. IWbemContext *a_Context
  527. ) ;
  528. } ;
  529. #ifdef INTERNAL_IDENTIFY
  530. /******************************************************************************
  531. *
  532. * Name:
  533. *
  534. *
  535. * Description:
  536. *
  537. *
  538. *****************************************************************************/
  539. class CInterceptor_IEnumWbemClassObject_Stub : public IEnumWbemClassObject ,
  540. public IWbemShutdown ,
  541. public Internal_IEnumWbemClassObject ,
  542. public VoidPointerContainerElement ,
  543. public CWbemGlobal_VoidPointerController
  544. {
  545. private:
  546. LONG m_GateClosed ;
  547. LONG m_InProgress ;
  548. WmiAllocator &m_Allocator ;
  549. IEnumWbemClassObject *m_InterceptedEnum ;
  550. protected:
  551. public:
  552. CInterceptor_IEnumWbemClassObject_Stub (
  553. CWbemGlobal_VoidPointerController *a_Controller ,
  554. WmiAllocator &a_Allocator ,
  555. IEnumWbemClassObject *a_InterceptedEnum
  556. ) ;
  557. ~CInterceptor_IEnumWbemClassObject_Stub () ;
  558. HRESULT EnumInitialize () ;
  559. HRESULT Enqueue_IEnumWbemClassObject (
  560. IEnumWbemClassObject *a_Enum ,
  561. IEnumWbemClassObject *&a_Proxy
  562. ) ;
  563. public:
  564. //Non-delegating object IUnknown
  565. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  566. STDMETHODIMP_( ULONG ) AddRef () ;
  567. STDMETHODIMP_( ULONG ) Release () ;
  568. HRESULT STDMETHODCALLTYPE Reset () ;
  569. HRESULT STDMETHODCALLTYPE Next (
  570. long a_Timeout ,
  571. ULONG a_Count ,
  572. IWbemClassObject **a_Objects ,
  573. ULONG *a_Returned
  574. ) ;
  575. HRESULT STDMETHODCALLTYPE NextAsync (
  576. ULONG a_Count,
  577. IWbemObjectSink *a_Sink
  578. ) ;
  579. HRESULT STDMETHODCALLTYPE Clone (
  580. IEnumWbemClassObject **a_Enum
  581. ) ;
  582. HRESULT STDMETHODCALLTYPE Skip (
  583. long a_Timeout,
  584. ULONG a_Count
  585. ) ;
  586. HRESULT STDMETHODCALLTYPE Internal_Reset (
  587. WmiInternalContext a_InternalContext
  588. ) ;
  589. HRESULT STDMETHODCALLTYPE Internal_Next (
  590. WmiInternalContext a_InternalContext ,
  591. long a_Timeout ,
  592. ULONG a_Count ,
  593. IWbemClassObject **a_Objects ,
  594. ULONG *a_Returned
  595. ) ;
  596. HRESULT STDMETHODCALLTYPE Internal_NextAsync (
  597. WmiInternalContext a_InternalContext ,
  598. ULONG a_Count,
  599. IWbemObjectSink *a_Sink
  600. ) ;
  601. HRESULT STDMETHODCALLTYPE Internal_Clone (
  602. WmiInternalContext a_InternalContext ,
  603. IEnumWbemClassObject **a_Enum
  604. ) ;
  605. HRESULT STDMETHODCALLTYPE Internal_Skip (
  606. WmiInternalContext a_InternalContext ,
  607. long a_Timeout,
  608. ULONG a_Count
  609. ) ;
  610. HRESULT STDMETHODCALLTYPE Shutdown (
  611. LONG a_Flags ,
  612. ULONG a_MaxMilliSeconds ,
  613. IWbemContext *a_Context
  614. ) ;
  615. } ;
  616. /******************************************************************************
  617. *
  618. * Name:
  619. *
  620. *
  621. * Description:
  622. *
  623. *
  624. *****************************************************************************/
  625. class CInterceptor_IEnumWbemClassObject_Proxy : public IEnumWbemClassObject ,
  626. public VoidPointerContainerElement ,
  627. public CWbemGlobal_VoidPointerController
  628. {
  629. private:
  630. LONG m_GateClosed ;
  631. LONG m_InProgress ;
  632. WmiAllocator &m_Allocator ;
  633. IEnumWbemClassObject *m_InterceptedEnum ;
  634. Internal_IEnumWbemClassObject *m_Internal_InterceptedEnum ;
  635. ProxyContainer m_ProxyContainer ;
  636. protected:
  637. HRESULT Begin_IEnumWbemClassObject (
  638. DWORD a_ProcessIdentifier ,
  639. HANDLE &a_IdentifyToken ,
  640. BOOL &a_Impersonating ,
  641. IUnknown *&a_OldContext ,
  642. IServerSecurity *&a_OldSecurity ,
  643. BOOL &a_IsProxy ,
  644. IUnknown *&a_Interface ,
  645. BOOL &a_Revert ,
  646. IUnknown *&a_Proxy
  647. ) ;
  648. HRESULT End_IEnumWbemClassObject (
  649. DWORD a_ProcessIdentifier ,
  650. HANDLE a_IdentifyToken ,
  651. BOOL a_Impersonating ,
  652. IUnknown *a_OldContext ,
  653. IServerSecurity *a_OldSecurity ,
  654. BOOL a_IsProxy ,
  655. IUnknown *a_Interface ,
  656. BOOL a_Revert ,
  657. IUnknown *a_Proxy
  658. ) ;
  659. HRESULT Enqueue_IEnumWbemClassObject (
  660. IEnumWbemClassObject *a_Enum ,
  661. IEnumWbemClassObject *&a_Proxy
  662. ) ;
  663. public:
  664. CInterceptor_IEnumWbemClassObject_Proxy (
  665. CWbemGlobal_VoidPointerController *a_Controller ,
  666. WmiAllocator &a_Allocator ,
  667. IEnumWbemClassObject *a_InterceptedEnum
  668. ) ;
  669. ~CInterceptor_IEnumWbemClassObject_Proxy () ;
  670. virtual HRESULT EnumInitialize () ;
  671. //Non-delegating object IUnknown
  672. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  673. STDMETHODIMP_( ULONG ) AddRef () ;
  674. STDMETHODIMP_( ULONG ) Release () ;
  675. HRESULT STDMETHODCALLTYPE Reset () ;
  676. HRESULT STDMETHODCALLTYPE Next (
  677. long a_Timeout ,
  678. ULONG a_Count ,
  679. IWbemClassObject **a_Objects ,
  680. ULONG *a_Returned
  681. ) ;
  682. HRESULT STDMETHODCALLTYPE NextAsync (
  683. ULONG a_Count,
  684. IWbemObjectSink *a_Sink
  685. ) ;
  686. HRESULT STDMETHODCALLTYPE Clone (
  687. IEnumWbemClassObject **a_Enum
  688. ) ;
  689. HRESULT STDMETHODCALLTYPE Skip (
  690. long a_Timeout,
  691. ULONG a_Count
  692. ) ;
  693. HRESULT STDMETHODCALLTYPE Internal_Reset (
  694. WmiInternalContext a_InternalContext
  695. ) ;
  696. HRESULT STDMETHODCALLTYPE Internal_Next (
  697. WmiInternalContext a_InternalContext ,
  698. long a_Timeout ,
  699. ULONG a_Count ,
  700. IWbemClassObject **a_Objects ,
  701. ULONG *a_Returned
  702. ) ;
  703. HRESULT STDMETHODCALLTYPE Internal_NextAsync (
  704. WmiInternalContext a_InternalContext ,
  705. ULONG a_Count,
  706. IWbemObjectSink *a_Sink
  707. ) ;
  708. HRESULT STDMETHODCALLTYPE Internal_Clone (
  709. WmiInternalContext a_InternalContext ,
  710. IEnumWbemClassObject **a_Enum
  711. ) ;
  712. HRESULT STDMETHODCALLTYPE Internal_Skip (
  713. WmiInternalContext a_InternalContext ,
  714. long a_Timeout,
  715. ULONG a_Count
  716. ) ;
  717. HRESULT STDMETHODCALLTYPE Shutdown (
  718. LONG a_Flags ,
  719. ULONG a_MaxMilliSeconds ,
  720. IWbemContext *a_Context
  721. ) ;
  722. } ;
  723. /******************************************************************************
  724. *
  725. * Name:
  726. *
  727. *
  728. * Description:
  729. *
  730. *
  731. *****************************************************************************/
  732. class CInterceptor_IWbemServices_Proxy : public IWbemServices ,
  733. public IWbemRefreshingServices ,
  734. public IWbemShutdown ,
  735. public VoidPointerContainerElement ,
  736. public CWbemGlobal_VoidPointerController
  737. {
  738. private:
  739. LONG m_GateClosed ;
  740. LONG m_InProgress ;
  741. CriticalSection m_CriticalSection ;
  742. WmiAllocator &m_Allocator ;
  743. CServerObject_ProviderRegistrationV1 &m_Registration ;
  744. IWbemServices *m_Core_IWbemServices ;
  745. IWbemRefreshingServices *m_Core_IWbemRefreshingServices ;
  746. Internal_IWbemServices *m_Core_Internal_IWbemServices ;
  747. ProxyContainer m_ProxyContainer ;
  748. HRESULT Begin_IWbemServices (
  749. DWORD a_ProcessIdentifier ,
  750. HANDLE &a_IdentifyToken ,
  751. BOOL &a_Impersonating ,
  752. IUnknown *&a_OldContext ,
  753. IServerSecurity *&a_OldSecurity ,
  754. BOOL &a_IsProxy ,
  755. IUnknown *&a_Interface ,
  756. BOOL &a_Revert ,
  757. IUnknown *&a_Proxy
  758. ) ;
  759. HRESULT End_IWbemServices (
  760. DWORD a_ProcessIdentifier ,
  761. HANDLE a_IdentifyToken ,
  762. BOOL a_Impersonating ,
  763. IUnknown *a_OldContext ,
  764. IServerSecurity *a_OldSecurity ,
  765. BOOL a_IsProxy ,
  766. IUnknown *a_Interface ,
  767. BOOL a_Revert ,
  768. IUnknown *a_Proxy
  769. ) ;
  770. HRESULT Begin_IWbemRefreshingServices (
  771. BOOL &a_Impersonating ,
  772. IUnknown *&a_OldContext ,
  773. IServerSecurity *&a_OldSecurity ,
  774. BOOL &a_IsProxy ,
  775. IWbemRefreshingServices *&a_Interface ,
  776. BOOL &a_Revert ,
  777. IUnknown *&a_Proxy ,
  778. IWbemContext *a_Context = NULL
  779. ) ;
  780. HRESULT End_IWbemRefreshingServices (
  781. BOOL a_Impersonating ,
  782. IUnknown *a_OldContext ,
  783. IServerSecurity *a_OldSecurity ,
  784. BOOL a_IsProxy ,
  785. IWbemRefreshingServices *a_Interface ,
  786. BOOL a_Revert ,
  787. IUnknown *a_Proxy
  788. ) ;
  789. HRESULT Enqueue_IWbemServices (
  790. IWbemServices *a_Service ,
  791. IWbemServices *&a_Proxy
  792. ) ;
  793. HRESULT Enqueue_IEnumWbemClassObject (
  794. IEnumWbemClassObject *a_Enum ,
  795. IEnumWbemClassObject *&a_Proxy
  796. ) ;
  797. public:
  798. CInterceptor_IWbemServices_Proxy (
  799. CWbemGlobal_VoidPointerController *a_Controller ,
  800. WmiAllocator &a_Allocator ,
  801. IWbemServices *a_Service ,
  802. CServerObject_ProviderRegistrationV1 &a_Registration
  803. ) ;
  804. ~CInterceptor_IWbemServices_Proxy () ;
  805. public:
  806. //Non-delegating object IUnknown
  807. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  808. STDMETHODIMP_( ULONG ) AddRef () ;
  809. STDMETHODIMP_( ULONG ) Release () ;
  810. /* IWbemServices methods */
  811. HRESULT STDMETHODCALLTYPE OpenNamespace (
  812. const BSTR a_Namespace ,
  813. long a_Flags ,
  814. IWbemContext *a_Context ,
  815. IWbemServices **a_Service ,
  816. IWbemCallResult **a_CallResult
  817. ) ;
  818. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  819. IWbemObjectSink *a_Sink
  820. ) ;
  821. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  822. long a_Flags ,
  823. IWbemObjectSink **a_Sink
  824. ) ;
  825. HRESULT STDMETHODCALLTYPE GetObject (
  826. const BSTR a_ObjectPath ,
  827. long a_Flags ,
  828. IWbemContext *a_Context ,
  829. IWbemClassObject **ppObject ,
  830. IWbemCallResult **a_CallResult
  831. ) ;
  832. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  833. const BSTR a_ObjectPath ,
  834. long a_Flags ,
  835. IWbemContext *a_Context ,
  836. IWbemObjectSink *a_Sink
  837. ) ;
  838. HRESULT STDMETHODCALLTYPE PutClass (
  839. IWbemClassObject *a_Object ,
  840. long a_Flags ,
  841. IWbemContext *a_Context ,
  842. IWbemCallResult **a_CallResult
  843. ) ;
  844. HRESULT STDMETHODCALLTYPE PutClassAsync (
  845. IWbemClassObject *a_Object ,
  846. long a_Flags ,
  847. IWbemContext *a_Context ,
  848. IWbemObjectSink *a_Sink
  849. ) ;
  850. HRESULT STDMETHODCALLTYPE DeleteClass (
  851. const BSTR a_Class ,
  852. long a_Flags ,
  853. IWbemContext *a_Context ,
  854. IWbemCallResult **a_CallResult
  855. ) ;
  856. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  857. const BSTR a_Class ,
  858. long a_Flags ,
  859. IWbemContext *a_Context ,
  860. IWbemObjectSink *a_Sink
  861. ) ;
  862. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  863. const BSTR a_Superclass ,
  864. long a_Flags ,
  865. IWbemContext *a_Context ,
  866. IEnumWbemClassObject **a_Enum
  867. ) ;
  868. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  869. const BSTR a_Superclass ,
  870. long a_Flags ,
  871. IWbemContext *a_Context ,
  872. IWbemObjectSink *a_Sink
  873. ) ;
  874. HRESULT STDMETHODCALLTYPE PutInstance (
  875. IWbemClassObject *a_Instance ,
  876. long a_Flags ,
  877. IWbemContext *a_Context ,
  878. IWbemCallResult **a_CallResult
  879. ) ;
  880. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  881. IWbemClassObject *a_Instance ,
  882. long a_Flags ,
  883. IWbemContext *a_Context ,
  884. IWbemObjectSink *a_Sink
  885. ) ;
  886. HRESULT STDMETHODCALLTYPE DeleteInstance (
  887. const BSTR a_ObjectPath ,
  888. long a_Flags ,
  889. IWbemContext *a_Context ,
  890. IWbemCallResult **a_CallResult
  891. ) ;
  892. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  893. const BSTR a_ObjectPath,
  894. long a_Flags,
  895. IWbemContext *a_Context ,
  896. IWbemObjectSink *a_Sink
  897. ) ;
  898. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  899. const BSTR a_Class ,
  900. long a_Flags ,
  901. IWbemContext *a_Context ,
  902. IEnumWbemClassObject **a_Enum
  903. ) ;
  904. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  905. const BSTR a_Class ,
  906. long a_Flags ,
  907. IWbemContext *a_Context ,
  908. IWbemObjectSink *a_Sink
  909. ) ;
  910. HRESULT STDMETHODCALLTYPE ExecQuery (
  911. const BSTR a_QueryLanguage,
  912. const BSTR a_Query,
  913. long a_Flags ,
  914. IWbemContext *a_Context ,
  915. IEnumWbemClassObject **a_Enum
  916. ) ;
  917. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  918. const BSTR a_QueryLanguage ,
  919. const BSTR a_Query ,
  920. long a_Flags ,
  921. IWbemContext *a_Context ,
  922. IWbemObjectSink *a_Sink
  923. ) ;
  924. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  925. const BSTR a_QueryLanguage ,
  926. const BSTR a_Query ,
  927. long a_Flags ,
  928. IWbemContext *a_Context ,
  929. IEnumWbemClassObject **a_Enum
  930. ) ;
  931. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  932. const BSTR a_QueryLanguage ,
  933. const BSTR a_Query ,
  934. long a_Flags ,
  935. IWbemContext *a_Context ,
  936. IWbemObjectSink *a_Sink
  937. ) ;
  938. HRESULT STDMETHODCALLTYPE ExecMethod (
  939. const BSTR a_ObjectPath ,
  940. const BSTR a_MethodName ,
  941. long a_Flags ,
  942. IWbemContext *a_Context ,
  943. IWbemClassObject *a_InParams ,
  944. IWbemClassObject **a_OutParams ,
  945. IWbemCallResult **a_CallResult
  946. ) ;
  947. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  948. const BSTR a_ObjectPath ,
  949. const BSTR a_MethodName ,
  950. long a_Flags ,
  951. IWbemContext *a_Context ,
  952. IWbemClassObject *a_InParams ,
  953. IWbemObjectSink *a_Sink
  954. ) ;
  955. HRESULT STDMETHODCALLTYPE AddObjectToRefresher (
  956. WBEM_REFRESHER_ID *a_RefresherId ,
  957. LPCWSTR a_Path,
  958. long a_Flags ,
  959. IWbemContext *a_Context,
  960. DWORD a_ClientRefresherVersion ,
  961. WBEM_REFRESH_INFO *a_Information ,
  962. DWORD *a_ServerRefresherVersion
  963. ) ;
  964. HRESULT STDMETHODCALLTYPE AddObjectToRefresherByTemplate (
  965. WBEM_REFRESHER_ID *a_RefresherId ,
  966. IWbemClassObject *a_Template ,
  967. long a_Flags ,
  968. IWbemContext *a_Context ,
  969. DWORD a_ClientRefresherVersion ,
  970. WBEM_REFRESH_INFO *a_Information ,
  971. DWORD *a_ServerRefresherVersion
  972. ) ;
  973. HRESULT STDMETHODCALLTYPE AddEnumToRefresher(
  974. WBEM_REFRESHER_ID *a_RefresherId ,
  975. LPCWSTR a_Class ,
  976. long a_Flags ,
  977. IWbemContext *a_Context,
  978. DWORD a_ClientRefresherVersion ,
  979. WBEM_REFRESH_INFO *a_Information ,
  980. DWORD *a_ServerRefresherVersion
  981. ) ;
  982. HRESULT STDMETHODCALLTYPE RemoveObjectFromRefresher (
  983. WBEM_REFRESHER_ID *a_RefresherId ,
  984. long a_Id ,
  985. long a_Flags ,
  986. DWORD a_ClientRefresherVersion ,
  987. DWORD *a_ServerRefresherVersion
  988. ) ;
  989. HRESULT STDMETHODCALLTYPE GetRemoteRefresher (
  990. WBEM_REFRESHER_ID *a_RefresherId ,
  991. long a_Flags ,
  992. DWORD a_ClientRefresherVersion ,
  993. IWbemRemoteRefresher **a_RemoteRefresher ,
  994. GUID *a_Guid ,
  995. DWORD *a_ServerRefresherVersion
  996. ) ;
  997. HRESULT STDMETHODCALLTYPE ReconnectRemoteRefresher (
  998. WBEM_REFRESHER_ID *a_RefresherId,
  999. long a_Flags,
  1000. long a_NumberOfObjects,
  1001. DWORD a_ClientRefresherVersion ,
  1002. WBEM_RECONNECT_INFO *a_ReconnectInformation ,
  1003. WBEM_RECONNECT_RESULTS *a_ReconnectResults ,
  1004. DWORD *a_ServerRefresherVersion
  1005. ) ;
  1006. HRESULT ServiceInitialize () ;
  1007. HRESULT STDMETHODCALLTYPE Shutdown (
  1008. LONG a_Flags ,
  1009. ULONG a_MaxMilliSeconds ,
  1010. IWbemContext *a_Context
  1011. ) ;
  1012. } ;
  1013. /******************************************************************************
  1014. *
  1015. * Name:
  1016. *
  1017. *
  1018. * Description:
  1019. *
  1020. *
  1021. *****************************************************************************/
  1022. class CInterceptor_IWbemServices_Stub : public IWbemServices ,
  1023. public IWbemRefreshingServices ,
  1024. public IWbemShutdown ,
  1025. public Internal_IWbemServices ,
  1026. public VoidPointerContainerElement ,
  1027. public CWbemGlobal_VoidPointerController
  1028. {
  1029. private:
  1030. LONG m_GateClosed ;
  1031. LONG m_InProgress ;
  1032. BOOL m_InterceptCallContext ;
  1033. CriticalSection m_CriticalSection ;
  1034. WmiAllocator &m_Allocator ;
  1035. IWbemServices *m_Core_IWbemServices ;
  1036. IWbemRefreshingServices *m_Core_IWbemRefreshingServices ;
  1037. HRESULT Begin_IWbemServices (
  1038. BOOL &a_Impersonating ,
  1039. IUnknown *&a_OldContext ,
  1040. IServerSecurity *&a_OldSecurity ,
  1041. BOOL &a_IsProxy ,
  1042. IWbemServices *&a_Interface ,
  1043. BOOL &a_Revert ,
  1044. IUnknown *&a_Proxy ,
  1045. IWbemContext *a_Context = NULL
  1046. ) ;
  1047. HRESULT End_IWbemServices (
  1048. BOOL a_Impersonating ,
  1049. IUnknown *a_OldContext ,
  1050. IServerSecurity *a_OldSecurity ,
  1051. BOOL a_IsProxy ,
  1052. IWbemServices *a_Interface ,
  1053. BOOL a_Revert ,
  1054. IUnknown *a_Proxy
  1055. ) ;
  1056. HRESULT Begin_IWbemRefreshingServices (
  1057. BOOL &a_Impersonating ,
  1058. IUnknown *&a_OldContext ,
  1059. IServerSecurity *&a_OldSecurity ,
  1060. BOOL &a_IsProxy ,
  1061. IWbemRefreshingServices *&a_Interface ,
  1062. BOOL &a_Revert ,
  1063. IUnknown *&a_Proxy ,
  1064. IWbemContext *a_Context = NULL
  1065. ) ;
  1066. HRESULT End_IWbemRefreshingServices (
  1067. BOOL a_Impersonating ,
  1068. IUnknown *a_OldContext ,
  1069. IServerSecurity *a_OldSecurity ,
  1070. BOOL a_IsProxy ,
  1071. IWbemRefreshingServices *a_Interface ,
  1072. BOOL a_Revert ,
  1073. IUnknown *a_Proxy
  1074. ) ;
  1075. HRESULT Enqueue_IWbemServices (
  1076. IWbemServices *a_Service ,
  1077. IWbemServices *&a_Stub
  1078. ) ;
  1079. HRESULT Enqueue_IEnumWbemClassObject (
  1080. IEnumWbemClassObject *a_Enum ,
  1081. IEnumWbemClassObject *&a_Stub
  1082. ) ;
  1083. public:
  1084. CInterceptor_IWbemServices_Stub (
  1085. CWbemGlobal_VoidPointerController *a_Controller ,
  1086. WmiAllocator &a_Allocator ,
  1087. IWbemServices *a_Service
  1088. ) ;
  1089. ~CInterceptor_IWbemServices_Stub () ;
  1090. public:
  1091. //Non-delegating object IUnknown
  1092. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  1093. STDMETHODIMP_( ULONG ) AddRef () ;
  1094. STDMETHODIMP_( ULONG ) Release () ;
  1095. /* IWbemServices methods */
  1096. HRESULT STDMETHODCALLTYPE OpenNamespace (
  1097. const BSTR a_Namespace ,
  1098. long a_Flags ,
  1099. IWbemContext *a_Context ,
  1100. IWbemServices **a_Service ,
  1101. IWbemCallResult **a_CallResult
  1102. ) ;
  1103. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  1104. IWbemObjectSink *a_Sink
  1105. ) ;
  1106. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  1107. long a_Flags ,
  1108. IWbemObjectSink **a_Sink
  1109. ) ;
  1110. HRESULT STDMETHODCALLTYPE GetObject (
  1111. const BSTR a_ObjectPath ,
  1112. long a_Flags ,
  1113. IWbemContext *a_Context ,
  1114. IWbemClassObject **ppObject ,
  1115. IWbemCallResult **a_CallResult
  1116. ) ;
  1117. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  1118. const BSTR a_ObjectPath ,
  1119. long a_Flags ,
  1120. IWbemContext *a_Context ,
  1121. IWbemObjectSink *a_Sink
  1122. ) ;
  1123. HRESULT STDMETHODCALLTYPE PutClass (
  1124. IWbemClassObject *a_Object ,
  1125. long a_Flags ,
  1126. IWbemContext *a_Context ,
  1127. IWbemCallResult **a_CallResult
  1128. ) ;
  1129. HRESULT STDMETHODCALLTYPE PutClassAsync (
  1130. IWbemClassObject *a_Object ,
  1131. long a_Flags ,
  1132. IWbemContext *a_Context ,
  1133. IWbemObjectSink *a_Sink
  1134. ) ;
  1135. HRESULT STDMETHODCALLTYPE DeleteClass (
  1136. const BSTR a_Class ,
  1137. long a_Flags ,
  1138. IWbemContext *a_Context ,
  1139. IWbemCallResult **a_CallResult
  1140. ) ;
  1141. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  1142. const BSTR a_Class ,
  1143. long a_Flags ,
  1144. IWbemContext *a_Context ,
  1145. IWbemObjectSink *a_Sink
  1146. ) ;
  1147. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  1148. const BSTR a_Superclass ,
  1149. long a_Flags ,
  1150. IWbemContext *a_Context ,
  1151. IEnumWbemClassObject **a_Enum
  1152. ) ;
  1153. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  1154. const BSTR a_Superclass ,
  1155. long a_Flags ,
  1156. IWbemContext *a_Context ,
  1157. IWbemObjectSink *a_Sink
  1158. ) ;
  1159. HRESULT STDMETHODCALLTYPE PutInstance (
  1160. IWbemClassObject *a_Instance ,
  1161. long a_Flags ,
  1162. IWbemContext *a_Context ,
  1163. IWbemCallResult **a_CallResult
  1164. ) ;
  1165. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  1166. IWbemClassObject *a_Instance ,
  1167. long a_Flags ,
  1168. IWbemContext *a_Context ,
  1169. IWbemObjectSink *a_Sink
  1170. ) ;
  1171. HRESULT STDMETHODCALLTYPE DeleteInstance (
  1172. const BSTR a_ObjectPath ,
  1173. long a_Flags ,
  1174. IWbemContext *a_Context ,
  1175. IWbemCallResult **a_CallResult
  1176. ) ;
  1177. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  1178. const BSTR a_ObjectPath,
  1179. long a_Flags,
  1180. IWbemContext *a_Context ,
  1181. IWbemObjectSink *a_Sink
  1182. ) ;
  1183. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  1184. const BSTR a_Class ,
  1185. long a_Flags ,
  1186. IWbemContext *a_Context ,
  1187. IEnumWbemClassObject **a_Enum
  1188. ) ;
  1189. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  1190. const BSTR a_Class ,
  1191. long a_Flags ,
  1192. IWbemContext *a_Context ,
  1193. IWbemObjectSink *a_Sink
  1194. ) ;
  1195. HRESULT STDMETHODCALLTYPE ExecQuery (
  1196. const BSTR a_QueryLanguage,
  1197. const BSTR a_Query,
  1198. long a_Flags ,
  1199. IWbemContext *a_Context ,
  1200. IEnumWbemClassObject **a_Enum
  1201. ) ;
  1202. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  1203. const BSTR a_QueryLanguage ,
  1204. const BSTR a_Query ,
  1205. long a_Flags ,
  1206. IWbemContext *a_Context ,
  1207. IWbemObjectSink *a_Sink
  1208. ) ;
  1209. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  1210. const BSTR a_QueryLanguage ,
  1211. const BSTR a_Query ,
  1212. long a_Flags ,
  1213. IWbemContext *a_Context ,
  1214. IEnumWbemClassObject **a_Enum
  1215. ) ;
  1216. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  1217. const BSTR a_QueryLanguage ,
  1218. const BSTR a_Query ,
  1219. long a_Flags ,
  1220. IWbemContext *a_Context ,
  1221. IWbemObjectSink *a_Sink
  1222. ) ;
  1223. HRESULT STDMETHODCALLTYPE ExecMethod (
  1224. const BSTR a_ObjectPath ,
  1225. const BSTR a_MethodName ,
  1226. long a_Flags ,
  1227. IWbemContext *a_Context ,
  1228. IWbemClassObject *a_InParams ,
  1229. IWbemClassObject **a_OutParams ,
  1230. IWbemCallResult **a_CallResult
  1231. ) ;
  1232. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  1233. const BSTR a_ObjectPath ,
  1234. const BSTR a_MethodName ,
  1235. long a_Flags ,
  1236. IWbemContext *a_Context ,
  1237. IWbemClassObject *a_InParams ,
  1238. IWbemObjectSink *a_Sink
  1239. ) ;
  1240. HRESULT STDMETHODCALLTYPE AddObjectToRefresher (
  1241. WBEM_REFRESHER_ID *a_RefresherId ,
  1242. LPCWSTR a_Path,
  1243. long a_Flags ,
  1244. IWbemContext *a_Context,
  1245. DWORD a_ClientRefresherVersion ,
  1246. WBEM_REFRESH_INFO *a_Information ,
  1247. DWORD *a_ServerRefresherVersion
  1248. ) ;
  1249. HRESULT STDMETHODCALLTYPE AddObjectToRefresherByTemplate (
  1250. WBEM_REFRESHER_ID *a_RefresherId ,
  1251. IWbemClassObject *a_Template ,
  1252. long a_Flags ,
  1253. IWbemContext *a_Context ,
  1254. DWORD a_ClientRefresherVersion ,
  1255. WBEM_REFRESH_INFO *a_Information ,
  1256. DWORD *a_ServerRefresherVersion
  1257. ) ;
  1258. HRESULT STDMETHODCALLTYPE AddEnumToRefresher(
  1259. WBEM_REFRESHER_ID *a_RefresherId ,
  1260. LPCWSTR a_Class ,
  1261. long a_Flags ,
  1262. IWbemContext *a_Context,
  1263. DWORD a_ClientRefresherVersion ,
  1264. WBEM_REFRESH_INFO *a_Information ,
  1265. DWORD *a_ServerRefresherVersion
  1266. ) ;
  1267. HRESULT STDMETHODCALLTYPE RemoveObjectFromRefresher (
  1268. WBEM_REFRESHER_ID *a_RefresherId ,
  1269. long a_Id ,
  1270. long a_Flags ,
  1271. DWORD a_ClientRefresherVersion ,
  1272. DWORD *a_ServerRefresherVersion
  1273. ) ;
  1274. HRESULT STDMETHODCALLTYPE GetRemoteRefresher (
  1275. WBEM_REFRESHER_ID *a_RefresherId ,
  1276. long a_Flags ,
  1277. DWORD a_ClientRefresherVersion ,
  1278. IWbemRemoteRefresher **a_RemoteRefresher ,
  1279. GUID *a_Guid ,
  1280. DWORD *a_ServerRefresherVersion
  1281. ) ;
  1282. HRESULT STDMETHODCALLTYPE ReconnectRemoteRefresher (
  1283. WBEM_REFRESHER_ID *a_RefresherId,
  1284. long a_Flags,
  1285. long a_NumberOfObjects,
  1286. DWORD a_ClientRefresherVersion ,
  1287. WBEM_RECONNECT_INFO *a_ReconnectInformation ,
  1288. WBEM_RECONNECT_RESULTS *a_ReconnectResults ,
  1289. DWORD *a_ServerRefresherVersion
  1290. ) ;
  1291. HRESULT ServiceInitialize () ;
  1292. HRESULT STDMETHODCALLTYPE Shutdown (
  1293. LONG a_Flags ,
  1294. ULONG a_MaxMilliSeconds ,
  1295. IWbemContext *a_Context
  1296. ) ;
  1297. /* Internal_IWbemServices */
  1298. HRESULT STDMETHODCALLTYPE Internal_OpenNamespace (
  1299. WmiInternalContext a_InternalContext ,
  1300. const BSTR a_Namespace ,
  1301. long a_Flags ,
  1302. IWbemContext *a_Context ,
  1303. IWbemServices **a_Service ,
  1304. IWbemCallResult **a_CallResult
  1305. ) ;
  1306. HRESULT STDMETHODCALLTYPE Internal_CancelAsyncCall (
  1307. WmiInternalContext a_InternalContext ,
  1308. IWbemObjectSink *a_Sink
  1309. ) ;
  1310. HRESULT STDMETHODCALLTYPE Internal_QueryObjectSink (
  1311. WmiInternalContext a_InternalContext ,
  1312. long a_Flags ,
  1313. IWbemObjectSink **a_Sink
  1314. ) ;
  1315. HRESULT STDMETHODCALLTYPE Internal_GetObject (
  1316. WmiInternalContext a_InternalContext ,
  1317. const BSTR a_ObjectPath ,
  1318. long a_Flags ,
  1319. IWbemContext *a_Context ,
  1320. IWbemClassObject **ppObject ,
  1321. IWbemCallResult **a_CallResult
  1322. ) ;
  1323. HRESULT STDMETHODCALLTYPE Internal_GetObjectAsync (
  1324. WmiInternalContext a_InternalContext ,
  1325. const BSTR a_ObjectPath ,
  1326. long a_Flags ,
  1327. IWbemContext *a_Context ,
  1328. IWbemObjectSink *a_Sink
  1329. ) ;
  1330. HRESULT STDMETHODCALLTYPE Internal_PutClass (
  1331. WmiInternalContext a_InternalContext ,
  1332. IWbemClassObject *a_Object ,
  1333. long a_Flags ,
  1334. IWbemContext *a_Context ,
  1335. IWbemCallResult **a_CallResult
  1336. ) ;
  1337. HRESULT STDMETHODCALLTYPE Internal_PutClassAsync (
  1338. WmiInternalContext a_InternalContext ,
  1339. IWbemClassObject *a_Object ,
  1340. long a_Flags ,
  1341. IWbemContext *a_Context ,
  1342. IWbemObjectSink *a_Sink
  1343. ) ;
  1344. HRESULT STDMETHODCALLTYPE Internal_DeleteClass (
  1345. WmiInternalContext a_InternalContext ,
  1346. const BSTR a_Class ,
  1347. long a_Flags ,
  1348. IWbemContext *a_Context ,
  1349. IWbemCallResult **a_CallResult
  1350. ) ;
  1351. HRESULT STDMETHODCALLTYPE Internal_DeleteClassAsync (
  1352. WmiInternalContext a_InternalContext ,
  1353. const BSTR a_Class ,
  1354. long a_Flags ,
  1355. IWbemContext *a_Context ,
  1356. IWbemObjectSink *a_Sink
  1357. ) ;
  1358. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnum (
  1359. WmiInternalContext a_InternalContext ,
  1360. const BSTR a_Superclass ,
  1361. long a_Flags ,
  1362. IWbemContext *a_Context ,
  1363. IEnumWbemClassObject **a_Enum
  1364. ) ;
  1365. HRESULT STDMETHODCALLTYPE Internal_CreateClassEnumAsync (
  1366. WmiInternalContext a_InternalContext ,
  1367. const BSTR a_Superclass ,
  1368. long a_Flags ,
  1369. IWbemContext *a_Context ,
  1370. IWbemObjectSink *a_Sink
  1371. ) ;
  1372. HRESULT STDMETHODCALLTYPE Internal_PutInstance (
  1373. WmiInternalContext a_InternalContext ,
  1374. IWbemClassObject *a_Instance ,
  1375. long a_Flags ,
  1376. IWbemContext *a_Context ,
  1377. IWbemCallResult **a_CallResult
  1378. ) ;
  1379. HRESULT STDMETHODCALLTYPE Internal_PutInstanceAsync (
  1380. WmiInternalContext a_InternalContext ,
  1381. IWbemClassObject *a_Instance ,
  1382. long a_Flags ,
  1383. IWbemContext *a_Context ,
  1384. IWbemObjectSink *a_Sink
  1385. ) ;
  1386. HRESULT STDMETHODCALLTYPE Internal_DeleteInstance (
  1387. WmiInternalContext a_InternalContext ,
  1388. const BSTR a_ObjectPath ,
  1389. long a_Flags ,
  1390. IWbemContext *a_Context ,
  1391. IWbemCallResult **a_CallResult
  1392. ) ;
  1393. HRESULT STDMETHODCALLTYPE Internal_DeleteInstanceAsync (
  1394. WmiInternalContext a_InternalContext ,
  1395. const BSTR a_ObjectPath,
  1396. long a_Flags,
  1397. IWbemContext *a_Context ,
  1398. IWbemObjectSink *a_Sink
  1399. ) ;
  1400. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnum (
  1401. WmiInternalContext a_InternalContext ,
  1402. const BSTR a_Class ,
  1403. long a_Flags ,
  1404. IWbemContext *a_Context ,
  1405. IEnumWbemClassObject **a_Enum
  1406. ) ;
  1407. HRESULT STDMETHODCALLTYPE Internal_CreateInstanceEnumAsync (
  1408. WmiInternalContext a_InternalContext ,
  1409. const BSTR a_Class ,
  1410. long a_Flags ,
  1411. IWbemContext *a_Context ,
  1412. IWbemObjectSink *a_Sink
  1413. ) ;
  1414. HRESULT STDMETHODCALLTYPE Internal_ExecQuery (
  1415. WmiInternalContext a_InternalContext ,
  1416. const BSTR a_QueryLanguage,
  1417. const BSTR a_Query,
  1418. long a_Flags ,
  1419. IWbemContext *a_Context ,
  1420. IEnumWbemClassObject **a_Enum
  1421. ) ;
  1422. HRESULT STDMETHODCALLTYPE Internal_ExecQueryAsync (
  1423. WmiInternalContext a_InternalContext ,
  1424. const BSTR a_QueryLanguage ,
  1425. const BSTR a_Query ,
  1426. long a_Flags ,
  1427. IWbemContext *a_Context ,
  1428. IWbemObjectSink *a_Sink
  1429. ) ;
  1430. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQuery (
  1431. WmiInternalContext a_InternalContext ,
  1432. const BSTR a_QueryLanguage ,
  1433. const BSTR a_Query ,
  1434. long a_Flags ,
  1435. IWbemContext *a_Context ,
  1436. IEnumWbemClassObject **a_Enum
  1437. ) ;
  1438. HRESULT STDMETHODCALLTYPE Internal_ExecNotificationQueryAsync (
  1439. WmiInternalContext a_InternalContext ,
  1440. const BSTR a_QueryLanguage ,
  1441. const BSTR a_Query ,
  1442. long a_Flags ,
  1443. IWbemContext *a_Context ,
  1444. IWbemObjectSink *a_Sink
  1445. ) ;
  1446. HRESULT STDMETHODCALLTYPE Internal_ExecMethod (
  1447. WmiInternalContext a_InternalContext ,
  1448. const BSTR a_ObjectPath ,
  1449. const BSTR a_MethodName ,
  1450. long a_Flags ,
  1451. IWbemContext *a_Context ,
  1452. IWbemClassObject *a_InParams ,
  1453. IWbemClassObject **a_OutParams ,
  1454. IWbemCallResult **a_CallResult
  1455. ) ;
  1456. HRESULT STDMETHODCALLTYPE Internal_ExecMethodAsync (
  1457. WmiInternalContext a_InternalContext ,
  1458. const BSTR a_ObjectPath ,
  1459. const BSTR a_MethodName ,
  1460. long a_Flags ,
  1461. IWbemContext *a_Context ,
  1462. IWbemClassObject *a_InParams ,
  1463. IWbemObjectSink *a_Sink
  1464. ) ;
  1465. } ;
  1466. #endif
  1467. #endif // _Server_Interceptor_IWbemServices_Stub_H