Was using Info-Zip dll's in VB6 and am trying convert/upgrade them for
use them vb.net 2002.
I've attached the code (2 zipped .vb's), which were converted from
VB6.
If I can get this working, I'll post it back to the net so others can
use it.
(yes I am aware of the ICSharpCode.SharpZipLib.dll, and others, but I
want to use this for now, please and thanks)
Currently I get a Out of Memory Exception in VBUnzip32 in the line >>
Call UzpVersion2(UZVER)
here is the sample call:
msbUnzip("F:\ExtractTest.zip", "F:\ExtractTest_Delete")
here is the sample code:
'-new 8/27/00 for unzipping
Private Sub msbUnzip(ByVal sZipFName$, ByVal sExtractRoot$)
Dim MsgTmp As String, goUnzip as clsUnzip
' Cls
' MsgOut.Text = ""
If goUnzip Is Nothing Then goUnzip = New clsUnzip()
With goUnzip
'-- Init Global Message Variables
.gsZipInfo = ""
.giZipNumber = 0 ' Holds The Number Of Zip Files
'-- Select UNZIP32.DLL Options - Change As Required!
.giPromptOverWrite = euPromptOverWrite.euPOWTrue ' 1 = Prompt
To Overwrite
.giOverWriteFiles = euOverWriteFiles.euOWFLeaveAlone ' 1 =
Always Overwrite Files
.giDisplayComment = euDisplayComment.euDCNoComment ' 1 =
Display comment ONLY!!!
'-- Change The Next Line To Do The Actual Unzip!
.giExtractList = euExtractList.euEListContents ' 1 =
List Contents Of Zip 0 = Extract
.giHonorDirectories = euHonorDirectories.euHDDoDirs ' 1 =
Honour Zip Directories
'-- Select Filenames If Required
'-- Or Just Select All Files
.gsZipNames(0) = vbNullString
.giNumberFiles = 0
'-- Select Filenames To Exclude From Processing
' Note UNIX convention!
' vbxnames.s(0) = "VBSYX/VBSYX.MID"
' vbxnames.s(1) = "VBSYX/VBSYX.SYX"
' numx = 2
'-- Or Just Select All Files
.gsExcludeNames(0) = vbNullString
.giNumberXFiles = 0
'-- Change The Next 2 Lines As Required!
'-- These Should Point To Your Directory
.gsZipFileName = sZipFName 'ZipFName.Text
.gsExtractDir = sExtractRoot 'ExtractRoot.Text
If .gsExtractDir <> "" Then .giExtractList = 0 ' unzip if dir
specified
'-- Let's Go And Unzip Them!
Call .VBUnZip32()
'-- Tell The User What Happened
If Len(.gsZipMessage) > 0 Then
MsgTmp = .gsZipMessage
End If
'-- Display Zip File Information.
If Len(.gsZipInfo) > 0 Then
MsgTmp = MsgTmp & vbNewLine & "uZipInfo is:" & vbNewLine &
..gsZipInfo
End If
'-- Display The Number Of Extracted Files!
If .giZipNumber > 0 Then
MsgTmp = MsgTmp & vbNewLine & "Number Of Files: " &
Str(.giZipNumber)
End If
End With
End Sub