So I'm trying to use the 7-zip32.dll to perform operations on files from Access rather than through the command line. But I can't get it to work, no matter what I try. The error is always the same:
This is the code I tried:
It does nothing so far, of course, but I'm trying to get that first step done and then keep going step by step, but I can't even do that. I'm keeping it simple, it's a form with only the one command button, then if I can at least finish that sub's run without errors I'll build upon that.
Of course, the dll file is registered (with regsvr32). I tried with "7-zip32" in the Lib variable, with the whole path ("C:\Program Files\7-Zip\7-zip32.dll"), nothing works, same error always.
Does any of you know how I should proceed? Thanks a lot!
Code:
Run-time error '453':
Can't find DLL entry point SevenZipOpenArchive in 7-zip32.dll
Code:
Option Compare Database
Private Type tagINDIVIDUALINFO
dwOriginalSize As Long
dwCompressedSize As Long
dwCRC As Long
uFlag As Long
uOSType As Long
wRatio As Integer
wDate As Integer
wTime As Integer
szFilename As String * 513
dummy1 As String * 3
szAttribute As String * 8
szMode As String * 8
End Type
Private Declare Function SevenZipOpenArchive Lib "7-zip32.dll" (ByVal hwnd As Long, ByVal szFilename As String, ByVal dwMode As Long) As Long
Private Declare Function SevenZipCloseArchive Lib "7-zip32.dll" (ByVal harc As Long) As Long
Private Declare Function SevenZipFindFirst Lib "7-zip32.dll" (ByVal harc As Long, ByVal szWildName As String, lpSubInfo As tagINDIVIDUALINFO) As Long
Private Declare Function SevenZipFindNext Lib "7-zip32.dll" (ByVal harc As Long, lpSubInfo As tagINDIVIDUALINFO) As Long
Private Sub Command0_Click()
Dim harc As Long
harc = SevenZipOpenArchive(Me.hwnd, "C:\Program Files\7-Zip\readme.zip", 0)
End Sub
Of course, the dll file is registered (with regsvr32). I tried with "7-zip32" in the Lib variable, with the whole path ("C:\Program Files\7-Zip\7-zip32.dll"), nothing works, same error always.
Does any of you know how I should proceed? Thanks a lot!