Attribute VB_Name = "PatchStrom"
'File Information
Public Function FileInfo(FlNm As String) As String
FileInfo = "Filenme: " & FlNm
FileInfo = FileInfo & vbCrLf & "FileSize: " & FileSizeBytes(FlNm) & " bytes"
FileInfo = FileInfo & vbCrLf & "FileModified: " & FileLastModified(FlNm)
End Function
'FileInformation Sub Function
Public Function FileLastModified(FlNm As String) As String
FileLastModified = FileDateTime(FlNm)
End Function
'FileInformation Sub Function
Public Function FileSizeBytes(FlNm As String) As String
FileSizeBytes = FileLen(FlNm)
End Function
Public Function ReadByte(FileName As String, HexOffset As String) As String
Dim FF As Integer
Dim bye As Integer
FF = FreeFile
Open FileName For Binary As #FF
Get #FF, HexOffset, bye
Close #FF
ReadByte = bye 'Hex(Int(Asc(bye)))
End Function
Public Function WriteByte(FileName As String, HexOffset As String, CharCode As Long) As Boolean
Dim byt As String
Dim iint As Integer
byt = Chr(CharCode)
Open FileName For Binary As #1
Put #1, HexOffset, byt
Close #1
byt = CharCode
MsgBox ReadByte(FileName, HexOffset) & " :" & byt
If ReadByte(FileName, HexOffset) = byt Then
WriteByte = True
Else
WriteByte = False
End If
End Function