Xceed Binary Encoding Library Documentation
Encoding from memory to file (VB example)
Examples > Encoding from memory to file (VB example)

This sample encodes with the Base64 format from memory to a file

Visual Basic Copy Code

Dim xBinEncode As New XceedBinaryEncoding

Call xBinEncode.License( "your license key" ) 

Dim vaData As Variant 

Set xBinEncode.EncodingFormat = New XceedBase64EncodingFormat

vaData = "This is the data to encode" 

On Error Resume Next 

Call xBinEncode.WriteFile(vaData, bfpEncode, True, "c:\temp\encoded.b64", False) 

If Err.Number = 0 Then
  Call MsgBox("Data encoded successfully!") 
Else
  Call MsgBox(Err.Description) 
End If 

On Error Goto 0

Set xBinEncode = Nothing