rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
634 stars 116 forks source link

[Bug]: BitExtractor extractor{ lib, BitFormat::Rar }; exception : "Cannot open archive '*.rar'" or "Cannot get class object" #101

Closed linfengca closed 2 years ago

linfengca commented 2 years ago

bit7z version

4.0.x beta

7-zip version

v21.07, v19.00, v18.05

7-zip DLL used

7z.dll, 7za.dll

MSVC version

2017

Architecture

x86_64

Which version of Windows are you using?

Windows 11

Bug description

I tried to decompress a rar file. 7z decompress is OK. bit7z reports an exception. I used different 7z versions,like 1805(7z.dll,7za.dll),1900(7z.dll),2201(7z.dll, x86,x64)

    Bit7zLibrary lib{ L"7z.dll" };
    BitExtractor extractor{ lib, BitFormat::Rar };
    extractor.extract(L"7zlib-master.rar", L""); //extracting a simple archive

Steps to reproduce

No response

Expected behavior

No response

Relevant compilation output

No response

Code of Conduct

linfengca commented 2 years ago

use Auto mode , or Rar5, succeed.