windows-nt/Source/XPSP1/NT/enduser/netmeeting/ui/nmctl1/cpcompwndevent.h

31 lines
641 B
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
//////////////////////////////////////////////////////////////////////////////
// CProxyIComponentWndEvent
template <class T>
class CProxyIComponentWndEvent : public IConnectionPointImpl<T, &IID_IComponentWndEvent, CComDynamicUnkArray>
{
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<IComponentWndEvent*>(*pp);
ret = pIComponentWndEvent->OnClose();
}
pp++;
}
pT->Unlock();
return ret;
}
};