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.

85 lines
2.4 KiB

  1. // FSStg.h -- Declaration of the FileSystemStorage class which wraps directories in
  2. // the Win32 file system as IStorage objects.
  3. #ifndef __FSSTG_H__
  4. #define __FSSTG_H__
  5. class CFileSystemStorage : public CITUnknown
  6. {
  7. public:
  8. // Destructor:
  9. ~CFileSystemStorage(void);
  10. // Creation:
  11. static HRESULT STDMETHODCALLTYPE Create(IUnknown *punkOuter, REFIID riid, PPVOID ppv);
  12. private:
  13. CFileSystemStorage(IUnknown *pUnkOuter);
  14. class CImpIFileSystemStorage : public IITFSStorage
  15. {
  16. public:
  17. // Constructor and Destructor:
  18. CImpIFileSystemStorage(CFileSystemStorage *pBackObj, IUnknown *punkOuter);
  19. ~CImpIFileSystemStorage(void);
  20. // Initialing routines:
  21. HRESULT STDMETHODCALLTYPE Init();
  22. // IFSStorage methods
  23. HRESULT STDMETHODCALLTYPE FSCreateStorage
  24. (const WCHAR * pwcsName, DWORD grfMode, IStorage ** ppstgOpen);
  25. HRESULT STDMETHODCALLTYPE FSCreateTemporaryStream(IStream **ppStrm);
  26. HRESULT STDMETHODCALLTYPE FSOpenStorage
  27. (const WCHAR * pwcsName, DWORD grfMode, IStorage ** ppstgOpen);
  28. HRESULT STDMETHODCALLTYPE FSCreateStream
  29. (const WCHAR *pwcsName, DWORD grfMode, IStream **ppStrm);
  30. HRESULT STDMETHODCALLTYPE FSOpenStream
  31. (const WCHAR *pwcsName, DWORD grfMode, IStream **ppStrm);
  32. HRESULT STDMETHODCALLTYPE FSCreateLockBytes
  33. (const WCHAR *pwcsName, DWORD grfMode, ILockBytes **ppLkb);
  34. HRESULT STDMETHODCALLTYPE FSCreateTemporaryLockBytes(ILockBytes **ppLkb);
  35. HRESULT STDMETHODCALLTYPE FSOpenLockBytes
  36. (const WCHAR *pwcsName, DWORD grfMode, ILockBytes **ppLkb);
  37. HRESULT STDMETHODCALLTYPE FSStgSetTimes
  38. (WCHAR const * lpszName, FILETIME const * pctime,
  39. FILETIME const * patime, FILETIME const * pmtime
  40. );
  41. };
  42. CImpIFileSystemStorage m_ImpIFileSystemStorage;
  43. };
  44. inline CFileSystemStorage::CFileSystemStorage(IUnknown *pUnkOuter)
  45. : m_ImpIFileSystemStorage(this, pUnkOuter),
  46. CITUnknown(&IID_IFSStorage, 1, &m_ImpIFileSystemStorage)
  47. {
  48. }
  49. inline CFileSystemStorage::~CFileSystemStorage()
  50. {
  51. }
  52. inline CFileSystemStorage::CImpIFileSystemStorage::CImpIFileSystemStorage
  53. (CFileSystemStorage *pBackObj, IUnknown *punkOuter)
  54. : IITFSStorage(pBackObj, punkOuter)
  55. {
  56. }
  57. inline CFileSystemStorage::CImpIFileSystemStorage::~CImpIFileSystemStorage(void)
  58. {
  59. }
  60. #endif // __FSSTG_H__