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.

85 lines
2.2 KiB

  1. #ifndef _INC_DSKQUOTA_OADISP_H
  2. #define _INC_DSKQUOTA_OADISP_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: oadisp.h
  5. Description: Provides reusable implementation of IDispatch.
  6. Revision History:
  7. Date Description Programmer
  8. -------- --------------------------------------------------- ----------
  9. 05/22/97 Initial creation. BrianAu
  10. */
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #ifndef _OLEAUTO_H_
  13. # include <oleauto.h>
  14. #endif
  15. #ifndef _INC_DSKQUOTA_STRCLASS_H
  16. # include "strclass.h"
  17. #endif
  18. class OleAutoDispatch
  19. {
  20. public:
  21. OleAutoDispatch(VOID);
  22. OleAutoDispatch(IDispatch *pObject,
  23. REFIID riidTypeLib,
  24. REFIID riidDispInterface,
  25. LPCTSTR pszTypeLib);
  26. ~OleAutoDispatch(VOID);
  27. HRESULT
  28. Initialize(
  29. IDispatch *pObject,
  30. REFIID riidTypeLib,
  31. REFIID riidDispInterface,
  32. LPCTSTR pszTypeLib);
  33. HRESULT
  34. GetIDsOfNames(
  35. REFIID riid,
  36. OLECHAR ** rgszNames,
  37. UINT cNames,
  38. LCID lcid,
  39. DISPID *rgDispId);
  40. HRESULT
  41. GetTypeInfo(
  42. UINT iTInfo,
  43. LCID lcid,
  44. ITypeInfo **ppTInfo);
  45. HRESULT
  46. GetTypeInfoCount(
  47. UINT *pctinfo);
  48. HRESULT
  49. Invoke(
  50. DISPID dispIdMember,
  51. REFIID riid,
  52. LCID lcid,
  53. WORD wFlags,
  54. DISPPARAMS *pDispParams,
  55. VARIANT *pVarResult,
  56. EXCEPINFO *pExcepInfo,
  57. UINT *puArgErr);
  58. private:
  59. IDispatch *m_pObject;
  60. GUID m_idTypeLib;
  61. GUID m_idDispInterface;
  62. ITypeInfo *m_pTypeInfo;
  63. CString m_strTypeLib;
  64. //
  65. // Prevent copy.
  66. //
  67. OleAutoDispatch(const OleAutoDispatch& rhs);
  68. OleAutoDispatch& operator = (const OleAutoDispatch& rhs);
  69. };
  70. #endif //_INC_DSKQUOTA_OADISP_H