Beispiel #1
0
        private void Button2_Click(object sender, EventArgs e)
        {
            WIN32_DiskDrive selectedDrive = comboBox1.SelectedItem as WIN32_DiskDrive;

            disk.Open(selectedDrive);


            disk.Read(446);

            Partition[] partitions = new Partition[4];
            partitions[0] = new Partition(disk.Read(16));
            partitions[1] = new Partition(disk.Read(16));
            partitions[2] = new Partition(disk.Read(16));
            partitions[3] = new Partition(disk.Read(16));



            Int64 begin = partitions[0].NumberOfSectors * selectedDrive.BytesPerSector;

            disk.Seek(begin, SeekOrigin.Begin);

            richTextBox1.Text = ByteArrayToString(disk.Read(1024));



            disk.Close();
        }
Beispiel #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            comboBox1.Items.Clear();
            comboBox1.Items.AddRange(WIN32_DiskDrive.GetDrives());

            if (comboBox1.Items.Count > 0)
            {
                comboBox1.SelectedIndex = 0;
            }
        }