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.

75 lines
2.8 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: dataobj.hxx
  4. //
  5. // Contents: CDataObject declaration
  6. //
  7. // History: 24-Nov-92 DeanE Created
  8. //
  9. //---------------------------------------------------------------------
  10. #ifndef __DATAOBJ_HXX__
  11. #define __DATAOBJ_HXX__
  12. //+-------------------------------------------------------------------
  13. // Class: CDataObject
  14. //
  15. // Synopsis: Test class CDataObject
  16. //
  17. // Methods: QueryInterface IUnknown
  18. // AddRef IUnknown
  19. // Release IUnknown
  20. // GetData IDataObject
  21. // GetDataHere IDataObject
  22. // QueryGetData IDataObject
  23. // GetCanonicalFormatEtc IDataObject
  24. // SetData IDataObject
  25. // EnumFormatEtc IDataObject
  26. // DAdvise IDataObject
  27. // DUnadvise IDataObject
  28. // EnumDAdvise IDataObject
  29. //
  30. // History: 24-Nov-92 DeanE Created
  31. //--------------------------------------------------------------------
  32. class FAR CDataObject : public IDataObject
  33. {
  34. public:
  35. // Constructor/Destructor
  36. CDataObject(CTestEmbed *pteObject);
  37. ~CDataObject();
  38. // IUnknown - Everyone inherits from this
  39. STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR *ppv);
  40. STDMETHODIMP_(ULONG) AddRef (void);
  41. STDMETHODIMP_(ULONG) Release (void);
  42. // IDataObject
  43. STDMETHODIMP GetData (LPFORMATETC pformatetcIn,
  44. LPSTGMEDIUM pmedium);
  45. STDMETHODIMP GetDataHere (LPFORMATETC pformatetc,
  46. LPSTGMEDIUM pmedium);
  47. STDMETHODIMP QueryGetData (LPFORMATETC pformatetc);
  48. STDMETHODIMP GetCanonicalFormatEtc(
  49. LPFORMATETC pformatetc,
  50. LPFORMATETC pformatetcOut);
  51. STDMETHODIMP SetData (LPFORMATETC pformatetc,
  52. STGMEDIUM FAR *pmedium,
  53. BOOL fRelease);
  54. STDMETHODIMP EnumFormatEtc (DWORD dwDirection,
  55. LPENUMFORMATETC FAR *ppenmFormatEtc);
  56. STDMETHODIMP DAdvise (FORMATETC FAR *pFormatetc,
  57. DWORD advf,
  58. LPADVISESINK pAdvSink,
  59. DWORD FAR *pdwConnection);
  60. STDMETHODIMP DUnadvise (DWORD dwConnection);
  61. STDMETHODIMP EnumDAdvise (LPENUMSTATDATA FAR *ppenmAdvise);
  62. private:
  63. ULONG _cRef; // Reference count
  64. IDataAdviseHolder FAR *_pDAHolder; // Advise Holder
  65. CTestEmbed *_pteObject; // Object we're associated with
  66. };
  67. #endif // __DATAOBJ_HXX__