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.

96 lines
3.4 KiB

  1. /**************************************************************************
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright 1998 Microsoft Corporation. All Rights Reserved.
  7. **************************************************************************/
  8. /**************************************************************************
  9. File: ShlFldr.h
  10. Description: CShellFolder definitions.
  11. **************************************************************************/
  12. #ifndef SHELLFOLDER_H
  13. #define SHELLFOLDER_H
  14. /**************************************************************************
  15. #include statements
  16. **************************************************************************/
  17. #include <windows.h>
  18. #include <shlobj.h>
  19. #include "EnumIDL.h"
  20. #include "PidlMgr.h"
  21. /**************************************************************************
  22. CShellFolder class definition
  23. **************************************************************************/
  24. class CShellFolder : public IShellFolder,
  25. public IPersistFolder
  26. {
  27. friend class CShellView;
  28. friend class CContextMenu;
  29. friend class CDropTarget;
  30. friend class CDataObject;
  31. private:
  32. DWORD m_ObjRefCount;
  33. LPITEMIDLIST m_pidlRel;
  34. LPITEMIDLIST m_pidlFQ;
  35. CShellFolder *m_psfParent;
  36. LPMALLOC m_pMalloc;
  37. CPidlMgr *m_pPidlMgr;
  38. IXMLDocument *m_pXMLDoc;
  39. public:
  40. CShellFolder(CShellFolder *pParent = NULL, LPCITEMIDLIST pidl = NULL);
  41. ~CShellFolder();
  42. //IUnknown methods
  43. STDMETHOD (QueryInterface) (REFIID riid, LPVOID * ppvObj);
  44. STDMETHOD_ (ULONG, AddRef) (VOID);
  45. STDMETHOD_ (ULONG, Release) (VOID);
  46. //IShellFolder methods
  47. STDMETHOD (ParseDisplayName) (HWND, LPBC, LPOLESTR, LPDWORD, LPITEMIDLIST*, LPDWORD);
  48. STDMETHOD (EnumObjects) (HWND, DWORD, LPENUMIDLIST*);
  49. STDMETHOD (BindToObject) (LPCITEMIDLIST, LPBC, REFIID, LPVOID*);
  50. STDMETHOD (BindToStorage) (LPCITEMIDLIST, LPBC, REFIID, LPVOID*);
  51. STDMETHOD (CompareIDs) (LPARAM, LPCITEMIDLIST, LPCITEMIDLIST);
  52. STDMETHOD (CreateViewObject) (HWND, REFIID, LPVOID* );
  53. STDMETHOD (GetAttributesOf) (UINT, LPCITEMIDLIST*, LPDWORD);
  54. STDMETHOD (GetUIObjectOf) (HWND, UINT, LPCITEMIDLIST*, REFIID, LPUINT, LPVOID*);
  55. STDMETHOD (GetDisplayNameOf) (LPCITEMIDLIST, DWORD, LPSTRRET);
  56. STDMETHOD (SetNameOf) (HWND, LPCITEMIDLIST, LPCOLESTR, DWORD, LPITEMIDLIST*);
  57. //IPersist methods
  58. STDMETHODIMP GetClassID(LPCLSID);
  59. //IPersistFolder methods
  60. STDMETHODIMP Initialize(LPCITEMIDLIST);
  61. private:
  62. STDMETHOD (AddFolder)(LPCTSTR, LPITEMIDLIST*);
  63. STDMETHOD (AddItem)(LPCTSTR, LPCTSTR, LPITEMIDLIST*);
  64. STDMETHOD (SetItemData)(LPCITEMIDLIST, LPCTSTR);
  65. STDMETHOD (GetUniqueName)(BOOL, LPTSTR, DWORD);
  66. LPITEMIDLIST CreateFQPidl(LPCITEMIDLIST);
  67. STDMETHOD (DeleteItems)(LPITEMIDLIST*, UINT);
  68. STDMETHOD (CopyItems)(CShellFolder*, LPITEMIDLIST*, UINT);
  69. VOID GetFullName(LPCITEMIDLIST, LPTSTR, DWORD);
  70. VOID GetPath(LPCITEMIDLIST, LPTSTR, DWORD);
  71. BOOL HasSubFolder(LPCITEMIDLIST);
  72. VOID NotifyViews(DWORD, LPCITEMIDLIST, LPCITEMIDLIST);
  73. STDMETHOD (CompareItems) (LPCITEMIDLIST, LPCITEMIDLIST);
  74. };
  75. #endif //SHELLFOLDER_H