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.

32 lines
656 B

  1. // Copyright 1997-1998 Microsoft Corporation. All Rights Reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _STATE_H_
  6. #define _STATE_H_
  7. class CState
  8. {
  9. public:
  10. CState(PCSTR pszChm);
  11. ~CState();
  12. HRESULT Open(PCSTR pszName, DWORD dwAccess = (STGM_READWRITE | STGM_SHARE_DENY_WRITE));
  13. HRESULT _IOpen(void);
  14. void Close(void);
  15. HRESULT Read(void* pData, DWORD cb, DWORD* pcbRead);
  16. DWORD Write(const void* pData, DWORD cb);
  17. HRESULT Delete() ;
  18. private:
  19. class CFileSystem* m_pfs;
  20. class CSubFileSystem* m_pSubFS;
  21. CStr m_cszChm;
  22. DWORD m_dwAccess;
  23. TCHAR m_pszName[MAX_PATH];
  24. };
  25. #endif _STATE_H_