
            From: "Lexicon's Labyrinth" <lexicon@accesscom.com> 
            To: <support@bigspeedsoft.com>
            Subject: additional declarations required for VB usage of bigspeedzip.dll
            Date: Wed, 29 Dec 1999 20:46:40 +0100

            Hi, 
            here are some additional declarations that are needed to make 
            bigspeedzip.dll useful under vb5. 
            these will allow the user to extract the date and time of the zipfiles 
            in a format that is usable by VB 

            '---------API Functions to convert DOS Times to VB Times 
            '-----put this in a module 
            '  Declare the Structures 
            Type FILETIME 
                dwLowDateTime As Long 
                dwHighdateTime As Long 
            End Type 
            Type SYSTEMTIME 
                wYear As Integer 
                wMonth As Integer 
                wDayOfWeek As Integer 
                wDay As Integer 
                wHour As Integer 
                wMinute As Integer 
                wSecond As Integer 
                wMilliseconds As Integer 
            End Type 
            '--------------------------- 
            '  declare the functions 
            '  call DosDateToFileTime then FileTimeToSystemTime 
            '   you can then extract the info from the system time struct 
            Declare Function DosDateTimeToFileTime& Lib "kernel32" (ByVal wFatDate 
            As Long, ByVal wFatTime As Long, lpFileTime As FILETIME) 
            Declare Function FileTimeToSystemTime& Lib "kernel32" (lpFileTime As 
            FILETIME, lpSystemTime As SYSTEMTIME) 
            '------end module code 


            an example of usage follows: 


            '---------Using DosDateTimeToFileTime & FileTimeToSystemTime with VB5 
            '  Loop and display functions omitted for clarity 
            '  this should be enough to explain the concept 
                Dim FileDosTime As FILETIME 
                Dim FileSystemTime As SYSTEMTIME 
                filedatereturn = zGetFileDate(i) 
                filetimereturn = zGetFileTime(i) 
                'convert dos date to FILETIME STRUCT 
                retval = DosDateTimeToFileTime(filedatereturn, filetimereturn, 
            FileDosTime) 
                'convert FILETIME STRUCT TO SYSTEMTIME STRUCT 
                retval = FileTimeToSystemTime(FileDosTime, FileSystemTime) 
                'lets get the date 
                filedatestring = FileSystemTime.wMonth & "/" & FileSystemTime.wDay 
            & "/" & FileSystemTime.wYear 
                'do leading 0 for hours if needed 
                If FileSystemTime.wHour <= 9 Then 
                    hourstring = "0" & FileSystemTime.wHour 
                Else 
                    hourstring = FileSystemTime.wHour 
                End If 
                'do leading zero for minutes if needed 
                If FileSystemTime.wMinute <= 9 Then 
                    minutestring = "0" & FileSystemTime.wMinute 
                Else 
                    minutestring = FileSystemTime.wMinute 
                End If 
                'put it together and format it 
                filetimestring = hourstring & ":" & minutestring 
            '-------end code sample 

            Hope this helps someone in the future! 

            Chuck Davis 
            PS many thanks to Richard for his VB5 declarations that were included 
            with the dll and his help in pointing me in the right direction with 
            this problem! 