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.

64 lines
3.7 KiB

  1. #ifndef _SFSTORAGE_H_
  2. #define _SFSTORAGE_H_
  3. HRESULT StgMoveElementTo(IShellFolder *psf, IStorage *pstg, LPCWSTR pwcsName, IStorage *pstgDest, LPCWSTR pwcsNewName, DWORD grfFlags);
  4. class CSFStorage : public IShellFolder2,
  5. public IStorage
  6. {
  7. public:
  8. // IUnknown
  9. STDMETHOD (QueryInterface)(REFIID, void **) PURE;
  10. STDMETHOD_(ULONG, AddRef)() PURE;
  11. STDMETHOD_(ULONG, Release)() PURE;
  12. // IShellFolder
  13. STDMETHOD(ParseDisplayName)(HWND hwnd, LPBC pbc, LPOLESTR pszName, ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  14. STDMETHOD(EnumObjects)(HWND hwnd, DWORD grfFlags, IEnumIDList **ppenumIDList) PURE;
  15. STDMETHOD(BindToObject)(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppvOut) PURE;
  16. STDMETHOD(BindToStorage)(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppvObj) PURE;
  17. STDMETHOD(CompareIDs)(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  18. STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, void **ppvOut) PURE;
  19. STDMETHOD(GetAttributesOf)(UINT cidl, LPCITEMIDLIST * apidl, ULONG *rgfInOut) PURE;
  20. STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, void **ppvOut) PURE;
  21. STDMETHOD(GetDisplayNameOf)(LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  22. STDMETHOD(SetNameOf)(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, DWORD uFlags, LPITEMIDLIST * ppidlOut) PURE;
  23. // IShellFolder2
  24. STDMETHOD(GetDefaultSearchGUID)(GUID *pGuid) PURE;
  25. STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) PURE;
  26. STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) PURE;
  27. STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pbState) PURE;
  28. STDMETHOD(GetDetailsEx)(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) PURE;
  29. STDMETHOD(GetDetailsOf)(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *pDetails) PURE;
  30. STDMETHOD(MapColumnToSCID)(UINT iColumn, SHCOLUMNID *pscid) PURE;
  31. // IStorage
  32. STDMETHOD(Commit)(DWORD grfCommitFlags);
  33. STDMETHOD(Revert)();
  34. STDMETHOD(SetClass)(REFCLSID clsid);
  35. STDMETHOD(SetStateBits)(DWORD grfStateBits, DWORD grfMask);
  36. STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
  37. STDMETHOD(EnumElements)(DWORD reserved1, void *reserved2, DWORD reserved3, IEnumSTATSTG **ppenum);
  38. STDMETHOD(OpenStream)(LPCWSTR pszRel, VOID *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm);
  39. STDMETHOD(OpenStorage)(LPCWSTR pszRel, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstg);
  40. STDMETHOD(DestroyElement)(LPCWSTR pszRel);
  41. STDMETHOD(RenameElement)(LPCWSTR pwcsOldName, LPCWSTR pwcsNewName);
  42. STDMETHOD(SetElementTimes)(LPCWSTR pszRel, const FILETIME *pctime, const FILETIME *patime, const FILETIME *pmtime);
  43. STDMETHOD(CopyTo)(DWORD ciidExclude, const IID *rgiidExclude, SNB snbExclude, IStorage *pstgDest);
  44. STDMETHOD(MoveElementTo)(LPCWSTR pszRel, IStorage *pstgDest, LPCWSTR pwcsNewName, DWORD grfFlags);
  45. STDMETHOD(CreateStream)(LPCWSTR pwcsName, DWORD grfMode, DWORD res1, DWORD res2, IStream **ppstm);
  46. STDMETHOD(CreateStorage)(LPCWSTR pwcsName, DWORD grfMode, DWORD res1, DWORD res2, IStorage **ppstg);
  47. private:
  48. // must be implemented by subclass
  49. STDMETHOD(_DeleteItemByIDList)(LPCITEMIDLIST pidl) PURE;
  50. STDMETHOD(_StgCreate)(LPCITEMIDLIST pidl, DWORD grfMode, REFIID riid, void **ppv) PURE;
  51. HRESULT _ParseAndVerify(LPCWSTR pwszName, LPBC pbc, LPITEMIDLIST *ppidl);
  52. HRESULT _BindByName(LPCWSTR pwszName, LPBC pbcParse, DWORD grfMode, REFIID riid, void **ppv);
  53. HRESULT _CreateHelper(LPCWSTR pwcsName, DWORD grfMode, REFIID riid, void **ppv);
  54. };
  55. #endif // _SFSTORAGE_H_