////////////////////////////////////////////////////////////////////////////// // CProxyIComponentWndEvent template class CProxyIComponentWndEvent : public IConnectionPointImpl { public: //IComponentWndEvent : IDispatch public: HRESULT Fire_OnClose() { T* pT = (T*)this; pT->Lock(); HRESULT ret; IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { IComponentWndEvent* pIComponentWndEvent = reinterpret_cast(*pp); ret = pIComponentWndEvent->OnClose(); } pp++; } pT->Unlock(); return ret; } };