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.

92 lines
2.9 KiB

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