Results 1 to 7 of 7

Thread: [RESOLVED] FileStream, ReadBytes with interval

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    15

    [RESOLVED] FileStream, ReadBytes with interval

    I'm trying to read bytes with 1200 interval for 100 times, but I can't get it working. This is my code:

    Code:
    Try
                    Dim fr As FileStream = File.OpenRead(OpenFileDialog1.FileName)
                    Dim data(fr.Length) As Byte
                    Using reader As New BinaryReader(fr)
                        Const START As Long = 4896
                        fr.Seek(START, SeekOrigin.Begin)
                        data = reader.ReadBytes(data.Length)
                    End Using
                    ListBox1.Items.Add(System.Text.Encoding.UTF8.GetString(data))
                    fr.Close()
                Catch
                End Try
    I need to read from offset 4896, then from 6096, then from 7296 for 100 times and for each interval add to the listbox. who can help me? Thanks
    Last edited by rossi_4656; Dec 20th, 2011 at 08:13 AM.
    Sorry for my bad english

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width