home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / MS_Sql_Dat19490811172005.psc / CodeModule.bas < prev   
BASIC Source File  |  2005-11-17  |  18KB  |  588 lines

  1. Attribute VB_Name = "CodeModule"
  2. Option Explicit
  3. Public Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
  4. Public strBackupFileName As String
  5. Public g_strBackupPath As String
  6. Public bTakeBackup As Boolean
  7. Public strServerWindowsName As String
  8. Public gsBackUpVariable As Integer
  9. Public pwd As String
  10.  
  11. Public g_sPassword As String
  12. Public g_sServerName As String
  13. Public g_sDatabase As String
  14.  
  15. Public ServerName As String
  16. Public InPath As String
  17. Public gdbConnection As New ADODB.Connection
  18. '-- C Style argv
  19. Public Type UNZIPnames
  20.   uzFiles(0 To 99) As String
  21. End Type
  22.  
  23. '-- Callback Large "String"
  24. Public Type UNZIPCBChar
  25.   ch(32800) As Byte
  26. End Type
  27.  
  28. '-- Callback Small "String"
  29. Public Type UNZIPCBCh
  30.   ch(256) As Byte
  31. End Type
  32.  
  33. '-- UNZIP32.DLL DCL Structure
  34. Public Type DCLIST
  35.   ExtractOnlyNewer  As Long    ' 1 = Extract Only Newer, Else 0
  36.   SpaceToUnderScore As Long    ' 1 = Convert Space To Underscore, Else 0
  37.   PromptToOverwrite As Long    ' 1 = Prompt To Overwrite Required, Else 0
  38.   fQuiet            As Long    ' 2 = No Messages, 1 = Less, 0 = All
  39.   ncflag            As Long    ' 1 = Write To Stdout, Else 0
  40.   ntflag            As Long    ' 1 = Test Zip File, Else 0
  41.   nvflag            As Long    ' 0 = Extract, 1 = List Zip Contents
  42.   nUflag            As Long    ' 1 = Extract Only Newer, Else 0
  43.   nzflag            As Long    ' 1 = Display Zip File Comment, Else 0
  44.   ndflag            As Long    ' 1 = Honor Directories, Else 0
  45.   noflag            As Long    ' 1 = Overwrite Files, Else 0
  46.   naflag            As Long    ' 1 = Convert CR To CRLF, Else 0
  47.   nZIflag           As Long    ' 1 = Zip Info Verbose, Else 0
  48.   C_flag            As Long    ' 1 = Case Insensitivity, 0 = Case Sensitivity
  49.   fPrivilege        As Long    ' 1 = ACL, 2 = Privileges
  50.   Zip               As String  ' The Zip Filename To Extract Files
  51.   ExtractDir        As String  ' The Extraction Directory, NULL If Extracting To Current Dir
  52.   lpszZipFN         As String
  53. End Type
  54.  
  55. '-- UNZIP32.DLL Userfunctions Structure
  56. Public Type USERFUNCTION
  57.   UZDLLPrnt     As Long     ' Pointer To Apps Print Function
  58.   UZDLLSND      As Long     ' Pointer To Apps Sound Function
  59.   UZDLLREPLACE  As Long     ' Pointer To Apps Replace Function
  60.   UZDLLPASSWORD As Long     ' Pointer To Apps Password Function
  61.   UZDLLMESSAGE  As Long     ' Pointer To Apps Message Function
  62.   UZDLLSERVICE  As Long     ' Pointer To Apps Service Function (Not Coded!)
  63.   TotalSizeComp As Long     ' Total Size Of Zip Archive
  64.   TotalSize     As Long     ' Total Size Of All Files In Archive
  65.   CompFactor    As Long     ' Compression Factor
  66.   NumMembers    As Long     ' Total Number Of All Files In The Archive
  67.   cchComment    As Integer  ' Flag If Archive Has A Comment!
  68. End Type
  69.  
  70. '-- UNZIP32.DLL Version Structure
  71. Public Type UZPVER
  72.   structlen       As Long         ' Length Of The Structure Being Passed
  73.   flag            As Long         ' Bit 0: is_beta  bit 1: uses_zlib
  74.   beta            As String * 10  ' e.g., "g BETA" or ""
  75.   date            As String * 20  ' e.g., "4 Sep 95" (beta) or "4 September 1995"
  76.   zlib            As String * 10  ' e.g., "1.0.5" or NULL
  77.   Unzip(1 To 4)   As Byte         ' Version Type Unzip
  78.   zipinfo(1 To 4) As Byte         ' Version Type Zip Info
  79.   os2dll          As Long         ' Version Type OS2 DLL
  80.   windll(1 To 4)  As Byte         ' Version Type Windows DLL
  81. End Type
  82.  
  83. '-- This Assumes UNZIP32.DLL Is In Your \Windows\System Directory!
  84. Private Declare Function Wiz_SingleEntryUnzip Lib "unzip32.dll" _
  85.   (ByVal ifnc As Long, ByRef ifnv As UNZIPnames, _
  86.    ByVal xfnc As Long, ByRef xfnv As UNZIPnames, _
  87.    dcll As DCLIST, Userf As USERFUNCTION) As Long
  88.  
  89. Private Declare Sub UzpVersion2 Lib "unzip32.dll" (uzpv As UZPVER)
  90.  
  91. 'argv
  92. Public Type ZIPnames
  93.     s(0 To 99) As String
  94. End Type
  95.  
  96. 'ZPOPT is used to set options in the zip32.dll
  97. Private Type ZPOPT
  98.     fSuffix As Long
  99.     fEncrypt As Long
  100.     fSystem As Long
  101.     fVolume As Long
  102.     fExtra As Long
  103.     fNoDirEntries As Long
  104.     fExcludeDate As Long
  105.     fIncludeDate As Long
  106.     fVerbose As Long
  107.     fQuiet As Long
  108.     fCRLF_LF As Long
  109.     fLF_CRLF As Long
  110.     fJunkDir As Long
  111.     fRecurse As Long
  112.     fGrow As Long
  113.     fForce As Long
  114.     fMove As Long
  115.     fDeleteEntries As Long
  116.     fUpdate As Long
  117.     fFreshen As Long
  118.     fJunkSFX As Long
  119.     fLatestTime As Long
  120.     fComment As Long
  121.     fOffsets As Long
  122.     fPrivilege As Long
  123.     fEncryption As Long
  124.     fRepair As Long
  125.     flevel As Byte
  126.     date As String ' 8 bytes long
  127.     szRootDir As String ' up to 256 bytes long
  128. End Type
  129.  
  130. Private Type ZIPUSERFUNCTIONS
  131.     DLLPrnt As Long
  132.     DLLPASSWORD As Long
  133.     DLLCOMMENT As Long
  134.     DLLSERVICE As Long
  135. End Type
  136.  
  137. 'Structure ZCL - not used by VB
  138. 'Private Type ZCL
  139. '    argc As Long            'number of files
  140. '    filename As String      'Name of the Zip file
  141. '    fileArray As ZIPnames   'The array of filenames
  142. 'End Type
  143.  
  144. ' Call back "string" (sic)
  145. Private Type CBChar
  146.     ch(4096) As Byte
  147. End Type
  148.  
  149. 'Local declares
  150.  
  151. ' Dim MYZCL As ZCL
  152.  
  153.  
  154. 'This assumes zip32.dll is in your \windows\system directory!
  155. Private Declare Function ZpInit Lib "zip32.dll" _
  156. (ByRef Zipfun As ZIPUSERFUNCTIONS) As Long ' Set Zip Callbacks
  157.  
  158. Private Declare Function ZpSetOptions Lib "zip32.dll" _
  159. (ByRef Opts As ZPOPT) As Long ' Set Zip options
  160.  
  161. Private Declare Function ZpGetOptions Lib "zip32.dll" _
  162. () As ZPOPT ' used to check encryption flag only
  163.  
  164. Private Declare Function ZpArchive Lib "zip32.dll" _
  165. (ByVal argc As Long, ByVal funame As String, ByRef argv As ZIPnames) As Long ' Real zipping action
  166. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  167.  
  168. Private uZipNumber As Integer
  169. Private uZipMessage As String
  170. Private uZipInfo As String
  171. Private uVBSkip As Integer
  172. Public msOutput As String
  173.  
  174.  
  175. ' Puts a function pointer in a structure
  176. Function FnPtr(ByVal lp As Long) As Long
  177.     FnPtr = lp
  178. End Function
  179.  
  180. ' Callback for zip32.dll
  181. Function DLLPrnt(ByRef fname As CBChar, ByVal x As Long) As Long
  182.     Dim s0$, xx As Long
  183.     Dim sVbZipInf As String
  184.     
  185.     ' always put this in callback routines!
  186.     On Error Resume Next
  187.     s0 = ""
  188.     For xx = 0 To x
  189.         If fname.ch(xx) = 0 Then xx = 99999 Else s0 = s0 + Chr(fname.ch(xx))
  190.     Next xx
  191.     
  192.     Debug.Print sVbZipInf & s0
  193.     msOutput = msOutput & s0
  194.     
  195.     sVbZipInf = ""
  196.     
  197.     DoEvents
  198.     DLLPrnt = 0
  199.     
  200. End Function
  201.  
  202. ' Callback for Zip32.dll ?
  203. Function DllServ(ByRef fname As CBChar, ByVal x As Long) As Long
  204.     
  205.     Dim s0 As String
  206.     Dim xx As Long
  207.     
  208.     On Error Resume Next
  209.     
  210.     s0 = ""
  211.     
  212.     For xx = 0 To x - 1
  213.         If fname.ch(xx) = 0 Then Exit For
  214.         s0 = s0 & Chr$(fname.ch(xx))
  215.     Next
  216.     
  217.     DllServ = 0
  218. End Function
  219.  
  220. ' Callback for zip32.dll
  221. Function DllPass(ByRef s1 As Byte, x As Long, _
  222.     ByRef s2 As Byte, _
  223.     ByRef s3 As Byte) As Long
  224.  
  225.     ' always put this in callback routines!
  226.     On Error Resume Next
  227.     ' not supported - always return 1
  228.     DllPass = 1
  229. End Function
  230.  
  231. ' Callback for zip32.dll
  232. Function DllComm(ByRef s1 As CBChar) As CBChar
  233.     
  234.     ' always put this in callback routines!
  235.     On Error Resume Next
  236.     ' not supported always return \0
  237.     s1.ch(0) = vbNullString
  238.     DllComm = s1
  239. End Function
  240.  
  241. 'Main Subroutine
  242. Public Function VBZip(argc As Integer, zipname As String, _
  243.         mynames As ZIPnames, junk As Integer, _
  244.         recurse As Integer, updat As Integer, _
  245.         freshen As Integer, basename As String, _
  246.         Optional Encrypt As Integer = 0, _
  247.         Optional IncludeSystem As Integer = 0, _
  248.         Optional IgnoreDirectoryEntries As Integer = 0, _
  249.         Optional Verbose As Integer = 0, _
  250.         Optional Quiet As Integer = 0, _
  251.         Optional CRLFtoLF As Integer = 0, _
  252.         Optional LFtoCRLF As Integer = 0, _
  253.         Optional Grow As Integer = 0, _
  254.         Optional Force As Integer = 0, _
  255.         Optional iMove As Integer = 0, _
  256.         Optional DeleteEntries As Integer = 0) As Long
  257.     
  258.     Dim hmem As Long, xx As Integer
  259.     Dim retcode As Long
  260.     Dim MYUSER As ZIPUSERFUNCTIONS
  261.     Dim MYOPT As ZPOPT
  262.     
  263.     On Error Resume Next ' nothing will go wrong :-)
  264.     
  265.     msOutput = ""
  266.     
  267.     ' Set address of callback functions
  268.     MYUSER.DLLPrnt = FnPtr(AddressOf DLLPrnt)
  269.     MYUSER.DLLPASSWORD = FnPtr(AddressOf DllPass)
  270.     MYUSER.DLLCOMMENT = FnPtr(AddressOf DllComm)
  271.     MYUSER.DLLSERVICE = 0& ' not coded yet :-)
  272. '    retcode = ZpInit(MYUSER)
  273.     
  274.     ' Set zip options
  275.     MYOPT.fSuffix = 0        ' include suffixes (not yet implemented)
  276.     MYOPT.fEncrypt = Encrypt     ' 1 if encryption wanted
  277.     MYOPT.fSystem = IncludeSystem        ' 1 to include system/hidden files
  278.     MYOPT.fVolume = 0        ' 1 if storing volume label
  279.     MYOPT.fExtra = 0         ' 1 if including extra attributes
  280.     MYOPT.fNoDirEntries = IgnoreDirectoryEntries  ' 1 if ignoring directory entries
  281.     MYOPT.fExcludeDate = 0   ' 1 if excluding files earlier than a specified date
  282.     MYOPT.fIncludeDate = 0   ' 1 if including files earlier than a specified date
  283.     MYOPT.fVerbose = Verbose       ' 1 if full messages wanted
  284.     MYOPT.fQuiet = Quiet         ' 1 if minimum messages wanted
  285.     MYOPT.fCRLF_LF = CRLFtoLF        ' 1 if translate CR/LF to LF
  286.     MYOPT.fLF_CRLF = LFtoCRLF ' 1 if translate LF to CR/LF
  287.     MYOPT.fJunkDir = junk    ' 1 if junking directory names
  288.     MYOPT.fRecurse = recurse ' 1 if recursing into subdirectories
  289.     MYOPT.fGrow = Grow          ' 1 if allow appending to zip file
  290.     MYOPT.fForce = Force         ' 1 if making entries using DOS names
  291.     MYOPT.fMove = iMove          ' 1 if deleting files added or updated
  292.     MYOPT.fDeleteEntries = DeleteEntries ' 1 if files passed have to be deleted
  293.     MYOPT.fUpdate = updat    ' 1 if updating zip file--overwrite only if newer
  294.     MYOPT.fFreshen = freshen ' 1 if freshening zip file--overwrite only
  295.     MYOPT.fJunkSFX = 0       ' 1 if junking sfx prefix
  296.     MYOPT.fLatestTime = 0    ' 1 if setting zip file time to time of latest file in archive
  297.     MYOPT.fComment = 0       ' 1 if putting comment in zip file
  298.     MYOPT.fOffsets = 0       ' 1 if updating archive offsets for sfx Files
  299.     MYOPT.fPrivilege = 0     ' 1 if not saving privelages
  300.     MYOPT.fEncryption = 0    'Read only property!
  301.     MYOPT.fRepair = 0        ' 1=> fix archive, 2=> try harder to fix
  302.     MYOPT.flevel = 0         ' compression level - should be 0!!!
  303.     MYOPT.date = vbNullString ' "12/31/79"? US Date?
  304.     MYOPT.szRootDir = UCase$(basename)
  305.     
  306.     retcode = ZpInit(MYUSER)
  307.     ' Set options
  308.     retcode = ZpSetOptions(MYOPT)
  309.     
  310.     ' ZCL not needed in VB
  311.     ' MYZCL.argc = 2
  312.     ' MYZCL.filename = "c:\wiz\new.zip"
  313.     ' MYZCL.fileArray = MYNAMES
  314.     
  315.     ' Go for it!
  316.     
  317.     retcode = ZpArchive(argc, zipname, mynames)
  318.     
  319.     VBZip = retcode
  320. End Function
  321.  
  322.  
  323.  
  324. '-- Callback For UNZIP32.DLL - Receive Message Function
  325. Public Sub UZReceiveDLLMessage(ByVal ucsize As Long, _
  326.     ByVal csiz As Long, _
  327.     ByVal cfactor As Integer, _
  328.     ByVal mo As Integer, _
  329.     ByVal dy As Integer, _
  330.     ByVal yr As Integer, _
  331.     ByVal hh As Integer, _
  332.     ByVal mm As Integer, _
  333.     ByVal c As Byte, ByRef fname As UNZIPCBCh, _
  334.     ByRef meth As UNZIPCBCh, ByVal crc As Long, _
  335.     ByVal fCrypt As Byte)
  336.  
  337.   Dim s0     As String
  338.   Dim xx     As Long
  339.   Dim strout As String * 80
  340.  
  341.   '-- Always Put This In Callback Routines!
  342.   On Error Resume Next
  343.  
  344.   '------------------------------------------------
  345.   '-- This Is Where The Received Messages Are
  346.   '-- Printed Out And Displayed.
  347.   '-- You Can Modify Below!
  348.   '------------------------------------------------
  349.  
  350.   strout = Space(80)
  351.  
  352.   '-- For Zip Message Printing
  353.   If uZipNumber = 0 Then
  354.     Mid(strout, 1, 50) = "Filename:"
  355.     Mid(strout, 53, 4) = "Size"
  356.     Mid(strout, 62, 4) = "Date"
  357.     Mid(strout, 71, 4) = "Time"
  358.     uZipMessage = strout & vbNewLine
  359.     strout = Space(80)
  360.   End If
  361.  
  362.   s0 = ""
  363.  
  364.   '-- Do Not Change This For Next!!!
  365.   For xx = 0 To 255
  366.     If fname.ch(xx) = 0 Then Exit For
  367.     s0 = s0 & Chr(fname.ch(xx))
  368.   Next
  369.  
  370.   '-- Assign Zip Information For Printing
  371.   Mid(strout, 1, 50) = Mid(s0, 1, 50)
  372.   Mid(strout, 51, 7) = Right("        " & Str(ucsize), 7)
  373.   Mid(strout, 60, 3) = Right("0" & Trim(Str(mo)), 2) & "/"
  374.   Mid(strout, 63, 3) = Right("0" & Trim(Str(dy)), 2) & "/"
  375.   Mid(strout, 66, 2) = Right("0" & Trim(Str(yr)), 2)
  376.   Mid(strout, 70, 3) = Right(Str(hh), 2) & ":"
  377.   Mid(strout, 73, 2) = Right("0" & Trim(Str(mm)), 2)
  378.  
  379.   ' Mid(strout, 75, 2) = Right(" " & Str(cfactor), 2)
  380.   ' Mid(strout, 78, 8) = Right("        " & Str(csiz), 8)
  381.   ' s0 = ""
  382.   ' For xx = 0 To 255
  383.   '     If meth.ch(xx) = 0 Then exit for
  384.   '     s0 = s0 & Chr(meth.ch(xx))
  385.   ' Next xx
  386.  
  387.   '-- Do Not Modify Below!!!
  388.   uZipMessage = uZipMessage & strout & vbNewLine
  389.   uZipNumber = uZipNumber + 1
  390.  
  391. End Sub
  392.  
  393. '-- Callback For UNZIP32.DLL - Print Message Function
  394. Public Function UZDLLPrnt(ByRef fname As UNZIPCBChar, ByVal x As Long) As Long
  395.  
  396.   Dim s0 As String
  397.   Dim xx As Long
  398.  
  399.   '-- Always Put This In Callback Routines!
  400.   On Error Resume Next
  401.  
  402.   s0 = ""
  403.  
  404.   '-- Gets The UNZIP32.DLL Message For Displaying.
  405.   For xx = 0 To x - 1
  406.     If fname.ch(xx) = 0 Then Exit For
  407.     s0 = s0 & Chr(fname.ch(xx))
  408.   Next
  409.  
  410.   '-- Assign Zip Information
  411.   If Mid$(s0, 1, 1) = vbLf Then s0 = vbNewLine ' Damn UNIX :-)
  412.   uZipInfo = uZipInfo & s0
  413.  
  414. msOutput = uZipInfo
  415.     
  416.   UZDLLPrnt = 0
  417.  
  418. End Function
  419.  
  420. '-- Callback For UNZIP32.DLL - DLL Service Function
  421. Public Function UZDLLServ(ByRef mname As UNZIPCBChar, ByVal x As Long) As Long
  422.  
  423.     Dim s0 As String
  424.     Dim xx As Long
  425.     
  426.     '-- Always Put This In Callback Routines!
  427.     On Error Resume Next
  428.     
  429.     s0 = ""
  430.     '-- Get Zip32.DLL Message For processing
  431.     For xx = 0 To x - 1
  432.         If mname.ch(xx) = 0 Then Exit For
  433.         s0 = s0 + Chr(mname.ch(xx))
  434.     Next
  435.     ' At this point, s0 contains the message passed from the DLL
  436.     ' It is up to the developer to code something useful here :)
  437.     UZDLLServ = 0 ' Setting this to 1 will abort the zip!
  438.  
  439. End Function
  440.  
  441. '-- Callback For UNZIP32.DLL - Password Function
  442. Public Function UZDLLPass(ByRef p As UNZIPCBCh, _
  443.   ByVal n As Long, ByRef m As UNZIPCBCh, _
  444.   ByRef Name As UNZIPCBCh) As Integer
  445.  
  446.   Dim prompt     As String
  447.   Dim xx         As Integer
  448.   Dim szpassword As String
  449.  
  450.   '-- Always Put This In Callback Routines!
  451.   On Error Resume Next
  452.  
  453.   UZDLLPass = 1
  454.  
  455.   If uVBSkip = 1 Then Exit Function
  456.  
  457.   '-- Get The Zip File Password
  458.   If gsBackUpVariable = 2 Then
  459.        szpassword = "Critical%data@very*userfull~05"
  460.   ElseIf gsBackUpVariable = 3 Then
  461.        szpassword = "This*will!save&my@work^05"
  462.   End If
  463.  
  464.   '-- No Password So Exit The Function
  465.   If szpassword = "" Then
  466.     uVBSkip = 1
  467.     Exit Function
  468.   End If
  469.  
  470.   '-- Zip File Password So Process It
  471.   For xx = 0 To 255
  472.     If m.ch(xx) = 0 Then
  473.       Exit For
  474.     Else
  475.       prompt = prompt & Chr(m.ch(xx))
  476.     End If
  477.   Next
  478.  
  479.   For xx = 0 To n - 1
  480.     p.ch(xx) = 0
  481.   Next
  482.  
  483.   For xx = 0 To Len(szpassword) - 1
  484.     p.ch(xx) = Asc(Mid(szpassword, xx + 1, 1))
  485.   Next
  486.  
  487.   p.ch(xx) = Chr(0) ' Put Null Terminator For C
  488.  
  489.   UZDLLPass = 0
  490.  
  491. End Function
  492.  
  493. '-- Callback For UNZIP32.DLL - Report Function To Overwrite Files.
  494. '-- This Function Will Display A MsgBox Asking The User
  495. '-- If They Would Like To Overwrite The Files.
  496. Public Function UZDLLRep(ByRef fname As UNZIPCBChar) As Long
  497.  
  498.   Dim s0 As String
  499.   Dim xx As Long
  500.  
  501.   '-- Always Put This In Callback Routines!
  502.   On Error Resume Next
  503.  
  504.   UZDLLRep = 100 ' 100 = Do Not Overwrite - Keep Asking User
  505.   s0 = ""
  506.  
  507.   For xx = 0 To 255
  508.     If fname.ch(xx) = 0 Then xx = 99999 Else s0 = s0 & Chr(fname.ch(xx))
  509.   Next
  510.  
  511.   '-- This Is The MsgBox Code
  512.   xx = MsgBox("Overwrite " & s0 & "?", vbExclamation & vbYesNoCancel, _
  513.               "VBUnZip32 - File Already Exists!")
  514.  
  515.   If xx = vbNo Then Exit Function
  516.  
  517.   If xx = vbCancel Then
  518.     UZDLLRep = 104       ' 104 = Overwrite None
  519.     Exit Function
  520.   End If
  521.  
  522.   UZDLLRep = 102         ' 102 = Overwrite 103 = Overwrite All
  523.  
  524. End Function
  525.  
  526. '-- ASCIIZ To String Function
  527. Public Function szTrim(szString As String) As String
  528.     
  529.     Dim pos As Integer
  530.     Dim ln  As Integer
  531.     
  532.     pos = InStr(szString, Chr(0))
  533.     ln = Len(szString)
  534.     
  535.     Select Case pos
  536.         Case Is > 1
  537.             szTrim = Trim(Left(szString, pos - 1))
  538.         Case 1
  539.             szTrim = ""
  540.         Case Else
  541.             szTrim = Trim(szString)
  542.     End Select
  543.  
  544. End Function
  545.  
  546.  
  547. Public Function VBUnzip(ByRef sZipFileName, ByRef sUnzipDirectory As String, _
  548.     ByRef iExtractNewer As Integer, _
  549.     ByRef iSpaceUnderScore As Integer, _
  550.     ByRef iPromptOverwrite As Integer, _
  551.     ByRef iQuiet As Integer, _
  552.     ByRef iWriteStdO iPromptOv3AderScore im(szStt
  553.  e,xx) = 0 Thr
  554.    ) sUnzipDti 102 = O=:0ye#outines!
  555.  0   eer
  556.     Dim ln  As Integer
  557.     
  558.     pos = InStr(szS) 0   eerrS3kipeCallbac=
  559. Publis
  560.   p.cye#outin0    szTrim = ""
  561.  :0ye#ouUnderScore Abac=mos As Integore Abac=yMUnzip ""
  562. RefpTre Aire Aire ABes AagezTrim = Tr0cti,= Overwrite None
  563.     Exit Functeporn Zip Inf 1
  564.     p      szTrim = ""n     ' 10 = Extract, 1 = ore As Int iWri p    
  565.     
  566.     Dim pos As Inact, 1 = ore As Int iPV    Dim pn=fABes Aagez  Inactnding User
  567.   s0 = ""
  568.  
  569.   For xx = .C)actndizctndizctnd)re 2 As iWri p uZipcf As,nctionnctie_im pn=n=  Long
  570.  nd)re 2 As iWri pdNue  Dim lnptutines!
  571.  0   eri p  'tie_im pn=n=5bacuizcLLServ(ByRef mnamepIf
  572.  
  573.   SWp  'tie_im pn=n=5im(udeSystei2
  574.  
  575.   SW:xverwrite None
  576.    M_d)re 2=n=5bacuizcLLSnMExclamae 2 psrames
  577.  R This Function WiMt
  578.    M_dim(StDLLServ(ByRef mnamepIfcLL Next
  579.  
  580.   UZec This FunctG), 2eR*   "ction WiMt
  581.  ?yimrn     As String * 10  ' e.g., "g BETA" or *
  582.   UZe*10g BETA" Function
  583.   EnaeTA" or *t
  584.  t(Bys SdLCipDts1t(Bys SBETA" or *
  585.   UZe*10g BETA"  Aire ABes AagezTight("        *
  586.   UZe*10g BETA"  Aire AB*
  587.   UZe*ea0M As String '-- Assig0 To 2c
  588. '-- tWriteStd1A SdLCe_im Si1 c As Byte, ByRe-- tWriteStd1A hg B = ""-