ZipFileManager.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: ZipFileManager.h
- #ifndef _ZIPFILEMANAGER__H
- #define _ZIPFILEMANAGER__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "PackFileManagerBaseClass.h"
- struct ZipFileEntry;
- class CZipFileManager : public CPackFileManagerBaseClass
- {
- friend class CZipFile;
- public:
- enum ZipHeaderSignature
- {
- // Header signatures
- ZIPSIG_LOCSIG = 0x04034B50L, // "PK 03 04"
- ZIPSIG_EXTSIG = 0x08074B50L, // "PK 07 08"
- ZIPSIG_CENSIG = 0x02014B50L, // "PK 01 02"
- ZIPSIG_ENDSIG = 0x06054B50L, // "PK 05 06"
- };
- public:
- CZipFileManager(void);
- virtual ~CZipFileManager();
- public:
- virtual bool Load(LPCTSTR lpszName, bool bResource);
- virtual DWORD GetFileEntries(void) const
- {
- return m_wEntries;
- }
- virtual PackFileManagerType GetPackFileManagerType(void) const;
- public:
- #ifdef _DEBUG
- bool List(void);
- #endif // _DEBUG
- protected:
- LONG LocateCentralDirectory(void);
- CString GetGlobalComment(void);
- protected:
- virtual bool GetFileEntryInfo(LPCTSTR lpszName, CPackFileBaseClass* pFileEntry) const;
- protected:
- CFile* m_pFile;
- ZipFileEntry* m_pFileEntryArray;
- WORD m_wEntries;
- DWORD m_offset_central_dir;
- WORD m_gi_size_comment;
- LONG m_lCentralPos;
- DWORD m_byte_before_the_zipfile;
- };
- #endif // _ZIPFILEMANAGER__H