⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zipexception.h

📁 一个使用zlib进行压缩和解压的程序
💻 H
字号:
// ZipException.h: interface for the CZipException class.
//
// Copyright (C) 2000 Tadeusz Dracz
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ZIPEXCEPTION_H__E3546921_D728_11D3_B7C7_E77339672847__INCLUDED_)
#define AFX_ZIPEXCEPTION_H__E3546921_D728_11D3_B7C7_E77339672847__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CZipException : public CException  
{
public:
	DECLARE_DYNAMIC(CZipException)
	// sygnalize whether the error occured during zip or unzip
	bool m_bDuringZip;
	// convert zlib library error code to a ZipException code
	static int ZipErrToCause(int iZipError);
	// name of the zip file where the error occured
	CString m_szFileName;

	enum
	{
		noError,
		generic,
		streamEnd,
		needDict,
		errNo,
		streamError,
		dataError,
		memError,
		bufError,
		versionError,
		badFuncParam,
		badZipFile,
		badCrc,
	};
	// cause - takes one of the codes above
	int m_iCause;
	CZipException(int iCause = generic, LPCTSTR lpszZipName = NULL, bool bDuringZip = true);
	virtual ~CZipException();

};

// throw zip exception
// Parameters:
//		iZipError	- zlib error code
//		lpszZipName - name of the file where the error occured
//		bzipFile	- true if the error occured while compression, 
//	    			  false - decompression
void AfxThrowZipException(int iZipError = 1000, LPCTSTR lpszZipName = NULL, bool bZipFile = true);

#endif // !defined(AFX_ZIPEXCEPTION_H__E3546921_D728_11D3_B7C7_E77339672847__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -