jterwelp Posted May 11, 2005 Share Posted May 11, 2005 Can AutoIt take advantage of Windows XP built-in zip support? I found a VB6 sample (snippet below, full class is attached) but I'm unsure how to rework the code for use with AutoIt. Any ideas? Thanks, Jeff CompressedFolder.cls.txt Public Sub ExtractFile( _ ByVal Name As String, _ ByVal DestFolder As String) Dim oStream As IStream Dim tStat As STATSTG Dim abData() As Byte Dim lFF As Long ' Open the stream Set oStream = m_oStorage.OpenStream( _ Name, 0, _ STGM_READ Or STGM_SHARE_EXCLUSIVE) ' Get the stream info oStream.Stat tStat, STATFLAG_DEFAULT ' Initialize the array ReDim abData(0 To tStat.cbSize * 10000 - 1) ' Read the data from the stream oStream.Read abData(0), tStat.cbSize * 10000 ' Close the stream Set oStream = Nothing ' Save the data to a file lFF = FreeFile() Open DestFolder & "\" & Name For Binary As lFF Put lFF, , abData Close lFF End Sub Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now