zipexception.h

来自「winzip 开发环境:C++」· C头文件 代码 · 共 56 行

H
56
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?