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.

60 lines
2.3 KiB

  1. #ifndef __EXPDSPRT_H__
  2. #define __EXPDSPRT_H__
  3. #include "cnctnpt.h"
  4. #ifdef TF_SHDLIFE
  5. #undef TF_SHDLIFE
  6. #endif
  7. #define TF_SHDLIFE TF_CUSTOM1
  8. //
  9. // Helper C++ class used to share code for the IExpDispSupport...
  10. //
  11. //
  12. class CImpIExpDispSupport : public IExpDispSupport
  13. {
  14. public:
  15. // We need access to the virtual QI -- define it PURE here
  16. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj) PURE;
  17. virtual STDMETHODIMP_(ULONG) AddRef(void) PURE;
  18. virtual STDMETHODIMP_(ULONG) Release(void) PURE;
  19. // *** IExpDispSupport specific methods ***
  20. virtual STDMETHODIMP FindCIE4ConnectionPoint(REFIID riid, CIE4ConnectionPoint **ppccp);
  21. virtual STDMETHODIMP OnTranslateAccelerator(MSG __RPC_FAR *pMsg,DWORD grfModifiers);
  22. virtual STDMETHODIMP OnInvoke(DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pdispparams,
  23. VARIANT FAR* pVarResult,EXCEPINFO FAR* pexcepinfo,UINT FAR* puArgErr);
  24. protected:
  25. virtual CConnectionPoint* _FindCConnectionPointNoRef(BOOL fdisp, REFIID riid) PURE;
  26. CImpIExpDispSupport() { TraceMsg(TF_SHDLIFE, "ctor CImpIExpDispSupport %x", this); }
  27. ~CImpIExpDispSupport() { TraceMsg(TF_SHDLIFE, "dtor CImpIExpDispSupport %x", this); }
  28. };
  29. // CImpIExpDispSupport implements half of IConnectionPoint
  30. //
  31. class CImpIConnectionPointContainer : public IConnectionPointContainer
  32. {
  33. public:
  34. // We need access to the virtual QI -- define it PURE here
  35. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj) PURE;
  36. virtual STDMETHODIMP_(ULONG) AddRef(void) PURE;
  37. virtual STDMETHODIMP_(ULONG) Release(void) PURE;
  38. // *** IConnectionPointContainer ***
  39. virtual STDMETHODIMP EnumConnectionPoints(LPENUMCONNECTIONPOINTS FAR* ppEnum) PURE;
  40. virtual STDMETHODIMP FindConnectionPoint(REFIID iid, LPCONNECTIONPOINT FAR* ppCP);
  41. protected:
  42. virtual CConnectionPoint* _FindCConnectionPointNoRef(BOOL fdisp, REFIID iid) PURE;
  43. CImpIConnectionPointContainer() { TraceMsg(TF_SHDLIFE, "ctor CImpIExpDispSupport %x", this); }
  44. ~CImpIConnectionPointContainer() { TraceMsg(TF_SHDLIFE, "dtor CImpIExpDispSupport %x", this); }
  45. };
  46. #endif // __EXPDSPRT_H__