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.

98 lines
2.9 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. //
  6. //
  7. //
  8. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  9. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11. // PURPOSE.
  12. //
  13. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  14. //
  15. //
  16. //
  17. //==============================================================;
  18. #ifndef _SAMPDATAOBJECT_H_
  19. #define _SAMPDATAOBJECT_H_
  20. #include <mmc.h>
  21. #include "DeleBase.h"
  22. class CDataObject : public IDataObject
  23. {
  24. private:
  25. ULONG m_cref;
  26. MMC_COOKIE m_lCookie;
  27. DATA_OBJECT_TYPES m_context;
  28. public:
  29. CDataObject(MMC_COOKIE cookie, DATA_OBJECT_TYPES context);
  30. ~CDataObject();
  31. ///////////////////////////////
  32. // Interface IUnknown
  33. ///////////////////////////////
  34. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  35. STDMETHODIMP_(ULONG) AddRef();
  36. STDMETHODIMP_(ULONG) Release();
  37. ///////////////////////////////
  38. // IDataObject methods
  39. ///////////////////////////////
  40. STDMETHODIMP GetDataHere (FORMATETC *pformatetc, STGMEDIUM *pmedium);
  41. // The rest are not implemented
  42. STDMETHODIMP GetData (LPFORMATETC lpFormatetcIn, LPSTGMEDIUM lpMedium)
  43. { return E_NOTIMPL; };
  44. STDMETHODIMP EnumFormatEtc (DWORD dwDirection, LPENUMFORMATETC* ppEnumFormatEtc)
  45. { return E_NOTIMPL; };
  46. STDMETHODIMP QueryGetData (LPFORMATETC lpFormatetc)
  47. { return E_NOTIMPL; };
  48. STDMETHODIMP GetCanonicalFormatEtc (LPFORMATETC lpFormatetcIn, LPFORMATETC lpFormatetcOut)
  49. { return E_NOTIMPL; };
  50. STDMETHODIMP SetData (LPFORMATETC lpFormatetc, LPSTGMEDIUM lpMedium, BOOL bRelease)
  51. { return E_NOTIMPL; };
  52. STDMETHODIMP DAdvise (LPFORMATETC lpFormatetc, DWORD advf, LPADVISESINK pAdvSink, LPDWORD pdwConnection)
  53. { return E_NOTIMPL; };
  54. STDMETHODIMP DUnadvise (DWORD dwConnection)
  55. { return E_NOTIMPL; };
  56. STDMETHODIMP EnumDAdvise (LPENUMSTATDATA* ppEnumAdvise)
  57. { return E_NOTIMPL; };
  58. ///////////////////////////////
  59. // Custom Methods
  60. ///////////////////////////////
  61. CDelegationBase *GetBaseNodeObject() {
  62. return (CDelegationBase *)m_lCookie;
  63. }
  64. DATA_OBJECT_TYPES GetContext() {
  65. return m_context;
  66. }
  67. public:
  68. // clipboard formats
  69. static UINT s_cfSZNodeType;
  70. static UINT s_cfDisplayName;
  71. static UINT s_cfNodeType;
  72. static UINT s_cfSnapinClsid;
  73. static UINT s_cfInternal;
  74. };
  75. HRESULT ExtractFromDataObject(IDataObject *lpDataObject,UINT cf,ULONG cb,HGLOBAL *phGlobal);
  76. CDataObject* GetOurDataObject(IDataObject *lpDataObject);
  77. #endif _SAMPDATAOBJECT_H_