庫用的是zlibwapi.dll
壓縮檔案里有TXT檔案能正常解壓出來,出了TXT其他的都解壓不出來報錯如下
OpenCurrentFile ErrorOpenCurrentFile ErrorOfficeTest.exe 中的 0x1000faff 處最可能的例外: 0xC0000005: 讀取位置 0xbab2eeed 時發生訪問沖突
關鍵代碼
CFile tmpFile(strFilePath,CFile::modeCreate|CFile::modeWrite);
int fileLength = zFileInfo.uncompressed_size;
char* fileData = new char[fileLength];
int nLen = 1;
while(nLen)
{
nLen = unzReadCurrentFile(zFile,(voidp)fileData,fileLength);
tmpFile.Write((voidp)fileData,nLen);
}
uj5u.com熱心網友回復:
用zlib自帶的測驗程式都無法解壓……什么鬼轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/50714.html
下一篇:c/c++ 彩色影像直方圖均衡 RGB->HSI 對亮度分量I進行直方圖均衡后HSI->RGB 得到結果圖片不正確
