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.

99 lines
2.8 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. MsDatObj.h
  5. Abstract:
  6. Implementation of IDataObject for Multi-Select
  7. Author:
  8. Art Bragg 28-Aug-1997
  9. Revision History:
  10. --*/
  11. #ifndef MSDATOBJ_H
  12. #define MSDATOBJ_H
  13. class CMsDataObject;
  14. /////////////////////////////////////////////////////////////////////////////
  15. // COM class representing the object
  16. class ATL_NO_VTABLE CMsDataObject :
  17. public IDataObject,
  18. public IMsDataObject, // Our internal interface to the data object
  19. public CComObjectRoot // handle object reference counts for objects
  20. // public CComCoClass<CMsDataObject, &CLSID_MsDataObject>
  21. {
  22. public:
  23. CMsDataObject() {
  24. };
  25. BEGIN_COM_MAP(CMsDataObject)
  26. COM_INTERFACE_ENTRY(IDataObject)
  27. COM_INTERFACE_ENTRY(IMsDataObject)
  28. END_COM_MAP()
  29. // DECLARE_REGISTRY_RESOURCEID(IDR_MsDataObject)
  30. // IDataObject methods
  31. public:
  32. // Implemented
  33. STDMETHOD( SetData ) ( LPFORMATETC lpFormatetc, LPSTGMEDIUM lpMedium, BOOL bRelease );
  34. STDMETHOD( GetData ) ( LPFORMATETC lpFormatetcIn, LPSTGMEDIUM lpMedium );
  35. STDMETHOD( GetDataHere ) ( LPFORMATETC lpFormatetc, LPSTGMEDIUM lpMedium );
  36. STDMETHOD( EnumFormatEtc ) ( DWORD dwDirection, LPENUMFORMATETC* ppEnumFormatEtc );
  37. // Not implemented
  38. STDMETHOD( QueryGetData ) ( LPFORMATETC /*lpFormatetc*/ )
  39. { return E_NOTIMPL; };
  40. STDMETHOD( GetCanonicalFormatEtc ) ( LPFORMATETC /*lpFormatetcIn*/, LPFORMATETC /*lpFormatetcOut*/ )
  41. { return E_NOTIMPL; };
  42. STDMETHOD( DAdvise ) ( LPFORMATETC /*lpFormatetc*/, DWORD /*advf*/, LPADVISESINK /*pAdvSink*/, LPDWORD /*pdwConnection*/ )
  43. { return E_NOTIMPL; };
  44. STDMETHOD( DUnadvise ) ( DWORD /*dwConnection*/ )
  45. { return E_NOTIMPL; };
  46. STDMETHOD( EnumDAdvise ) ( LPENUMSTATDATA* /*ppEnumAdvise*/ )
  47. { return E_NOTIMPL; };
  48. // IMsDataObject methods
  49. STDMETHOD( AddNode ) ( ISakNode *pNode );
  50. STDMETHOD( GetNodeEnumerator ) ( IEnumUnknown ** ppEnum );
  51. STDMETHOD( GetObjectIdEnumerator ) ( IEnumGUID ** ppEnum );
  52. // Pseudo Constructor / Destructor
  53. public:
  54. HRESULT FinalConstruct();
  55. void FinalRelease();
  56. // Data
  57. private:
  58. DWORD m_Count; // Number of GUIDs in array
  59. DWORD m_ArraySize; // Current allocated size of array
  60. GUID *m_pGUIDArray; // Array of GUIDs - type of object
  61. GUID *m_pObjectIdArray; // Array of ObjectIds - unique GUIDs for specific objects
  62. IUnknown **m_pUnkNodeArray; // Array of unknown ISakNode pointers
  63. static UINT m_cfObjectTypes;
  64. // Private Helper Function
  65. private:
  66. HRESULT RetrieveMultiSelectData(LPSTGMEDIUM lpMedium);
  67. };
  68. #endif