Visual Basic 6.0
Visual Basic 6.0
Get Contents of File as Base64
See more Encryption Examples
Demonstrates how to read the contents of a file and convert to a base64 string.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim bd As New ChilkatBinData
success = bd.LoadFile("qa_data/jpg/starfish.jpg")
If (success = 0) Then
Debug.Print "Failed to load file."
Exit Sub
End If
Debug.Print bd.GetEncoded("base64")
' If you want mult-line base64:
Debug.Print "--"
Debug.Print bd.GetEncoded("base64_mime")
' If you want hex..
Debug.Print "--"
Debug.Print bd.GetEncoded("hex")
' etc.