亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? readme.txt

?? 利用ZIP庫進行壓縮和解壓縮
?? TXT
字號:
Zip and unzip in a MFC way.

	Gilles Vollant did a great job writing zip.c and unzip.c (IO on .zip files using zlib), which are distributed with the zlib library. However using them in a program is quite risky. There is no way to recover from an error occurred during zipping, without memory leaks. Let's say we are out of disk space during packing files. There are two things we can do then; we can close our zipFile and get unexpected results, because the function which performs this action tries to write some buffers left back to the disk (and the stream it operates is already in the error state), or we may leave the zipFile opened and have the buffers not freed.  None of these possibilities was a good solution so I rewrote the code to better handle the errors. I left type names as in the original. 
The main improvements are:
- smart buffers (they free automatically at the destruction eliminating memory leaks when an error occurs) 
- CFile class used instead of stream to manipulate files (throws CFileException)
- operator "new" used to allocate memory (it throws CMemoryException so errors can be easily handled).

The ZipFunc is a static library (you can change it if you want) and statically links with compiled zlib.lib (version 1.13 nowadays). The zlib library can be replaced with a newer version providing you also replace the files: "zlib.h" and "zconf.h".  To add ZipFunc library functionality to your project you need to link the library to the project (e.g.  add "..\ZipFunc\debug(release)\ZipFunc.lib" to Project Settings->Link->Input->Object/library modules) and add ZipFunc directory to the preprocessor searches (Project Settings -> C++ -> Preprocessor -> Additional include directories). You may also need to ignore libc.lib library. The ZipFunc library uses MFC in a static library as a Release Configuration and in a shared library as a Debug Configuration. You may need to adapt this to your needs. The details about the functions use are in the sources.

Here goes the example of use CZipFile:

#include "..\ZipFunc\ZipFile.h"

void CCompresorDlg::OnButton1() 
{
	// getting the file to zip
	CFileDialog fd(TRUE);
	if (fd.DoModal() != IDOK)
		return;

	// adding extension
	CZipFile zf(fd.GetPathName() + ".zip", 0);
	char buf[BUF_SIZE];

	CFile f(fd.GetPathName(), CFile::modeRead);

	zip_fileinfo zi;
	// getting information about the date and the attributes
	// (this is new in ZipFunc)
	zf.UpdateZipInfo(zi, f);

	zf.OpenNewFileInZip(fd.GetFileName(), zi, Z_BEST_COMPRESSION);

	int size_read;
	do
	{
		size_read = f.Read(buf, BUF_SIZE);
		if (size_read)
			zf.WriteInFileInZip(buf, size_read);
		
	}
	while (size_read == BUF_SIZE);

	// cannot be called by the destructor because it may throw an exception
	// (it is not good to throw an exception when another one may be progress)
	zf.Close();
}

And below is an example of using the CUnzipFile:

#include "..\ZipFunc\unzipFile.h"

void CCompresorDlg::OnButton2() 
{
	// getting the file to unzip 
	CFileDialog fd(TRUE);
	if (fd.DoModal() != IDOK)
		return;
	CUnzipFile uf(fd.GetPathName());
	uf.GoToFirstFile();
	unz_file_info ui;

	// 	getting the information about the file 
	// (date, attributes, the size of the filename)
	uf.GetCurrentFileInfo(&ui);

	int iNameSize = ui.size_filename + 1;
	char* pName = new char [iNameSize];

	// get the name of the file
	uf.GetCurrentFileInfo(NULL, pName, iNameSize);

	TCHAR szDir[_MAX_DIR];
	TCHAR szDrive[_MAX_DRIVE];
	_tsplitpath(fd.GetPathName(), szDrive, szDir,NULL, NULL);
	CString szPath = CString(szDrive) + szDir;
	CFile f( szPath + pName, CFile::modeWrite | CFile::modeCreate);

	delete[] pName;
	uf.OpenCurrentFile();
	char buf[BUF_SIZE];


	int size_read;
	do
	{
		size_read = uf.ReadCurrentFile(buf, BUF_SIZE);
		if (size_read > 0)
			f.Write(buf, size_read);
		
	}
	while (size_read == BUF_SIZE);

	// set the original date stamp and attributes to the unpacked file
	// (this function closes the file "f" which is needed to apply
	// the attributes)
	uf.UpdateFileStatus(f, ui);

	// cannot be called by the destructor 
	uf.Close();	
}

	The library throws the following exceptions: CMemoryException, CFileExeption and CZipException. The first two don't need an explanation. The last is thrown when some internal zip or unzip error occurs. (The details, once again, are in the sources). Handling  them may be done in a following way:

