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.

65 lines
1.6 KiB

  1. #ifndef SHFOLDER_H
  2. #define SHFOLDER_H
  3. class CShellFolder : public IShellFolder, public IPersistFolder
  4. {
  5. friend class CShellView;
  6. protected:
  7. LONG m_ObjRefCount;
  8. public:
  9. CShellFolder(CShellFolder*, LPCITEMIDLIST);
  10. ~CShellFolder();
  11. //
  12. // IUnknown methods
  13. //
  14. STDMETHOD (QueryInterface) (REFIID riid, LPVOID * ppvObj);
  15. STDMETHOD_ (ULONG, AddRef) (void);
  16. STDMETHOD_ (ULONG, Release) (void);
  17. //
  18. // IPersist methods
  19. //
  20. STDMETHODIMP GetClassID(LPCLSID);
  21. //
  22. // IPersistFolder methods
  23. //
  24. STDMETHODIMP Initialize(LPCITEMIDLIST);
  25. //
  26. // IShellFolder methods
  27. //
  28. STDMETHOD (ParseDisplayName) (HWND, LPBC, LPOLESTR, LPDWORD, LPITEMIDLIST*, LPDWORD);
  29. STDMETHOD (EnumObjects) (HWND, DWORD, LPENUMIDLIST*);
  30. STDMETHOD (BindToObject) (LPCITEMIDLIST, LPBC, REFIID, LPVOID*);
  31. STDMETHOD (BindToStorage) (LPCITEMIDLIST, LPBC, REFIID, LPVOID*);
  32. STDMETHOD (CompareIDs) (LPARAM, LPCITEMIDLIST, LPCITEMIDLIST);
  33. STDMETHOD (CreateViewObject) (HWND, REFIID, LPVOID* );
  34. STDMETHOD (GetAttributesOf) (UINT, LPCITEMIDLIST*, ULONG *);
  35. STDMETHOD (GetUIObjectOf) (HWND, UINT, LPCITEMIDLIST*, REFIID, LPUINT, LPVOID*);
  36. STDMETHOD (GetDisplayNameOf) (LPCITEMIDLIST, DWORD, LPSTRRET);
  37. STDMETHOD (SetNameOf) (HWND, LPCITEMIDLIST, LPCOLESTR, DWORD, LPITEMIDLIST*);
  38. private:
  39. LPITEMIDLIST m_pidl;
  40. CShellFolder *m_pSFParent;
  41. LPMALLOC m_pMalloc;
  42. //
  43. // utility functions
  44. //
  45. BOOL HasSubFolders(LPCITEMIDLIST pidl);
  46. BOOL GetPidlFullText(LPCITEMIDLIST, LPTSTR, DWORD);
  47. };
  48. #endif // SHFOLDER_H