title: Using ListView to read binary file
body: <p>I have made this exe that contains a listview, so when I open a binary file, it shows text pointers in a column and text strings in another column.</p>
  
  <p>I managed to show the pointers, using the "for loop", but I had no idea on how to use the loop to show text strings, so what I want to use, is to loop through the pointers, to show the text it points to, and stop at 00 00 after each text.</p>
  
  <p>and <a href="http://www.mediafire.com/?mr79ecpomq77w8z" rel="nofollow">here</a> is a sample on the binary file structure.</p>
  
  <p>The first 4 bytes of the binary files are the pointers/strings amount, the next 4 bytes * the 1st 4 bytes are the pointers, the rest is texts strings, each string is separated by 00 00 and are all Unicode.</p>
  
  <p>So can anyone please help me on how to show strings for each pointer in the Strings Column?</p>
  
  <p>EDIT: here is teh code for the button that opens the binary file:</p>
  
  <pre><code>        private void menuItem8_Click(object sender, EventArgs e)
      {
          textBox1.Text = "";
          OpenFileDialog ofd = new OpenFileDialog();
          ofd.Title = "Open File";
          ofd.Filter = "Data Files (*.dat)|*.dat|All Files (*.*)|*.*";
          if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
          {
              MessageBox.Show("File opened Succesfully!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
              path = ofd.FileName;
              BinaryReader br = new BinaryReader(File.OpenRead(path));               
              int num_pointers = br.ReadInt32();
              textBox1.Text = num_pointers.ToString();
              for (int i = 0; i &lt; num_pointers; i++)
              {
                  br.BaseStream.Position = i * 4 + 4;
                  listView1.Items.Add(br.ReadUInt32().ToString("X"));
              }
              br.Close();
              br = null;
          }
          ofd.Dispose();
          ofd = null;
      }
  </code></pre>