Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7-zip dll not found #6

Open
asad11rer opened this issue Oct 18, 2023 · 4 comments
Open

7-zip dll not found #6

asad11rer opened this issue Oct 18, 2023 · 4 comments

Comments

@asad11rer
Copy link

asad11rer commented Oct 18, 2023

I simply run the following codes, but at 5th line it is generating this error (7-zip dll not found):

1 With New cVszArchive
2 .AddFile App.Path & "\Form1.frm"
3 .AddFile App.Path & "\Project1.vbp"
4 .Parameter("x") = 3 '-- CompressionLevel = Fast
5 .CompressArchive (App.Path & "\test.7z")
6 End With7
MsgBox "test.7z created ok", vbExclamation

Why it's and what is the solution?

@wqweto
Copy link
Owner

wqweto commented Oct 19, 2023

README says

This is a VB6 helper component that makes using original 7z.dll in your VB6 projects possible.

. . . and has a link to 7-zip SDK.

It also says

Note that 7za.dll (from 7-zip extras) can be used to compress/extract only 7z archives (no zip support). The even smaller 7zxa.dll (172KB) can be used to only extract 7z archives.

@asad11rer
Copy link
Author

I just registered 7-zip.dll with the command (regsvr32 7-zip.dll) and then it started working.

But, when I created a distributable package using "Package & Development Wizard" and run the Project1.exe, it again started generating this error (7-zip dll not found).

Any solution or commend please?

@wqweto
Copy link
Owner

wqweto commented Oct 19, 2023

You don't need to register 7z.dll as it's not an ActiveX DLL and there is no 7-zip.dll at play here (don't understand what is this DLL).

Just copy 7z.dll next to your application .exe file or put it in a subfolder and use Init method to specify full 7z.dll filename as explained in the README section for API documentation.

Note that you might need earlier version of 7z.dll as latest versions have troubles working with VszLib. The one I'm using in my projects is version 9.22

@asad11rer
Copy link
Author

I am really thankful for the guidance.

I just used the 7z.dll from version 9.22 and now it is working.

7z.dll from the latest version causes problem sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants