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
611 stars 112 forks source link

Failed to open archive #119

Closed marfixdev closed 1 year ago

marfixdev commented 1 year ago

I'm getting this error when trying to Iterate through items inside .rar file.

Console output : https://prnt.sc/QMrM7RfA3EtO

Here is my code : https://prnt.sc/AqWIKZuip64k

Note:Downloaded 7z.dll from google

rikyoz commented 1 year ago

Hi! The exception seems to be thrown while opening the file in the BitArchiveReader constructor.

Unfortunately, I cannot understand the second part of the error message (Yanl?? i?lev); this is probably the localized message corresponding to the specific error code returned by the internal code of the library or by 7-zip (and encoded using UTF-8, hence the ? characters, probably your console doesn't use the UTF-8 encoding). You can check the actual error code via BitException::code() or BitException::hresultCode() to find the cause of the exception.

Anyway, from my experience, I can think of some possible issues that can cause exceptions while reading .rar files:

marfixdev commented 1 year ago

After changing rar to rar5 it worked succesfully ! Is it possible to run it without 7z.dll? I would like to, thank you soo much for making this library.It's really usefull.

rikyoz commented 1 year ago

You're welcome! It's great to hear that it worked for you! :) As for running it without the 7z.dll, unfortunately, it's not possible right now. I will probably add it in the future, but not in the short term; for now, I'm more concentrated on improving the API and adding other features.