home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / Zipping_wi2123818172008.psc / modVBUnzip.bas < prev   
BASIC Source File  |  2008-08-17  |  19KB  |  511 lines

  1. Attribute VB_Name = "modVBUnzip"
  2. Option Explicit
  3.  
  4. '-- Please Do Not Remove These Comment Lines!
  5. '----------------------------------------------------------------
  6. '-- Sample VB 5 / VB 6 code to drive unzip32.dll
  7. '-- Contributed to the Info-ZIP project by Mike Le Voi
  8. '--
  9. '-- Contact me at: mlevoi@modemss.brisnet.org.au
  10. '--
  11. '-- Visit my home page at: http://modemss.brisnet.org.au/~mlevoi
  12. '--
  13. '-- Use this code at your own risk. Nothing implied or warranted
  14. '-- to work on your machine :-)
  15. '----------------------------------------------------------------
  16. '--
  17. '-- This Source Code Is Freely Available From The Info-ZIP Project
  18. '-- Web Server At:
  19. '-- ftp://ftp.info-zip.org/pub/infozip/infozip.html
  20. '--
  21. '-- A Very Special Thanks To Mr. Mike Le Voi
  22. '-- And Mr. Mike White
  23. '-- And The Fine People Of The Info-ZIP Group
  24. '-- For Letting Me Use And Modify Their Original
  25. '-- Visual Basic 5.0 Code! Thank You Mike Le Voi.
  26. '-- For Your Hard Work In Helping Me Get This To Work!!!
  27. '---------------------------------------------------------------
  28. '--
  29. '-- Contributed To The Info-ZIP Project By Raymond L. King.
  30. '-- Modified June 21, 1998
  31. '-- By Raymond L. King
  32. '-- Custom Software Designers
  33. '--
  34. '-- Contact Me At: king@ntplx.net
  35. '-- ICQ 434355
  36. '-- Or Visit Our Home Page At: http://www.ntplx.net/~king
  37. '--
  38. '---------------------------------------------------------------
  39. '--
  40. '-- Modified August 17, 1998
  41. '-- by Christian Spieler
  42. '-- (implemented sort of a "real" user interface)
  43. '-- Modified May 11, 2003
  44. '-- by Christian Spieler
  45. '-- (use late binding for referencing the common dialog)
  46. '--
  47. '---------------------------------------------------------------#
  48. '--
  49. '-- Extended August 17, 2008
  50. '-- by J÷rg von Busekist
  51. '-- (implemented simple to use subs and functions to show zip content
  52. '-- and to extract zip files and to delete single files in a zip file.
  53. '-- Changed Public to Private constants)
  54. '---------------------------------------------------------------
  55.  
  56. '-- C Style argv
  57. Private Type UNZIPnames
  58.   uzFiles(0 To 99) As String
  59. End Type
  60.  
  61. '-- Callback Large "String"
  62. Private Type UNZIPCBChar
  63.   ch(32800) As Byte
  64. End Type
  65.  
  66. '-- Callback Small "String"
  67. Private Type UNZIPCBCh
  68.   ch(256) As Byte
  69. End Type
  70.  
  71. '-- UNZIP32.DLL DCL Structure
  72. Private Type DCLIST
  73.   ExtractOnlyNewer  As Long    ' 1 = Extract Only Newer/New, Else 0
  74.   SpaceToUnderscore As Long    ' 1 = Convert Space To Underscore, Else 0
  75.   PromptToOverwrite As Long    ' 1 = Prompt To Overwrite Required, Else 0
  76.   fQuiet            As Long    ' 2 = No Messages, 1 = Less, 0 = All
  77.   ncflag            As Long    ' 1 = Write To Stdout, Else 0
  78.   ntflag            As Long    ' 1 = Test Zip File, Else 0
  79.   nvflag            As Long    ' 0 = Extract, 1 = List Zip Contents
  80.   nfflag            As Long    ' 1 = Extract Only Newer Over Existing, Else 0
  81.   nzflag            As Long    ' 1 = Display Zip File Comment, Else 0
  82.   ndflag            As Long    ' 1 = Honor Directories, Else 0
  83.   noflag            As Long    ' 1 = Overwrite Files, Else 0
  84.   naflag            As Long    ' 1 = Convert CR To CRLF, Else 0
  85.   nZIflag           As Long    ' 1 = Zip Info Verbose, Else 0
  86.   C_flag            As Long    ' 1 = Case Insensitivity, 0 = Case Sensitivity
  87.   fPrivilege        As Long    ' 1 = ACL, 2 = Privileges
  88.   Zip               As String  ' The Zip Filename To Extract Files
  89.   Extractdir        As String  ' The Extraction Directory, NULL If Extracting To Current Dir
  90. End Type
  91.  
  92. '-- UNZIP32.DLL Userfunctions Structure
  93. Private Type USERFUNCTION
  94.   UZDLLPrnt     As Long     ' Pointer To Apps Print Function
  95.   UZDLLSND      As Long     ' Pointer To Apps Sound Function
  96.   UZDLLREPLACE  As Long     ' Pointer To Apps Replace Function
  97.   UZDLLPASSWORD As Long     ' Pointer To Apps Password Function
  98.   UZDLLMESSAGE  As Long     ' Pointer To Apps Message Function
  99.   UZDLLSERVICE  As Long     ' Pointer To Apps Service Function (Not Coded!)
  100.   TotalSizeComp As Long     ' Total Size Of Zip Archive
  101.   TotalSize     As Long     ' Total Size Of All Files In Archive
  102.   CompFactor    As Long     ' Compression Factor
  103.   NumMembers    As Long     ' Total Number Of All Files In The Archive
  104.   cchComment    As Integer  ' Flag If Archive Has A Comment!
  105. End Type
  106.  
  107. '-- UNZIP32.DLL Version Structure
  108. Private Type UZPVER
  109.   structlen       As Long         ' Length Of The Structure Being Passed
  110.   flag            As Long         ' Bit 0: is_beta  bit 1: uses_zlib
  111.   beta            As String * 10  ' e.g., "g BETA" or ""
  112.   Date            As String * 20  ' e.g., "4 Sep 95" (beta) or "4 September 1995"
  113.   zlib            As String * 10  ' e.g., "1.0.5" or NULL
  114.   unzip(1 To 4)   As Byte         ' Version Type Unzip
  115.   zipinfo(1 To 4) As Byte         ' Version Type Zip Info
  116.   os2dll          As Long         ' Version Type OS2 DLL
  117.   windll(1 To 4)  As Byte         ' Version Type Windows DLL
  118. End Type
  119.  
  120. '-- This Assumes UNZIP32.DLL Is In Your \Windows\System Directory!
  121. Private Declare Function Wiz_SingleEntryUnzip Lib "unzip32.dll" (ByVal ifnc As _
  122.     Long, ByRef ifnv As UNZIPnames, ByVal xfnc As Long, ByRef xfnv As UNZIPnames, _
  123.     dcll As DCLIST, Userf As USERFUNCTION) As Long
  124.  
  125. Private Declare Sub UzpVersion2 Lib "unzip32.dll" (uzpv As UZPVER)
  126.  
  127. '-- Private Variables For Structure Access
  128. Private UZDCL  As DCLIST
  129. Private UZUSER As USERFUNCTION
  130. Private UZVER  As UZPVER
  131.  
  132. '-- Private Variables For Setting The
  133. '-- UNZIP32.DLL DCLIST Structure
  134. '-- These Must Be Set Before The Actual Call To VBUnZip32
  135. Private uExtractOnlyNewer As Integer  ' 1 = Extract Only Newer/New, Else 0
  136. Private uSpaceUnderScore  As Integer  ' 1 = Convert Space To Underscore, Else 0
  137. Private uPromptOverWrite  As Integer  ' 1 = Prompt To Overwrite Required, Else 0
  138. Private uQuiet            As Integer  ' 2 = No Messages, 1 = Less, 0 = All
  139. Private uWriteStdOut      As Integer  ' 1 = Write To Stdout, Else 0
  140. Private uTestZip          As Integer  ' 1 = Test Zip File, Else 0
  141. Private uExtractList      As Integer  ' 0 = Extract, 1 = List Contents
  142. Private uFreshenExisting  As Integer  ' 1 = Update Existing by Newer, Else 0
  143. Private uDisplayComment   As Integer  ' 1 = Display Zip File Comment, Else 0
  144. Private uHonorDirectories As Integer  ' 1 = Honor Directories, Else 0
  145. Private uOverWriteFiles   As Integer  ' 1 = Overwrite Files, Else 0
  146. Private uConvertCR_CRLF   As Integer  ' 1 = Convert CR To CRLF, Else 0
  147. Private uVerbose          As Integer  ' 1 = Zip Info Verbose
  148. Private uCaseSensitivity  As Integer  ' 1 = Case Insensitivity, 0 = Case Sensitivity
  149. Private uPrivilege        As Integer  ' 1 = ACL, 2 = Privileges, Else 0
  150. Private uZipFileName      As String   ' The Zip File Name
  151. Private uExtractDir       As String   ' Extraction Directory, Null If Current Directory
  152.  
  153. '-- Private Program Variables
  154. Private uZipNumber    As Long         ' Zip File Number
  155. Private uNumberFiles  As Long         ' Number Of Files
  156. Private uNumberXFiles As Long         ' Number Of Extracted Files
  157. Private uZipMessage   As String       ' For Zip Message
  158. Private uZipInfo      As String       ' For Zip Information
  159. Private uZipNames     As UNZIPnames   ' Names Of Files To Unzip
  160. Private uExcludeNames As UNZIPnames   ' Names Of Zip Files To Exclude
  161. Private uVbSkip       As Integer      ' For DLL Password Function
  162.  
  163. Private arFileNames() As String      'For File Names in String-Array
  164.  
  165.  
  166. '-- Puts A Function Pointer In A Structure
  167. '-- For Callbacks.
  168. Public Function FnPtr(ByVal lp As Long) As Long
  169.  
  170.   FnPtr = lp
  171.  
  172. End Function
  173.  
  174. '-- Callback For UNZIP32.DLL - Receive Message Function
  175. Public Sub UZReceiveDLLMessage(ByVal ucsize As Long, ByVal csiz As Long, ByVal _
  176.     cfactor As Integer, ByVal mo As Integer, ByVal dy As Integer, ByVal yr As _
  177.     Integer, ByVal hh As Integer, ByVal mm As Integer, ByVal c As Byte, ByRef fname _
  178.     As UNZIPCBCh, ByRef meth As UNZIPCBCh, ByVal crc As Long, ByVal fCrypt As Byte)
  179.  
  180.   Dim s0     As String
  181.   Dim xx     As Long
  182.   Dim strout As String * 80
  183.  
  184.   '-- Always Put This In Callback Routines!
  185.   On Error Resume Next
  186.  
  187.   '------------------------------------------------
  188.   '-- This Is Where The Received Messages Are
  189.   '-- Printed Out And Displayed.
  190.   '-- You Can Modify Below!
  191.   '------------------------------------------------
  192.  
  193.   strout = Space$(80)
  194.  
  195.   '-- For Zip Message Printing
  196.   If uZipNumber = 0 Then
  197.     Mid(strout, 1, 50) = "Filename:"
  198.     Mid(strout, 53, 4) = "Size"
  199.     Mid(strout, 62, 4) = "Date"
  200.     Mid(strout, 71, 4) = "Time"
  201.     uZipMessage = strout & vbNewLine
  202.     strout = Space$(80)
  203.   End If
  204.  
  205.   s0 = ""
  206.  
  207.   '-- Do Not Change This For Next!!!
  208.   For xx = 0 To 255
  209.     If fname.ch(xx) = 0 Then Exit For
  210.     s0 = s0 & Chr$(fname.ch(xx))
  211.   Next
  212.  
  213.   arFileNames(UBound(arFileNames) - LBound(arFileNames) - 1) = s0
  214.   ReDim Preserve arFileNames(UBound(arFileNames) - LBound(arFileNames) + 1)
  215.  
  216.   '-- Assign Zip Information For Printing
  217.   Mid$(strout, 1, 50) = Mid$(s0, 1, 50)
  218.   Mid$(strout, 51, 7) = Right$("        " & CStr(ucsize), 7)
  219.   Mid$(strout, 60, 3) = Right$("0" & Trim$(CStr(mo)), 2) & "/"
  220.   Mid$(strout, 63, 3) = Right$("0" & Trim$(CStr(dy)), 2) & "/"
  221.   Mid$(strout, 66, 2) = Right$("0" & Trim$(CStr(yr)), 2)
  222.   Mid$(strout, 70, 3) = Right$(Str$(hh), 2) & ":"
  223.   Mid$(strout, 73, 2) = Right$("0" & Trim$(CStr(mm)), 2)
  224.  
  225.   ' Mid(strout, 75, 2) = Right$(" " & CStr(cfactor), 2)
  226.   ' Mid(strout, 78, 8) = Right$("        " & CStr(csiz), 8)
  227.   ' s0 = ""
  228.   ' For xx = 0 To 255
  229.   '     If meth.ch(xx) = 0 Then Exit For
  230.   '     s0 = s0 & Chr$(meth.ch(xx))
  231.   ' Next xx
  232.  
  233.   '-- Do Not Modify Below!!!
  234.   uZipMessage = uZipMessage & strout & vbNewLine
  235.   uZipNumber = uZipNumber + 1
  236.  
  237. End Sub
  238.  
  239. '-- Callback For UNZIP32.DLL - Print Message Function
  240. Public Function UZDLLPrnt(ByRef fname As UNZIPCBChar, ByVal x As Long) As Long
  241.  
  242.   Dim s0 As String
  243.   Dim xx As Long
  244.  
  245.   '-- Always Put This In Callback Routines!
  246.   On Error Resume Next
  247.  
  248.   s0 = ""
  249.  
  250.   '-- Gets The UNZIP32.DLL Message For Displaying.
  251.   For xx = 0 To x - 1
  252.     If fname.ch(xx) = 0 Then Exit For
  253.     s0 = s0 & Chr$(fname.ch(xx))
  254.   Next
  255.  
  256.   '-- Assign Zip Information
  257.   If Mid$(s0, 1, 1) = vbLf Then s0 = vbNewLine ' Damn UNIX :-)
  258.   uZipInfo = uZipInfo & s0
  259.  
  260.   UZDLLPrnt = 0
  261.  
  262. End Function
  263.  
  264. '-- Callback For UNZIP32.DLL - DLL Service Function
  265. Public Function UZDLLServ(ByRef mname As UNZIPCBChar, ByVal x As Long) As Long
  266.  
  267.     Dim s0 As String
  268.     Dim xx As Long
  269.  
  270.     '-- Always Put This In Callback Routines!
  271.     On Error Resume Next
  272.  
  273.     ' Parameter x contains the size of the extracted archive entry.
  274.     ' This information may be used for some kind of progress display...
  275.  
  276.     s0 = ""
  277.     '-- Get Zip32.DLL Message For processing
  278.     For xx = 0 To UBound(mname.ch)
  279.         If mname.ch(xx) = 0 Then Exit For
  280.         s0 = s0 & Chr$(mname.ch(xx))
  281.     Next
  282.     ' At this point, s0 contains the message passed from the DLL
  283.     ' It is up to the developer to code something useful here :)
  284.  
  285.     UZDLLServ = 0 ' Setting this to 1 will abort the zip!
  286.  
  287. End Function
  288.  
  289. '-- Callback For UNZIP32.DLL - Password Function
  290. Public Function UZDLLPass(ByRef p As UNZIPCBCh, ByVal n As Long, ByRef m As _
  291.     UNZIPCBCh, ByRef Name As UNZIPCBCh) As Integer
  292.  
  293.   Dim prompt     As String
  294.   Dim xx         As Integer
  295.   Dim szpassword As String
  296.  
  297.   '-- Always Put This In Callback Routines!
  298.   On Error Resume Next
  299.  
  300.   UZDLLPass = 1
  301.  
  302.   If uVbSkip = 1 Then Exit Function
  303.  
  304.   '-- Get The Zip File Password
  305.   szpassword = InputBox("Please Enter The Password!")
  306.  
  307.   '-- No Password So Exit The Function
  308.   If Len(szpassword) = 0 Then
  309.     uVbSkip = 1
  310.     Exit Function
  311.   End If
  312.  
  313.   '-- Zip File Password So Process It
  314.   For xx = 0 To 255
  315.     If m.ch(xx) = 0 Then
  316.       Exit For
  317.     Else
  318.       prompt = prompt & Chr$(m.ch(xx))
  319.     End If
  320.   Next
  321.  
  322.   For xx = 0 To n - 1
  323.     p.ch(xx) = 0
  324.   Next
  325.  
  326.   For xx = 0 To Len(szpassword) - 1
  327.     p.ch(xx) = Asc(Mid$(szpassword, xx + 1, 1))
  328.   Next
  329.  
  330.   p.ch(xx) = 0 ' Put Null Terminator For C
  331.  
  332.   UZDLLPass = 0
  333.  
  334. End Function
  335.  
  336. '-- Callback For UNZIP32.DLL - Report Function To Overwrite Files.
  337. '-- This Function Will Display A MsgBox Asking The User
  338. '-- If They Would Like To Overwrite The Files.
  339. Public Function UZDLLRep(ByRef fname As UNZIPCBChar) As Long
  340.  
  341.   Dim s0 As String
  342.   Dim xx As Long
  343.  
  344.   '-- Always Put This In Callback Routines!
  345.   On Error Resume Next
  346.  
  347.   UZDLLRep = 100 ' 100 = Do Not Overwrite - Keep Asking User
  348.   s0 = ""
  349.  
  350.   For xx = 0 To 255
  351.     If fname.ch(xx) = 0 Then Exit For
  352.     s0 = s0 & Chr$(fname.ch(xx))
  353.   Next
  354.  
  355.   '-- This Is The MsgBox Code
  356.   xx = MsgBox("Overwrite " & s0 & "?", vbExclamation & vbYesNoCancel, _
  357.       "VBUnZip32 - File Already Exists!")
  358.  
  359.   If xx = vbNo Then Exit Function
  360.  
  361.   If xx = vbCancel Then
  362.     UZDLLRep = 104       ' 104 = Overwrite None
  363.     Exit Function
  364.   End If
  365.  
  366.   UZDLLRep = 102         ' 102 = Overwrite, 103 = Overwrite All
  367.  
  368. End Function
  369.  
  370. '-- ASCIIZ To String Function
  371. Public Function szTrim(szString As String) As String
  372.  
  373.   Dim pos As Long
  374.  
  375.   pos = InStr(szString, vbNullChar)
  376.  
  377.   Select Case pos
  378.     Case Is > 1
  379.       szTrim = Trim$(Left$(szString, pos - 1))
  380.     Case 1
  381.       szTrim = ""
  382.     Case Else
  383.       szTrim = Trim$(szString)
  384.   End Select
  385.  
  386. End Function
  387.  
  388. '-- Main UNZIP32.DLL UnZip32 Subroutine
  389. '-- (WARNING!) Do Not Change!
  390. Public Sub VBUnZip32()
  391.  
  392.   Dim retcode As Long
  393.   Dim MsgStr As String
  394.   
  395.   Erase arFileNames
  396.   ReDim arFileNames(1)
  397.  
  398.   '-- Set The UNZIP32.DLL Options
  399.   '-- (WARNING!) Do Not Change
  400.   UZDCL.ExtractOnlyNewer = uExtractOnlyNewer ' 1 = Extract Only Newer/New
  401.   UZDCL.SpaceToUnderscore = uSpaceUnderScore ' 1 = Convert Space To Underscore
  402.   UZDCL.PromptToOverwrite = uPromptOverWrite ' 1 = Prompt To Overwrite Required
  403.   UZDCL.fQuiet = uQuiet                      ' 2 = No Messages 1 = Less 0 = All
  404.   UZDCL.ncflag = uWriteStdOut                ' 1 = Write To Stdout
  405.   UZDCL.ntflag = uTestZip                    ' 1 = Test Zip File
  406.   UZDCL.nvflag = uExtractList                ' 0 = Extract 1 = List Contents
  407.   UZDCL.nfflag = uFreshenExisting            ' 1 = Update Existing by Newer
  408.   UZDCL.nzflag = uDisplayComment             ' 1 = Display Zip File Comment
  409.   UZDCL.ndflag = uHonorDirectories           ' 1 = Honour Directories
  410.   UZDCL.noflag = uOverWriteFiles             ' 1 = Overwrite Files
  411.   UZDCL.naflag = uConvertCR_CRLF             ' 1 = Convert CR To CRLF
  412.   UZDCL.nZIflag = uVerbose                   ' 1 = Zip Info Verbose
  413.   UZDCL.C_flag = uCaseSensitivity            ' 1 = Case insensitivity, 0 = Case Sensitivity
  414.   UZDCL.fPrivilege = uPrivilege              ' 1 = ACL 2 = Priv
  415.   UZDCL.Zip = uZipFileName                   ' ZIP Filename
  416.   UZDCL.Extractdir = uExtractDir             ' Extraction Directory, NULL If Extracting
  417.                                              ' To Current Directory
  418.   '-- Set Callback Addresses
  419.   '-- (WARNING!!!) Do Not Change
  420.   UZUSER.UZDLLPrnt = FnPtr(AddressOf UZDLLPrnt)
  421.   UZUSER.UZDLLSND = 0&    '-- Not Supported
  422.   UZUSER.UZDLLREPLACE = FnPtr(AddressOf UZDLLRep)
  423.   UZUSER.UZDLLPASSWORD = FnPtr(AddressOf UZDLLPass)
  424.   UZUSER.UZDLLMESSAGE = FnPtr(AddressOf UZReceiveDLLMessage)
  425.   UZUSER.UZDLLSERVICE = FnPtr(AddressOf UZDLLServ)
  426.  
  427.   '-- Set UNZIP32.DLL Version Space
  428.   '-- (WARNING!!!) Do Not Change
  429.   With UZVER
  430.     .structlen = Len(UZVER)
  431.     .beta = Space$(9) & vbNullChar
  432.     .Date = Space$(19) & vbNullChar
  433.     .zlib = Space$(9) & vbNullChar
  434.   End With
  435.  
  436.   '-- Get Version
  437.   Call UzpVersion2(UZVER)
  438.  
  439.   '--------------------------------------
  440.   '-- You Can Change This For Displaying
  441.   '-- The Version Information!
  442.   '--------------------------------------
  443.   MsgStr$ = "DLL Date: " & szTrim(UZVER.Date)
  444.   MsgStr$ = MsgStr$ & vbNewLine$ & "Zip Info: " & Hex$(UZVER.zipinfo(1)) & "." _
  445.       & Hex$(UZVER.zipinfo(2)) & Hex$(UZVER.zipinfo(3))
  446.   MsgStr$ = MsgStr$ & vbNewLine$ & "DLL Version: " & Hex$(UZVER.windll(1)) & _
  447.       "." & Hex$(UZVER.windll(2)) & Hex$(UZVER.windll(3))
  448.   MsgStr$ = MsgStr$ & vbNewLine$ & "--------------"
  449.   '-- End Of Version Information.
  450.  
  451.   '-- Go UnZip The Files! (Do Not Change Below!!!)
  452.   '-- This Is The Actual UnZip Routine
  453.   retcode = Wiz_SingleEntryUnzip(uNumberFiles, uZipNames, uNumberXFiles, _
  454.       uExcludeNames, UZDCL, UZUSER)
  455.   '---------------------------------------------------------------
  456.  
  457.   '-- If There Is An Error Display A MsgBox!
  458.   'If retcode <> 0 Then MsgBox retcode
  459.  
  460.   '-- You Can Change This As Needed!
  461.   '-- For Compression Information
  462.   MsgStr$ = MsgStr$ & vbNewLine & "Only Shows If uExtractList = 1 List Contents"
  463.   MsgStr$ = MsgStr$ & vbNewLine & "--------------"
  464.   MsgStr$ = MsgStr$ & vbNewLine & "Comment         : " & UZUSER.cchComment
  465.   MsgStr$ = MsgStr$ & vbNewLine & "Total Size Comp : " & UZUSER.TotalSizeComp
  466.   MsgStr$ = MsgStr$ & vbNewLine & "Total Size      : " & UZUSER.TotalSize
  467.   MsgStr$ = MsgStr$ & vbNewLine & "Compress Factor : %" & UZUSER.CompFactor
  468.   MsgStr$ = MsgStr$ & vbNewLine & "Num Of Members  : " & UZUSER.NumMembers
  469.   MsgStr$ = MsgStr$ & vbNewLine & "--------------"
  470.  
  471.   Form1.txtMessages.Text = Form1.txtMessages.Text & MsgStr$ & vbCrLf
  472.   
  473. End Sub
  474.  
  475.  
  476. 'This Function gives back an array of the filenames of the single files
  477. 'contained in a given zip file
  478.  
  479. Public Function ZipShow(Zipfile As String, Extractdir As String) As String()
  480.  
  481.     Dim MsgTmp As String
  482.     
  483.     uZipNumber = 0
  484.     
  485.     '-- Init Global Message Variables
  486.     uOverWriteFiles = 1   ' 1 = Always Overwrite Files
  487.     uExtractList = 1       ' 1 = List Contents Of Zip 0 = Extract
  488.     uHonorDirectories = 1  ' 1 = Honour Zip Directories = Ordnerstruktur, die mit gezippt wurde, behalten
  489.     
  490.     uNumberFiles = 0    'this means it shows ALL the files in this zip
  491.                         'essentially necessary if you unzip single files before
  492.                         'with the ZipExtractSingleFiles Routine.
  493.     
  494.     uZip
  495. '-- Cal"Aees! (Do Not C0Len      'essentially necessary if you unzi (Do
  496. '--
  497.    & MsgStr$ & vbC/tine.
  498.     
  499.    zip N'--
  500.  fil& vbC/tine.
  501.     
  502.    zie
  503. '-u(ip N'--
  504. exhp--------------u(ip Ne.
  505.    ontBerv = 0 ' Sei,E, Ne.            AoractLisLb
  506. eFSi        ' 1 = y uti : %" & UZThis In Cit geziZThisewLilent
  507. L.nf   ' 1 = y uti : %Str$ = 0 ' pwly necN-----ziZThisew = y .nf 1ge.            AoractLisLb
  508. eFSi& vbC/tine.
  509.     vbCrb
  510. ePublis
  511.     uy .nf 1ge.            AoxOif yoThenv = 0 ' tdI befooOaL