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 (C) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. dataobj.h
  5. Abstract:
  6. header file defines CDataObject class
  7. Author:
  8. William Hsieh (williamh) created
  9. Revision History:
  10. --*/
  11. #ifndef _DATAOBJ_H
  12. #define _DATAOBJ_H
  13. class CDataObject;
  14. class CDataObjectRoot;
  15. class CDataObjectDeviceTreeByType;
  16. class CDataObjectDeviceTreeByConnection;
  17. class CCookie;
  18. class CDataObject : public IDataObject
  19. {
  20. public:
  21. CDataObject() : m_Ref(1)
  22. {}
  23. ~CDataObject()
  24. {}
  25. // IUnknown interface
  26. STDMETHOD_(ULONG, AddRef)();
  27. STDMETHOD_(ULONG, Release)();
  28. STDMETHOD(QueryInterface)(REFIID riid, void** ppv);
  29. // IDataObject interface
  30. STDMETHOD(GetData)(LPFORMATETC lpFormatetcIn, LPSTGMEDIUM lpMedium);
  31. STDMETHOD(GetDataHere)(LPFORMATETC lpFormatetc, LPSTGMEDIUM lpMedium);
  32. STDMETHOD(EnumFormatEtc)(DWORD dwDirection, LPENUMFORMATETC* ppEnumFormatEtc);
  33. virtual HRESULT Initialize(DATA_OBJECT_TYPES Type, COOKIE_TYPE ct, CCookie* pCookie, String& strMachineName);
  34. // Not Implemented
  35. private:
  36. STDMETHOD(QueryGetData)(LPFORMATETC lpFormatetc)
  37. { return E_NOTIMPL; };
  38. STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC lpFormatetcIn, LPFORMATETC lpFormatetcOut)
  39. { return E_NOTIMPL; };
  40. STDMETHOD(SetData)(LPFORMATETC lpFormatetc, LPSTGMEDIUM lpMedium, BOOL bRelease)
  41. { return E_NOTIMPL; };
  42. STDMETHOD(DAdvise)(LPFORMATETC lpFormatetc, DWORD advf,
  43. LPADVISESINK pAdvSink, LPDWORD pdwConnection)
  44. { return E_NOTIMPL; };
  45. STDMETHOD(DUnadvise)(DWORD dwConnection)
  46. { return E_NOTIMPL; };
  47. STDMETHOD(EnumDAdvise)(LPENUMSTATDATA* ppEnumAdvise)
  48. { return E_NOTIMPL; };
  49. public:
  50. // Clipboard formats that are required by the console
  51. static unsigned int m_cfNodeType;
  52. static unsigned int m_cfNodeTypeString;
  53. static unsigned int m_cfDisplayName;
  54. static unsigned int m_cfSnapinInternal;
  55. static unsigned int m_cfCoClass;
  56. static unsigned int m_cfMachineName;
  57. static unsigned int m_cfClassGuid;
  58. static unsigned int m_cfDeviceID;
  59. protected:
  60. COOKIE_TYPE m_ct;
  61. CCookie* m_pCookie;
  62. int m_idsNodeName;
  63. private:
  64. DATA_OBJECT_TYPES m_Type;
  65. String m_strMachineName;
  66. ULONG m_Ref;
  67. };
  68. extern HRESULT ExtractData(IDataObject* pIDataObject, unsigned int cfClipFormat,
  69. BYTE* pBuffer, DWORD cbBuffer
  70. );
  71. #endif