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.

48 lines
1.4 KiB

  1. #ifndef _NETMEETINGCP_H_
  2. #define _NETMEETINGCP_H_
  3. #include <NmDispid.h>
  4. template <class T>
  5. class CProxy_INetMeetingEvents : public IConnectionPointImpl<T, &DIID__INetMeetingEvents, CComDynamicUnkArray>
  6. {
  7. //Warning this class may be recreated by the wizard.
  8. public:
  9. VOID Fire_ConferenceStarted()
  10. {
  11. T* pT = static_cast<T*>(this);
  12. int nConnectionIndex;
  13. int nConnections = m_vec.GetSize();
  14. for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
  15. {
  16. pT->Lock();
  17. CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
  18. pT->Unlock();
  19. IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
  20. if (pDispatch != NULL)
  21. {
  22. DISPPARAMS disp = { NULL, NULL, 0, 0 };
  23. pDispatch->Invoke(DISPID_ConferenceStarted, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
  24. }
  25. }
  26. }
  27. VOID Fire_ConferenceEnded()
  28. {
  29. T* pT = static_cast<T*>(this);
  30. int nConnectionIndex;
  31. int nConnections = m_vec.GetSize();
  32. for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
  33. {
  34. pT->Lock();
  35. CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
  36. pT->Unlock();
  37. IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
  38. if (pDispatch != NULL)
  39. {
  40. DISPPARAMS disp = { NULL, NULL, 0, 0 };
  41. pDispatch->Invoke(DISPID_ConferenceEnded, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
  42. }
  43. }
  44. }
  45. };
  46. #endif