try
{
	//	...
	//	some zipping or unzipping here(it may be the one of the previous examples)
}
catch (CException* e)
{
	if (e->IsKindOf( RUNTIME_CLASS( CZipException )))
	{
		CZipException* p = (CZipException*) e;
		//... and so on 
	
	}
	else if (e->IsKindOf( RUNTIME_CLASS( CFileException )))
	{
		CFileException* p = (CFileException*) e;
		//... and so on 
	}
	else // the only possibility is a memory exception I suppose
	{
		//... and so on 
	}
			
	e->Delete();
}

Platform: Visual 6.0/MFC 6.0 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三区在线观看| 91精品国产综合久久久久久久久久| 精品国产欧美一区二区| 日韩二区三区四区| 欧美日韩免费观看一区三区| 亚洲精品自拍动漫在线| 99视频超级精品| 国产精品青草综合久久久久99| 国产精品综合一区二区三区| 日韩免费看的电影| 日韩电影免费一区| 制服丝袜亚洲播放| 日本伊人午夜精品| 日韩欧美国产wwwww| 美女视频网站黄色亚洲| 日韩一级在线观看| 久久av中文字幕片| 精品国产伦理网| 高清不卡一区二区| 国产精品欧美一区二区三区| 不卡区在线中文字幕| 国产精品乱码一区二区三区软件| 高清在线观看日韩| 国产精品成人在线观看| 91女神在线视频| 一区二区三区加勒比av| 欧美亚洲一区二区三区四区| 亚洲丶国产丶欧美一区二区三区| 欧美老女人在线| 青青草97国产精品免费观看无弹窗版 | 一区二区三区在线视频免费观看| 色综合久久天天| 亚洲成人一二三| 日韩欧美国产一二三区| 国产精品亚洲а∨天堂免在线| 国产精品午夜免费| 色婷婷av久久久久久久| 五月婷婷激情综合网| 日韩一区二区三区视频| 国产精品一级黄| 成人欧美一区二区三区白人| 欧美综合久久久| 日韩成人免费看| 久久综合久久鬼色中文字| 成年人午夜久久久| 亚洲国产三级在线| 日韩欧美电影一区| jvid福利写真一区二区三区| 亚洲影视资源网| 欧美成人精精品一区二区频| 成人午夜精品一区二区三区| 亚洲自拍与偷拍| 日韩一区二区三区在线视频| 成人自拍视频在线| 亚洲一区二区三区四区在线观看| 欧美一二三四区在线| 国产九色精品成人porny| 亚洲精品乱码久久久久久日本蜜臀| 欧美精品日韩综合在线| 国产精品一色哟哟哟| 亚洲精品少妇30p| 日韩欧美一区二区久久婷婷| 成人av中文字幕| 日本在线播放一区二区三区| 国产精品人成在线观看免费| 欧美日韩不卡一区| 国产夫妻精品视频| 亚洲成人免费视| 欧美国产日韩亚洲一区| 欧美日韩亚洲国产综合| 国产激情视频一区二区在线观看| 一区二区三国产精华液| 精品日韩一区二区| 欧洲精品一区二区三区在线观看| 久久激五月天综合精品| 日韩理论片网站| 日韩精品中午字幕| 色视频一区二区| 国产乱妇无码大片在线观看| 亚洲成人一区二区在线观看| 中文在线免费一区三区高中清不卡| 精品视频在线免费| 久久99深爱久久99精品| 亚洲欧美日韩久久| 久久久亚洲国产美女国产盗摄| 欧美色大人视频| 成人av电影观看| 精品在线一区二区| 亚洲成国产人片在线观看| 国产精品无码永久免费888| 欧美一二三四区在线| 色综合色综合色综合色综合色综合| 精品在线亚洲视频| 五月婷婷激情综合| 一区二区三区视频在线观看| 欧美激情综合在线| 日韩欧美卡一卡二| 欧美日韩的一区二区| 91婷婷韩国欧美一区二区| 国产精品亚洲视频| 精品无人码麻豆乱码1区2区| 婷婷国产v国产偷v亚洲高清| 一区二区三区在线免费播放| 中文av一区二区| 久久久久久免费毛片精品| 日韩一级免费观看| 欧美日韩极品在线观看一区| 色婷婷av一区二区三区软件| 成人亚洲一区二区一| 韩国理伦片一区二区三区在线播放 | 欧美激情资源网| 精品国产成人系列| 欧美一级高清大全免费观看| 欧美日韩视频在线第一区 | www.欧美日韩| 国产一区二区精品久久91| 国产欧美日韩精品一区| 久久免费电影网| 在线成人av影院| 91论坛在线播放| 岛国一区二区三区| 国内欧美视频一区二区| 日韩av二区在线播放| 亚洲一区二区在线播放相泽| 中文字幕亚洲一区二区av在线 | 97久久精品人人澡人人爽| 国产一区二区调教| 麻豆成人免费电影| 日本最新不卡在线| 午夜欧美电影在线观看| 一区二区在线电影| 亚洲精品videosex极品| 亚洲欧洲日韩女同| 中文字幕精品一区二区精品绿巨人| 精品蜜桃在线看| 久久综合狠狠综合久久综合88| 欧美一区二区免费观在线| 欧美高清视频不卡网| 欧美三级中文字幕在线观看| 99久久伊人精品| 色天使久久综合网天天| 91美女在线看| 色香色香欲天天天影视综合网| 99在线精品免费| 91国产成人在线| 色婷婷精品久久二区二区蜜臂av | 欧美亚洲高清一区二区三区不卡| 97久久久精品综合88久久| 中文字幕一区二区三区视频| 中文字幕一区在线观看视频| 中文字幕五月欧美| 亚洲精品国产无套在线观| 亚洲精品国久久99热| 一区二区三区欧美| 亚洲午夜久久久久久久久久久| 一区二区三区四区高清精品免费观看| 亚洲成人免费影院| 日本aⅴ免费视频一区二区三区| 免费欧美高清视频| 久久成人精品无人区| 男人的j进女人的j一区| 国产福利一区在线| 成年人国产精品| 色88888久久久久久影院按摩| 色就色 综合激情| 色综合久久综合中文综合网| 欧美电影影音先锋| 欧美成人欧美edvon| 久久久高清一区二区三区| 日本一区二区久久| 亚洲在线中文字幕| 日韩高清一区二区| 国产在线麻豆精品观看| 懂色一区二区三区免费观看| 成人禁用看黄a在线| 色狠狠一区二区三区香蕉| 欧美日韩亚洲国产综合| 精品日韩欧美在线| 国产精品乱码妇女bbbb| 午夜影院久久久| 精品三级av在线| 欧美激情艳妇裸体舞| 亚洲综合自拍偷拍| 美女视频黄频大全不卡视频在线播放| 黑人巨大精品欧美黑白配亚洲| 日韩avvvv在线播放| 国产精品99久久不卡二区| 色综合中文字幕| 69精品人人人人| 久久久精品天堂| 中文字幕一区二区日韩精品绯色| 亚洲电影在线免费观看| 国产乱码精品一品二品| 成人毛片在线观看| 91视频www| 久久亚区不卡日本| 一区二区三区免费在线观看| 久久aⅴ国产欧美74aaa| 国产成人精品免费视频网站| 欧美乱妇20p|