Source code of Windows XP (NT5)
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.

31 lines
636 B

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