bit7z cannot load 7z.dll #225
-
Hi. I'm working on a project that needs compression and extraction of 7z files. I found bit7z is really useful and easy to use. I was able to add bit7z to my project and it worked great with 7za.dll shared library. But I wasn't able to use with 7z.dll shared library (with the propose of extend file types compatibility) because bit7zlibrary cannot load it and throws an exception with the message "Failed to load the 7-zip library". I tried with versions 23.01 and 24.07 of both dll and have the same result: bit7zlibrary loaded the 7za.dll but not the 7z.dll. I also tried to move 7z.dll to different locations such as System32 folder and project's folder but bit7z cannot load it. I'm posting this discussion to ask for some ideas on what may be causing this issue and what I can try to resolve it. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi!
What is the full exception message? Usually, after the In my experience, there are two common reasons for such loading problems: the path passed to |
Beta Was this translation helpful? Give feedback.
Hi!
What is the full exception message? Usually, after the
"Failed to load the 7-zip library"
part, there's some more detail about what caused the exception.You can also check the
code()
of the exception to see what the specific problem is.In my experience, there are two common reasons for such loading problems: the path passed to
Bit7zLibrary
's constructor is incorrect, or you're trying to use a DLL built for a different architecture (e.g. a 64-bit DLL in a 32-bit program, or vice versa).