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

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

?? readme.txt

?? 學生信息管理系統x
?? 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一区二区三区免费野_久草精品视频
kk眼镜猥琐国模调教系列一区二区| 精品电影一区二区| 欧美精品一区二区蜜臀亚洲| 日韩美女精品在线| 狠狠色丁香婷婷综合| 色中色一区二区| 国产三级精品视频| 美女性感视频久久| 欧美性猛交xxxxxx富婆| 久久久久久久综合狠狠综合| 日韩国产欧美一区二区三区| 91麻豆免费看| 国产精品久久夜| 国产最新精品免费| 制服丝袜一区二区三区| 亚洲永久精品大片| 99re热视频精品| 国产精品萝li| 成人性视频网站| 国产午夜精品久久| 国产一区二区三区日韩| 日韩视频一区二区在线观看| 日韩一区精品字幕| 欧美日韩小视频| 夜夜嗨av一区二区三区| 色偷偷88欧美精品久久久| 最新高清无码专区| www.成人在线| 《视频一区视频二区| 成人开心网精品视频| 国产精品乱码人人做人人爱 | 亚洲综合图片区| 91黄视频在线| 亚洲国产成人av网| 欧美日韩精品二区第二页| 亚洲高清免费一级二级三级| 欧美日韩一区二区三区视频| 天天色综合成人网| 欧美一区二区三区的| 经典三级在线一区| 久久久久久亚洲综合| 不卡av在线免费观看| 一区二区三区视频在线看| 欧美四级电影在线观看| 视频一区二区三区在线| 精品久久久久久亚洲综合网 | 久久se精品一区精品二区| 26uuu国产电影一区二区| 国产成人8x视频一区二区| 国产精品黄色在线观看| 精品婷婷伊人一区三区三| 日日骚欧美日韩| 国产亚洲va综合人人澡精品| 91天堂素人约啪| 丝袜美腿亚洲综合| 国产无人区一区二区三区| 91丨九色porny丨蝌蚪| 亚洲大片精品永久免费| 久久日韩精品一区二区五区| 97精品电影院| 美女视频免费一区| 亚洲三级在线免费| 日韩情涩欧美日韩视频| www.亚洲精品| 青青草国产成人av片免费| 国产精品网站在线| 欧美年轻男男videosbes| 国产福利一区二区三区在线视频| 亚洲欧美一区二区三区孕妇| 欧美一级午夜免费电影| 成人午夜精品一区二区三区| 亚洲va韩国va欧美va| 久久久久国产精品厨房| 欧美专区亚洲专区| 国产91高潮流白浆在线麻豆| 爽好多水快深点欧美视频| 亚洲国产成人在线| 日韩一区二区精品葵司在线| 91视视频在线观看入口直接观看www | 久久久精品tv| 欧美日韩aaaaaa| 国产成人丝袜美腿| 蜜臀精品久久久久久蜜臀| 亚洲女女做受ⅹxx高潮| 久久久精品蜜桃| 欧美一级黄色片| 欧美丝袜第三区| 91在线视频播放地址| 韩国视频一区二区| 日韩精彩视频在线观看| 亚洲黄色片在线观看| 国产人成一区二区三区影院| 日韩一区二区三区免费观看| 欧美写真视频网站| 91在线丨porny丨国产| 国产成人综合自拍| 国产乱码精品一区二区三区av| 日韩国产一区二| 亚洲午夜精品在线| 亚洲最大的成人av| 一区二区三区久久久| 亚洲女子a中天字幕| 亚洲天堂网中文字| 中文字幕制服丝袜一区二区三区 | 亚洲卡通欧美制服中文| 国产精品三级电影| 欧美国产综合一区二区| 久久久欧美精品sm网站| 欧美zozozo| 精品国产污污免费网站入口 | 国产精品久久久久久久久搜平片 | 色天天综合久久久久综合片| av中文一区二区三区| 波多野结衣的一区二区三区| 不卡区在线中文字幕| 成人黄色网址在线观看| 成人黄色777网| 99久久综合国产精品| 成人91在线观看| 91麻豆.com| 欧美日韩一二区| 欧美一级xxx| 精品国产乱码久久久久久图片| 精品日韩成人av| 亚洲国产精品成人综合色在线婷婷| 26uuu亚洲综合色欧美| 久久先锋影音av鲁色资源| 久久精品亚洲国产奇米99 | 91麻豆精品国产自产在线| 91.成人天堂一区| 欧美成人激情免费网| 国产日韩在线不卡| 亚洲激情男女视频| 日韩高清一级片| 国产在线麻豆精品观看| 不卡一区二区中文字幕| 欧美婷婷六月丁香综合色| 日韩亚洲欧美中文三级| 国产欧美精品在线观看| 一区二区三区在线不卡| 免费在线欧美视频| 粉嫩高潮美女一区二区三区| 91日韩在线专区| 日韩一区二区三区在线视频| 久久精品水蜜桃av综合天堂| 亚洲欧美另类久久久精品| 美女视频一区在线观看| 成人久久视频在线观看| 69久久夜色精品国产69蝌蚪网| 久久久国际精品| 亚洲成人自拍网| 国产aⅴ精品一区二区三区色成熟| 91麻豆免费观看| 欧美精品一区二区三区蜜桃视频| 国产精品九色蝌蚪自拍| 免费精品视频在线| 色成人在线视频| 久久综合给合久久狠狠狠97色69| 洋洋av久久久久久久一区| 国产精品99久久久久久有的能看| 日本高清不卡一区| 久久九九国产精品| 免费人成网站在线观看欧美高清| 成人福利在线看| 日韩欧美不卡一区| 亚洲一区二区三区精品在线| 国产成人精品一区二区三区四区 | 一本一道久久a久久精品| 欧美精品一区二区三区高清aⅴ| 一区二区三区免费看视频| 国产成人av一区二区三区在线| 欧美日韩国产片| 亚洲欧美在线另类| 国产精品香蕉一区二区三区| 91精品国产一区二区三区蜜臀| 亚洲免费视频中文字幕| 成人深夜福利app| 久久精品人人做人人爽97| 日本在线不卡视频一二三区| 欧美性xxxxxx少妇| 亚洲欧美另类图片小说| 成人免费视频播放| 国产婷婷一区二区| 国产精品亚洲第一区在线暖暖韩国 | 91捆绑美女网站| 国产视频一区二区在线| 久久精品国产亚洲一区二区三区| 欧美视频你懂的| 亚洲人成网站影音先锋播放| 国产成人免费9x9x人网站视频| 精品对白一区国产伦| 久久国产欧美日韩精品| 日韩欧美一级二级三级久久久| 亚洲国产精品麻豆| 欧美性大战久久久久久久蜜臀| 亚洲码国产岛国毛片在线| 91麻豆文化传媒在线观看| 亚洲男同性恋视频| 91精品办公室少妇高潮对白| 亚洲一区二区视频在线观看|