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.

30 lines
641 B

  1. //////////////////////////////////////////////////////////////////////////////
  2. // CProxyIComponentWndEvent
  3. template <class T>
  4. class CProxyIComponentWndEvent : public IConnectionPointImpl<T, &IID_IComponentWndEvent, CComDynamicUnkArray>
  5. {
  6. public:
  7. //IComponentWndEvent : IDispatch
  8. public:
  9. HRESULT Fire_OnClose()
  10. {
  11. T* pT = (T*)this;
  12. pT->Lock();
  13. HRESULT ret;
  14. IUnknown** pp = m_vec.begin();
  15. while (pp < m_vec.end())
  16. {
  17. if (*pp != NULL)
  18. {
  19. IComponentWndEvent* pIComponentWndEvent = reinterpret_cast<IComponentWndEvent*>(*pp);
  20. ret = pIComponentWndEvent->OnClose();
  21. }
  22. pp++;
  23. }
  24. pT->Unlock();
  25. return ret;
  26. }
  27. };