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.

47 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1999.
  5. //
  6. // File: CIDispatchHelper.h
  7. //
  8. // Contents: class defintion for CIDispatchHelper, a helper class to share code
  9. // for the IDispatch implementation that others can inherit from.
  10. //
  11. //----------------------------------------------------------------------------
  12. #ifndef _CIDISPATCHHELPER_H_
  13. #define _CIDISPATCHHELPER_H_
  14. class CIDispatchHelper
  15. {
  16. public:
  17. // we need access to the virtual QI -- define it PURE here
  18. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj) PURE;
  19. protected:
  20. // *** IDispatch methods ***
  21. STDMETHODIMP GetTypeInfoCount(UINT* pctinfo);
  22. STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo);
  23. STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid);
  24. STDMETHODIMP Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);
  25. // helper function to get a ITypeInfo uuid/lcid out of the type library
  26. HRESULT _LoadTypeInfo(const GUID* rguidTypeLib, LCID lcid, UUID uuid, ITypeInfo** ppITypeInfo);
  27. CIDispatchHelper(const IID* piid, const IID* piidTypeLib);
  28. ~CIDispatchHelper(void);
  29. private:
  30. const IID* _piid; // guid that this IDispatch implementation is for
  31. const IID* _piidTypeLib; // guid that specifies which TypeLib to load
  32. IDispatch* _pdisp;
  33. ITypeInfo* _pITINeutral; // cached Type information
  34. };
  35. #endif // _CIDISPATCHHELPER_H_