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.

98 lines
2.4 KiB

  1. //
  2. // Copyright 1997 - Microsoft
  3. //
  4. //
  5. // DATAOBJ.H - A data object
  6. //
  7. #ifndef _DATAOBJ_H_
  8. #define _DATAOBJ_H_
  9. // QITable
  10. BEGIN_QITABLE( CDsPropDataObj )
  11. DEFINE_QI( IID_IDataObject, IDataObject , 9 )
  12. END_QITABLE
  13. LPVOID
  14. CDsPropDataObj_CreateInstance(
  15. HWND hwndParent,
  16. IDataObject * pido,
  17. GUID * pClassGUID,
  18. BOOL fReadOnly,
  19. LPWSTR pszObjPath,
  20. LPWSTR bstrClass );
  21. class CDsPropDataObj : public IDataObject
  22. {
  23. private:
  24. DECLARE_QITABLE( CDsPropDataObj );
  25. CDsPropDataObj::CDsPropDataObj( HWND hwndParent, IDataObject * pido, GUID * pClassGUID, BOOL fReadOnly);
  26. ~CDsPropDataObj(void);
  27. HRESULT Init(LPWSTR pwszObjName, LPWSTR pwszClass);
  28. public:
  29. friend LPVOID CDsPropDataObj_CreateInstance(
  30. HWND hwndParent,
  31. IDataObject * pido,
  32. GUID * pClassGUID,
  33. BOOL fReadOnly,
  34. LPWSTR pszObjPath,
  35. LPWSTR bstrClass );
  36. //
  37. // IUnknown methods
  38. //
  39. STDMETHOD(QueryInterface)(REFIID riid, void ** ppvObject);
  40. STDMETHOD_(ULONG, AddRef)(void);
  41. STDMETHOD_(ULONG, Release)(void);
  42. //
  43. // Standard IDataObject methods
  44. //
  45. // Implemented
  46. //
  47. STDMETHOD(GetData)(FORMATETC * pformatetcIn, STGMEDIUM * pmedium);
  48. STDMETHOD(GetDataHere)(FORMATETC * pFormatEtcIn, STGMEDIUM * pMedium);
  49. STDMETHOD(EnumFormatEtc)(DWORD dwDirection,
  50. IEnumFORMATETC ** ppenumFormatEtc);
  51. // Not Implemented
  52. private:
  53. STDMETHOD(QueryGetData)(FORMATETC * pformatetc)
  54. { return E_NOTIMPL; };
  55. STDMETHOD(GetCanonicalFormatEtc)(FORMATETC * pformatectIn,
  56. FORMATETC * pformatetcOut)
  57. { return E_NOTIMPL; };
  58. STDMETHOD(SetData)(FORMATETC * pformatetc, STGMEDIUM * pmedium,
  59. BOOL fRelease)
  60. { return E_NOTIMPL; };
  61. STDMETHOD(DAdvise)(FORMATETC * pformatetc, DWORD advf,
  62. IAdviseSink * pAdvSink, DWORD * pdwConnection)
  63. { return E_NOTIMPL; };
  64. STDMETHOD(DUnadvise)(DWORD dwConnection)
  65. { return E_NOTIMPL; };
  66. STDMETHOD(EnumDAdvise)(IEnumSTATDATA ** ppenumAdvise)
  67. { return E_NOTIMPL; };
  68. BOOL m_fReadOnly;
  69. PWSTR m_pwszObjName;
  70. PWSTR m_pwszObjClass;
  71. GUID m_ClassGUID;
  72. IDataObject * m_pPage;
  73. unsigned long _cRef;
  74. HWND m_hwnd;
  75. };
  76. typedef CDsPropDataObj * LPCDSPROPDATAOBJ;
  77. #endif // _DATAOBJ_H_