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.

711 lines
21 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. SINKS.CPP
  5. Abstract:
  6. Sink definitions
  7. History:
  8. --*/
  9. #ifndef __WBEM_SINKS__H_
  10. #define __WBEM_SINKS__H_
  11. #include <sync.h>
  12. #include <arrtempl.h>
  13. #include <wstlallc.h>
  14. #include <unk.h>
  15. #include <comutil.h>
  16. //***************************************************************************
  17. //
  18. //***************************************************************************
  19. void EmptyObjectList(CFlexArray &aTarget);
  20. class CObjDbNS;
  21. //class CWbemNamespace;
  22. //***************************************************************************
  23. //
  24. //***************************************************************************
  25. class CDestination
  26. {
  27. public:
  28. virtual HRESULT Add(ADDREF IWbemClassObject* pObj) = 0;
  29. };
  30. //
  31. //
  32. // used for the template
  33. //
  34. /////////////////////////////////////////////
  35. void Sink_Return(IWbemObjectSink* pSink,HRESULT & hRes,IWbemClassObject * & pObjParam);
  36. typedef OnDeleteIf3<IWbemObjectSink *,HRESULT &,IWbemClassObject * &,
  37. void (*)(IWbemObjectSink *,HRESULT &,IWbemClassObject * &),
  38. Sink_Return> CSetStatusOnMe;
  39. //***************************************************************************
  40. //
  41. //***************************************************************************
  42. class CBasicObjectSink : public IWbemObjectSink, public CDestination
  43. {
  44. public:
  45. CBasicObjectSink();
  46. virtual ~CBasicObjectSink();
  47. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  48. inline HRESULT Add(IWbemClassObject* pObj)
  49. {return Indicate(1, &pObj);}
  50. inline HRESULT Return(HRESULT hres, IWbemClassObject* pErrorObj = NULL)
  51. {SetStatus(0, hres, NULL, pErrorObj); return hres;}
  52. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  53. virtual IWbemObjectSink* GetStatusSink() {return this;}
  54. virtual BOOL IsApartmentSpecific() {return FALSE;}
  55. virtual BOOL IsTrusted() {return TRUE;}
  56. };
  57. class CStatusSink : public CBasicObjectSink
  58. {
  59. HRESULT m_hRes;
  60. long m_lRefCount;
  61. public:
  62. CStatusSink( );
  63. ~CStatusSink();
  64. ULONG STDMETHODCALLTYPE AddRef();
  65. ULONG STDMETHODCALLTYPE Release();
  66. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppvObj);
  67. HRESULT STDMETHODCALLTYPE Indicate(long lObjectCount, IWbemClassObject** pObjArray);
  68. HRESULT STDMETHODCALLTYPE SetStatus(long lFlags, long lParam, BSTR strParam,
  69. IWbemClassObject* pObjParam
  70. );
  71. HRESULT GetLastStatus( void ) { return m_hRes; }
  72. };
  73. class CStdSink : public CBasicObjectSink
  74. {
  75. IWbemObjectSink *m_pDest;
  76. HRESULT m_hRes;
  77. BOOL m_bCancelForwarded;
  78. public:
  79. long m_lRefCount;
  80. CStdSink(IWbemObjectSink *pRealDest);
  81. ~CStdSink();
  82. HRESULT Cancel();
  83. ULONG STDMETHODCALLTYPE AddRef();
  84. ULONG STDMETHODCALLTYPE Release();
  85. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppvObj);
  86. HRESULT STDMETHODCALLTYPE Indicate(long lObjectCount, IWbemClassObject** pObjArray);
  87. HRESULT STDMETHODCALLTYPE SetStatus(long lFlags, long lParam, BSTR strParam,
  88. IWbemClassObject* pObjParam
  89. );
  90. };
  91. //***************************************************************************
  92. //
  93. // Decouples provider subsystem from the rest of the sink chain
  94. // for cancellation purposes.
  95. //
  96. // This sink does not destruct until the Destruct() method is called
  97. //
  98. //***************************************************************************
  99. //
  100. class CProviderSink : public IWbemObjectSink
  101. {
  102. private:
  103. LONG m_lRefCount;
  104. LONG m_lIndicateCount;
  105. LPWSTR m_pszDebugInfo;
  106. IWbemObjectSink *m_pNextSink;
  107. HRESULT m_hRes;
  108. BOOL m_bDone;
  109. CCritSec m_cs;
  110. public:
  111. static HRESULT WINAPI Dump(FILE *f);
  112. CProviderSink(LONG lStartingRefCount = 0, LPWSTR pszDebugInfo = 0);
  113. ~CProviderSink();
  114. ULONG LocalAddRef(); // Doesn't propagate AddRef()
  115. ULONG LocalRelease(); // Doesn't propagate Release()
  116. void SetNextSink(IWbemObjectSink *pSink) { m_pNextSink = pSink; m_pNextSink->AddRef(); } // SEC:REVIEWED 2002-03-22 : OK; all users check first
  117. void Cancel();
  118. ULONG STDMETHODCALLTYPE AddRef();
  119. ULONG STDMETHODCALLTYPE Release();
  120. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppvObj);
  121. HRESULT STDMETHODCALLTYPE Indicate(long lObjectCount, IWbemClassObject** pObjArray);
  122. HRESULT STDMETHODCALLTYPE SetStatus(long lFlags, long lParam, BSTR strParam,
  123. IWbemClassObject* pObjParam
  124. );
  125. };
  126. //***************************************************************************
  127. //
  128. //***************************************************************************
  129. class CObjectSink : public CBasicObjectSink
  130. {
  131. protected:
  132. long m_lRef;
  133. public:
  134. CObjectSink(long lRef = 0) : m_lRef(lRef){}
  135. virtual ~CObjectSink(){}
  136. STDMETHOD_(ULONG, AddRef)();
  137. STDMETHOD_(ULONG, Release)();
  138. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray) = 0;
  139. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  140. IWbemClassObject* pObjParam) = 0;
  141. };
  142. class CSynchronousSink : public CObjectSink
  143. {
  144. private:
  145. CSynchronousSink(IWbemObjectSink* pProxy = NULL);
  146. HANDLE m_hEvent;
  147. HRESULT m_hres;
  148. BSTR m_str;
  149. IWbemClassObject* m_pErrorObj;
  150. IWbemObjectSink* m_pCurrentProxy;
  151. CRefedPointerArray<IWbemClassObject> m_apObjects;
  152. CCritSec m_cs;
  153. public:
  154. static CSynchronousSink* Create(IWbemObjectSink* pProxy = NULL);
  155. virtual ~CSynchronousSink();
  156. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  157. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  158. IWbemClassObject* pObjParam);
  159. public:
  160. void Block();
  161. void GetStatus(HRESULT* phres, BSTR* pstrParam,
  162. IWbemClassObject** ppErrorObj);
  163. INTERNAL CRefedPointerArray<IWbemClassObject>& GetObjects()
  164. {return m_apObjects;}
  165. HRESULT GetHResult() { return m_hres; }
  166. void ClearHResult() { m_hres = WBEM_S_NO_ERROR; }
  167. };
  168. //***************************************************************************
  169. //
  170. //***************************************************************************
  171. class CForwardingSink : public CObjectSink
  172. {
  173. protected:
  174. IWbemObjectSink* m_pDestIndicate;
  175. IWbemObjectSink* m_pDestStatus;
  176. CBasicObjectSink* m_pDest;
  177. public:
  178. CForwardingSink(CBasicObjectSink* pDest, long lRef = 0);
  179. virtual ~CForwardingSink();
  180. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  181. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  182. IWbemClassObject* pObjParam);
  183. virtual IWbemObjectSink* GetIndicateSink() {return m_pDestIndicate;}
  184. virtual IWbemObjectSink* GetStatusSink() {return m_pDestStatus;}
  185. virtual BOOL IsTrusted() {return m_pDest->IsTrusted();}
  186. virtual BOOL IsApartmentSpecific() {return m_pDest->IsApartmentSpecific();}
  187. };
  188. //***************************************************************************
  189. //
  190. //***************************************************************************
  191. class CDynPropsSink : public CForwardingSink
  192. {
  193. protected:
  194. CRefedPointerArray<IWbemClassObject> m_UnsentCache;
  195. CWbemNamespace * m_pNs;
  196. public:
  197. CDynPropsSink(CBasicObjectSink* pSink, CWbemNamespace * pNs, long lRef = 0);
  198. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  199. ~CDynPropsSink();
  200. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  201. };
  202. //***************************************************************************
  203. //
  204. //***************************************************************************
  205. class CDecoratingSink : public CForwardingSink
  206. {
  207. protected:
  208. CWbemNamespace* m_pNamespace;
  209. public:
  210. CDecoratingSink(CBasicObjectSink* pDest, CWbemNamespace* pNamespace);
  211. ~CDecoratingSink();
  212. STDMETHOD(Indicate)(long lNumObjects, IWbemClassObject** apObjects);
  213. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  214. };
  215. //***************************************************************************
  216. //
  217. //***************************************************************************
  218. class CCombiningSink : public CForwardingSink
  219. {
  220. protected:
  221. HRESULT m_hresToIgnore;
  222. HRESULT m_hres;
  223. BSTR m_strParam;
  224. IWbemClassObject* m_pErrorObj;
  225. CCritSec m_cs;
  226. public:
  227. CCombiningSink(CBasicObjectSink* pDest,
  228. HRESULT hresToIgnore = WBEM_S_NO_ERROR);
  229. virtual ~CCombiningSink();
  230. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  231. IWbemClassObject* pObjParam);
  232. virtual IWbemObjectSink* GetStatusSink() {return this;}
  233. HRESULT GetHResult() { return m_hres; }
  234. void ClearHResult() { m_hres = WBEM_S_NO_ERROR; }
  235. void SetHRESULTToIgnore( HRESULT hr ) { m_hresToIgnore = hr; }
  236. };
  237. //***************************************************************************
  238. //
  239. //***************************************************************************
  240. /*
  241. class CAnySuccessSink : public CCombiningSink
  242. {
  243. BOOL m_bSuccess;
  244. HRESULT m_hresNotError1;
  245. HRESULT m_hresNotError2;
  246. HRESULT m_hresIgnored;
  247. public:
  248. CAnySuccessSink(CBasicObjectSink* pDest, HRESULT hresNotError1,
  249. HRESULT hresNotError2)
  250. : CCombiningSink(pDest), m_bSuccess(FALSE), m_hresIgnored(0),
  251. m_hresNotError1(hresNotError1), m_hresNotError2(hresNotError2)
  252. {}
  253. virtual ~CAnySuccessSink();
  254. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  255. IWbemClassObject* pObjParam);
  256. virtual IWbemObjectSink* GetStatusSink() {return this;}
  257. };
  258. */
  259. //
  260. //
  261. // this constructor thows, because the WString trows
  262. //
  263. //////////////////////////////////////////////////////////////////
  264. class COperationErrorSink : public CForwardingSink
  265. {
  266. protected:
  267. WString m_wsOperation;
  268. WString m_wsParameter;
  269. WString m_wsProviderName;
  270. BOOL m_bFinal;
  271. public:
  272. COperationErrorSink(CBasicObjectSink* pDest,
  273. LPCWSTR wszOperation, LPCWSTR wszParameter,
  274. BOOL bFinal = TRUE)
  275. : CForwardingSink(pDest, 1), m_wsOperation((LPWSTR)wszOperation),
  276. m_wsParameter((LPWSTR)wszParameter), m_wsProviderName(L"WinMgmt"),
  277. m_bFinal(bFinal)
  278. {}
  279. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  280. IWbemClassObject* pObjParam);
  281. void SetProviderName(LPCWSTR wszName);
  282. void SetParameterInfo(LPCWSTR wszParam);
  283. virtual IWbemObjectSink* GetStatusSink() {return this;}
  284. };
  285. //***************************************************************************
  286. //
  287. //***************************************************************************
  288. class CSingleMergingSink : public CCombiningSink
  289. {
  290. protected:
  291. IWbemClassObject* m_pResult;
  292. CCritSec m_cs;
  293. WString m_wsTargetClass;
  294. public:
  295. CSingleMergingSink(CBasicObjectSink* pDest, LPCWSTR wszTargetClass)
  296. : CCombiningSink(pDest, WBEM_E_NOT_FOUND), m_pResult(NULL),
  297. m_wsTargetClass(wszTargetClass)
  298. {}
  299. virtual ~CSingleMergingSink();
  300. STDMETHOD(Indicate)(long lNumObjects, IWbemClassObject** apObjects);
  301. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  302. };
  303. //***************************************************************************
  304. //
  305. //***************************************************************************
  306. class CLocaleMergingSink : public CCombiningSink
  307. {
  308. protected:
  309. CCritSec m_cs;
  310. WString m_wsLocale;
  311. WString m_pThisNamespace;
  312. //Primary pointers are to the specified locale
  313. IWmiDbHandle *m_pPrimaryNs;
  314. IWmiDbSession *m_pPrimarySession;
  315. IWmiDbController *m_pPrimaryDriver;
  316. //Default pointers are pointing at the ms_409 default locale in case there
  317. //is no specific locale loaded onto the machine.
  318. IWmiDbHandle *m_pDefaultNs;
  319. IWmiDbSession *m_pDefaultSession;
  320. IWmiDbController *m_pDefaultDriver;
  321. void GetDbPtr(const wchar_t *);
  322. bool hasLocale(const wchar_t *);
  323. void releaseNS(void);
  324. HRESULT LocalizeQualifiers(bool, bool, IWbemQualifierSet *, IWbemQualifierSet *, bool&);
  325. HRESULT LocalizeProperties(bool, bool, IWbemClassObject *, IWbemClassObject *, bool&);
  326. public:
  327. CLocaleMergingSink(CBasicObjectSink *pDest, LPCWSTR wszLocale, LPCWSTR pNamespace);
  328. virtual ~CLocaleMergingSink();
  329. STDMETHOD(Indicate)(long lNumObjects, IWbemClassObject** apObjects);
  330. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  331. };
  332. //***************************************************************************
  333. //
  334. //***************************************************************************
  335. /*
  336. class CCountedSink : public CForwardingSink
  337. {
  338. DWORD m_dwMax;
  339. DWORD m_dwSent;
  340. public:
  341. CCountedSink(CBasicObjectSink* pDest, DWORD dwMax) : CForwardingSink(pDest),
  342. m_dwMax(dwMax), m_dwSent(0)
  343. {}
  344. STDMETHOD(Indicate)(long lNumObjects, IWbemClassObject** apObjects);
  345. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  346. IWbemClassObject* pObjParam);
  347. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  348. };
  349. */
  350. //***************************************************************************
  351. //
  352. //***************************************************************************
  353. class CFilteringSink : public CForwardingSink
  354. {
  355. public:
  356. CFilteringSink(CBasicObjectSink* pDest) : CForwardingSink(pDest, 0){}
  357. virtual ~CFilteringSink(){}
  358. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  359. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  360. virtual BOOL Test(CWbemObject* pObj) = 0;
  361. };
  362. //***************************************************************************
  363. //
  364. //***************************************************************************
  365. class CErrorChangingSink : public CForwardingSink
  366. {
  367. protected:
  368. HRESULT m_hresFrom;
  369. HRESULT m_hresTo;
  370. public:
  371. CErrorChangingSink(CBasicObjectSink* pDest, HRESULT hresFrom, HRESULT hresTo)
  372. : CForwardingSink(pDest, 1), m_hresFrom(hresFrom), m_hresTo(hresTo)
  373. {}
  374. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  375. IWbemClassObject* pObjParam);
  376. virtual IWbemObjectSink* GetStatusSink() {return this;}
  377. };
  378. //***************************************************************************
  379. //
  380. //***************************************************************************
  381. class CMethodSink : public CForwardingSink
  382. {
  383. protected:
  384. IWbemClassObject * m_pRes;
  385. public:
  386. CMethodSink(CBasicObjectSink* pDest)
  387. : CForwardingSink(pDest, 0), m_pRes(0)
  388. {}
  389. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  390. IWbemClassObject* pObjParam);
  391. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  392. virtual IWbemObjectSink* GetStatusSink() {return this;}
  393. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  394. };
  395. //***************************************************************************
  396. //
  397. //***************************************************************************
  398. class CNoDuplicatesSink : public CFilteringSink
  399. {
  400. protected:
  401. std::map<WString, bool, WSiless> m_mapPaths;
  402. BSTR m_strDupClass;
  403. CCritSec m_cs;
  404. public:
  405. CNoDuplicatesSink(CBasicObjectSink* pDest);
  406. ~CNoDuplicatesSink();
  407. BOOL Test(CWbemObject* pObj);
  408. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  409. IWbemClassObject* pObjParam);
  410. virtual IWbemObjectSink* GetStatusSink() {return this;}
  411. };
  412. //***************************************************************************
  413. //
  414. //***************************************************************************
  415. class CHandleClassProvErrorsSink : public CForwardingSink
  416. {
  417. protected:
  418. WString m_wsProvider;
  419. WString m_wsNamespace;
  420. public:
  421. CHandleClassProvErrorsSink(CBasicObjectSink* pDest, LPCWSTR wszProvider,
  422. LPCWSTR wszNamespace)
  423. : CForwardingSink(pDest, 0), m_wsProvider(wszProvider),
  424. m_wsNamespace(wszNamespace)
  425. {}
  426. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  427. IWbemClassObject* pObjParam);
  428. virtual IWbemObjectSink* GetStatusSink() {return this;}
  429. };
  430. //***************************************************************************
  431. //
  432. //***************************************************************************
  433. class CSuccessSuppressionSink : public CForwardingSink
  434. {
  435. protected:
  436. HRESULT m_hresNotError1;
  437. HRESULT m_hresNotError2;
  438. public:
  439. CSuccessSuppressionSink(CBasicObjectSink* pDest, HRESULT hresNotError1,
  440. HRESULT hresNotError2)
  441. : CForwardingSink(pDest, 0), m_hresNotError1(hresNotError1),
  442. m_hresNotError2(hresNotError2)
  443. {}
  444. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  445. IWbemClassObject* pObjParam);
  446. virtual IWbemObjectSink* GetStatusSink() {return this;}
  447. };
  448. //***************************************************************************
  449. //
  450. //***************************************************************************
  451. class CThreadSwitchSink : public CForwardingSink
  452. {
  453. protected:
  454. CRefedPointerQueue<IWbemClassObject> m_qpObjects;
  455. HRESULT m_hres;
  456. BOOL m_bSwitching;
  457. HANDLE m_hReady;
  458. public:
  459. CThreadSwitchSink(CBasicObjectSink* pDest);
  460. ~CThreadSwitchSink();
  461. STDMETHOD(Indicate)(long lNumObjects, IWbemClassObject** apObjects);
  462. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  463. IWbemClassObject* pObjParam);
  464. HRESULT Next(IWbemClassObject** ppObj);
  465. };
  466. //***************************************************************************
  467. //
  468. //***************************************************************************
  469. class CLessGuid : public binary_function<GUID, GUID, bool>
  470. {
  471. public:
  472. bool operator()(const GUID& x, const GUID& y) const
  473. {
  474. return (memcmp((void*)&x, (void*)&y, sizeof(GUID)) < 0); // SEC:REVIEWED 2002-03-22 : OK
  475. }
  476. };
  477. //***************************************************************************
  478. //
  479. //***************************************************************************
  480. /*
  481. class CLessPtr : public binary_function<__a, __a,bool>
  482. {
  483. public:
  484. inline
  485. bool operator()(__a const& x, __a const& y) const
  486. {
  487. return (IWbemObjectSink*)x < (IWbemObjectSink*)y;
  488. }
  489. };
  490. */
  491. class CSinkGUIDAlloc : public wbem_allocator<GUID>
  492. {
  493. };
  494. //***************************************************************************
  495. //
  496. //***************************************************************************
  497. class CSimpleWrapperSink : public CBasicObjectSink
  498. {
  499. protected:
  500. IWbemObjectSink* m_pDest;
  501. public:
  502. CSimpleWrapperSink(IWbemObjectSink* pDest) : m_pDest(pDest){}
  503. ~CSimpleWrapperSink(){}
  504. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray)
  505. {
  506. return m_pDest->Indicate(lObjectCount, pObjArray);
  507. }
  508. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  509. IWbemClassObject* pObjParam)
  510. {
  511. return m_pDest->SetStatus(lFlags, lParam, strParam, pObjParam);
  512. }
  513. STDMETHOD_(ULONG, AddRef)()
  514. {
  515. return m_pDest->AddRef();
  516. }
  517. STDMETHOD_(ULONG, Release)()
  518. {
  519. return m_pDest->Release();
  520. }
  521. };
  522. class COperationError
  523. {
  524. private:
  525. bool m_fOk;
  526. COperationErrorSink * m_pSink;
  527. public:
  528. COperationError(CBasicObjectSink* pDest, LPCWSTR wszOperation,
  529. LPCWSTR wszParam, BOOL bFinal = TRUE);
  530. ~COperationError();
  531. HRESULT ErrorOccurred(HRESULT hres, IWbemClassObject* pErrorObj = NULL);
  532. HRESULT ProviderReturned(LPCWSTR wszProviderName, HRESULT hres,
  533. IWbemClassObject* pErrorObj = NULL);
  534. void SetParameterInfo(LPCWSTR wszParam);
  535. void SetProviderName(LPCWSTR wszName);
  536. INTERNAL CBasicObjectSink* GetSink() {return m_pSink;}
  537. bool IsOk( void ) { return m_fOk; }
  538. };
  539. class CFinalizingSink : public CForwardingSink
  540. {
  541. protected:
  542. CWbemNamespace* m_pNamespace;
  543. public:
  544. CFinalizingSink(CWbemNamespace* pNamespace, CBasicObjectSink* pDest);
  545. virtual ~CFinalizingSink();
  546. STDMETHOD(Indicate)(long, IWbemClassObject**);
  547. virtual IWbemObjectSink* GetIndicateSink() {return this;}
  548. };
  549. class CAssocQE_Sink : public CObjectSink
  550. {
  551. friend class CAssocQuery;
  552. BOOL m_bQECanceled;
  553. CAssocQuery *m_pQuery;
  554. PF_FilterForwarder m_pfnFilter;
  555. BSTR m_strQuery;
  556. BOOL m_bOriginalOpCanceled;
  557. public:
  558. CAssocQE_Sink(CAssocQuery *pQuery, PF_FilterForwarder pFilter, BSTR m_strQuery);
  559. ~CAssocQE_Sink();
  560. STDMETHOD(Indicate)(long lObjectCount, IWbemClassObject** pObjArray);
  561. STDMETHOD(SetStatus)(long lFlags, long lParam, BSTR strParam,
  562. IWbemClassObject* pObjParam
  563. );
  564. virtual HRESULT Add(ADDREF IWbemClassObject* pObj);
  565. };
  566. #endif