The function starts reading partitions information from MBR and then reads Extended MBR

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

/* relative sectors Number of Partition */

relative_sec=*(long *)(buffer+454+i*16);

no_sectors=*(long *)(buffer+458+i*16); /* number of sectors in partition*/

sectors_part[*no_par]=no_sectors; /* Array to store Number of sectors of partitions */

*sec=star_sec[*no_par]=relative_sec;

(*no_par)++;

}

} //loop close of for(i=0;i<4;i++)

} //loop close of if(*sec==0)

return;
}

Comments on coding:

The function starts reading the partitions information from the MBR and then reads the Extended MBRs if required. The function readabsolutesectors reads the absolute sector, specified by *sec.

sectors_part[*no_par] is the array to store the number of sectors of partitions. The partition number is specified by *no_par starting from 0.

no_sectors is the number of sectors in partition and relative_sec is the relative sector number for that partition.

star_sec[*no_par] is the array to store the stating sector numbers of partitions. The partition number is specified by *no_par starting from 0.

star_cyl, star_hea and star_sec are the arrays which keep the information of starting of each partition in terms of CHS. star_cyl stores the information of starting cylinders, star_hea stores the information of starting heads and star_sec stores the information of starting sectors of partitions.

For the description of readabsolutesectors function refer the chapters given earlier in this book.

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor