Function to find all logical partitions' information reading their partition entry

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

/* ***** check for active partition ***** */

if(*sec==se && *no_par==0) /*if primary partition */
{
*sec=se=0;
for(active_offset=446;active_offset<=494;active_offset+=16)
{
active_par=buffer[active_offset];

if(active_par==0x80) /* check for active partition */
break;
else
active_pos++; /* position of active partition */
}

/* for extended partition */

for(active_offset=450;active_offset<=511;active_offset+=16)
{
active_par=buffer[active_offset];

if(active_par==0x05 | active_par==0x0F)
/*check for extended partition */
break;
else
extended_pos++; /*position of extended partition */
}

if(active_pos==4)
active_pos=1;

if(extended_pos==4)
extended_pos=1;

partloc1=0x1C0+extended_pos*16;

}
else
{
active_pos=0;
extended_pos=1;
partloc1=0x1D0;

if(se_p!=0)
{
*sec=se=se_p; /*starting of extended partition */
}
}

/* Relative Sectors in partition */

relative_sec= *(unsigned long *)(buffer+454+active_pos*16);

/* Number of Sectors in Partition */

no_sectors=*(long *)(buffer+458+active_pos*16);

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