1234567891011121314151617181920212223242526272829303132 |
- #include "StdAfx.h"
- #include "FileZipFile.h"
- #include "io_mfc_file.h"
- CFileZipFile::CFileZipFile(void):m_file(NULL)
- {
- fill_mfc_filefunc(&m_pzlib_filefunc_def);
- m_file_inzip_open =FALSE;
- }
- CFileZipFile::CFileZipFile( CFile * pMemFile ):m_file(NULL)
- {
- fill_mfc_filefunc(&m_pzlib_filefunc_def);
- m_file_inzip_open =FALSE;
- if(pMemFile!=NULL)OpenFile(pMemFile);
- }
- CFileZipFile::~CFileZipFile(void)
- {
- }
- void CFileZipFile::OpenFile( CFile* file )
- {
- m_file =file;
- m_pzlib_filefunc_def.opaque = m_file;
- zf=zipOpen2(NULL,0,NULL,&m_pzlib_filefunc_def);
- }
- void CFileZipFile::Open()
- {
- if(!m_IsZipOpened&& NULL!=m_file)OpenFile(m_file);
- }
|