Xceed Binary Encoding Library Documentation
Examples / Encoding and decoding from file to file (VB.NET example)
In This Topic
    Encoding and decoding from file to file (VB.NET example)
    In This Topic

    This sample encodes and decode with the Base64 format from one file to another

    VB.NET Copy Code

    Dim encoder As New XceedBinaryEncodingLib.XceedBinaryEncodingClass() 

    encoder.License( "your license key" )      

    Try
      encoder.EncodingFormat = New XceedBinaryEncodingLib.XceedBase64EncodingFormatClass()

      Dim bytesRead As Object = Nothing 

      ' Encode the file
      encoder.ProcessFile( "c:\test\file.txt", 0, 0, _
                           XceedBinaryEncodingLib.EXBFileProcessing.bfpEncode, _
                           true, "c:\test\encoded.txt", false, bytesRead ) 

      ' Decode the file
      encoder.ProcessFile( "c:\test\encoded.txt", 0, 0, _
                           XceedBinaryEncodingLib.EXBFileProcessing.bfpDecode, _
                           true, "c:\test\decoded.txt", false, bytesRead )  

    Catch except As System.Runtime.InteropServices.COMException
      MessageBox.Show( except.ToString() )
    End Try