storing decoded files in memory instead of temp file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mustakbal
    New Member
    • Jul 2007
    • 25

    #1

    storing decoded files in memory instead of temp file

    I was wondering if in VB6, the contents of a decoded file could be stored in memory instead of in a temporary file. I found out that this could be done in VB.Net right "after using DecodeToByte to obtain the file contents, you would then convert the byte data to a string which can be manipulated as needed:". The code to use is:

    [CODE=vbnet]'Decode file from base64
    Dim bt64 As Byte() = DecodeToByte(sr c1)
    'Convert byte data into a string
    Dim fileData As String = Encoding.Defaul t.GetString(bt6 4)
    'Split string into individual lines
    Dim fileLines As String() = fileData.Split( ControlChars.Cr Lf)
    'Set label text to appropriate line
    Label1.Text = fileLines(index 1)[/CODE]

    Can this code, or something similar, be used in VB6?
    Thanks in advance.
Working...