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.

57 lines
2.2 KiB

  1. // --------------------------------------------------------------------------------
  2. // basedisp.h
  3. // Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  4. // --------------------------------------------------------------------------------
  5. #ifndef __BASEDISP_H
  6. #define __BASEDISP_H
  7. #include "privunk.h"
  8. //class CPrivateUnknown;
  9. // --------------------------------------------------------------------------------
  10. // CPrivateUnknown
  11. // --------------------------------------------------------------------------------
  12. class CBaseDisp :
  13. public IDispatch,
  14. public ISupportErrorInfo,
  15. public CPrivateUnknown
  16. {
  17. protected:
  18. LPTYPEINFO m_pTypeInfo;
  19. LPVOID *m_pUnkInvoke;
  20. public:
  21. // ----------------------------------------------------------------------------
  22. // Construction
  23. // ----------------------------------------------------------------------------
  24. CBaseDisp(IUnknown *pUnkOuter=NULL);
  25. virtual ~CBaseDisp();
  26. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj)
  27. { return CPrivateUnknown::QueryInterface(riid, ppvObj); };
  28. virtual STDMETHODIMP_(ULONG) AddRef(void)
  29. { return CPrivateUnknown::AddRef();};
  30. virtual STDMETHODIMP_(ULONG) Release(void)
  31. { return CPrivateUnknown::Release(); };
  32. // *** IDispatch ***
  33. virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
  34. virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo);
  35. virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid);
  36. virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr);
  37. // *** ISupportErrorInfo ***
  38. virtual HRESULT STDMETHODCALLTYPE InterfaceSupportsErrorInfo(REFIID riid);
  39. virtual HRESULT EnsureTypeLibrary(LPVOID *pUnkInvoke, REFIID riid);
  40. protected:
  41. virtual HRESULT PrivateQueryInterface(REFIID riid, LPVOID *lplpObj);
  42. virtual HRESULT ReportError(REFCLSID rclsid, LONG ids);
  43. };
  44. #endif // __BASEDISP_H