Le programme pour montrer des paramètres d'initialisation de grand volume de disque, a lu le DBR des grands volumes, qui sont 32MB plus grands que dans la taille

Data Recovery PRO DATA DOCTOR

Home | Order Online | Downloads | Contact Us | Software Knowledgebase

it | es | pt | fr | de | jp | kr | cn | ru | nl | gr


Le programme suivant est de lire le DBR des grands volumes, qui sont 32MB plus grands que dans la taille :


/* Programme pour montrer des paramètres d'initialisation de grand volume de disque */

# include "dos.h"
# include "stdio.h"

void main()
{

struct boot
{
unsigned char code[3] ; /* Jump Code */
unsigned char system_id[8] ; /* OEM name & Version */
int bytes_per_sec ; /* Bytes Per Sector */
char sec_per_clus ; /* Sectors Per Cluster*/
unsigned int res_sec ; /* Number of Reserved
Sectors */
char fat_copies ; /* Number of FATs */
unsigned int root_dir_entry ;/* Number of Root
Directory Entry */

unsigned int no_sects ; /* Number of Sectors in
Logical Volume (if
Volume is <= 32MB) */
unsigned char Media_id ; /* Media Descriptor Byte
*/
unsigned int sec_per_fat ; /* Sector Per FAT */
unsigned int sec_per_trk ; /* Sectors Per Track */
unsigned int no_sides ; /* Number of Heads */
unsigned long no_sp_res_sect ; /* Number of Hidden
Sectors */
unsigned long long_sec_num ; /* Total Sectors in
Logical Volume
( Size >32MB) */
unsigned long num_sec_per_FAT; /* Sectors Per FAT */
unsigned int binary_flags; /* Binary Flags */
unsigned char version_of_FAT1; /* First Byte of FAT
Version */
unsigned char version_of_FAT2; /* Second Byte of FAT
Version */

unsigned long root_dir_start_cluster;
/* Root Directory
Starting Cluster
Number */
unsigned int sec_num_of_file_sys;
/* Sector Number of
File System
Information Sector
*/

unsigned int sec_num_of_backup_boot_sec;
/* Sector Number of
Backup Boot Sector
*/
unsigned char reserved[12]; /* Reserved */
unsigned char logical_drive_number;
/* Physical Drive
Number of Logical
Volume */
unsigned char unused_byte; /* Unused Byte */
unsigned char hex_extd_boot_signature;
/* Extended Boot
Signature(29H) */
unsigned long binary_volume_ID;/* Binary Volume ID */
unsigned char volume_label[11];/* Volume Label */
unsigned char FAT_name[8]; /* FAT Name */

unsigned char rest_code[420] ; /* Rest 420 Bytes of
The DBR */
unsigned char magic_number[2]; /* Magic Number */
} ;

struct boot b ;
char temp[4] ;
int val, drive,i;

val = biosdisk( 2, 0x80, 1,0,1,1, &b ) ;
/* For First Hard Disk */

if ( val == -1 )
{
printf ( "Disk read Error...bad sector\n" ) ;
exit ( 1 ) ;
}

clrscr ( ) ;
printf ( " Jump Instruction Code = ");
for(i=0;i<=2;i++)
{
printf("%X",b.code[i]);
}
printf("(H)\n ");
printf ( "OEM name and version = %s\n ",
b.system_id ) ;

printf ( "Bytes per sector = %u\n ",
b.bytes_per_sec ) ;

printf ( "Sectors per cluster = %u\n ",
b.sec_per_clus ) ;

printf ( "Reserved sectors = %u\n ",
b.res_sec ) ;

printf ( "FAT copies = %d\n ",
b.fat_copies ) ;

printf ( "Root directory entries = %u\n ",
b.root_dir_entry ) ;

 

printf ( "No. of sectors on disk = %u\n ",
b.no_sects ) ;

printf ( "Media Descriptor Byte = %X(H)\n",
b.Media_id ) ;

printf ( "Sectors per FAT = %u\n ",
b.sec_per_fat ) ;

printf ( "Sectors per track = %u\n ",
b.sec_per_trk ) ;

printf ( "No. of sides = %u\n ",
b.no_sides ) ;

printf ( "No. of reserved (Hidden) sectors= %lu\n ",
b.no_sp_res_sect ) ;

printf ( "========== For Large(>32MB) Disks ========\n");

printf ( "No. of sectors,(if Volume is >32MB) = %lu\n ",
b.long_sec_num) ;

printf ( “Number of Sectors Per FAT = %lu\n “,
b.num_sec_per_FAT );

printf ( "Root Directory Starting Cluster = %lu\n ",
b.root_dir_start_cluster);

printf ( "File System Information Sector = %u\n ",
b.sec_num_of_file_sys);

printf ( "Sector Number of Backup Boot Sector = %u\n ",
b.sec_num_of_backup_boot_sec);

printf ( "Physical Drive Number = %X(H)\n",
b.logical_drive_number);

printf ( "Extended Boot Signature = %X(H)\n",
b.hex_extd_boot_signature);

printf ( "32-Bit Binary Volume ID = ");

Decimal_to_Binary(b.binary_volume_ID,32);

printf ( " (B)\n ");

printf ( "Volume Label = ");
for(i=0;i<=10;i++)
{
printf ( "%c",b.volume_label[i]);
}

printf ( "\n FAT name = ");
for(i=0;i<=7;i++)
{

printf ( "%c",b.FAT_name[i]);
}
printf ( "\n ");

printf ( "Magic Number = %X%X(H)",
b.magic_number[0],b.magic_number[1]);
getch();
}

Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi
Data Recovery with & without Programming


Publishers of the Book
Number of Pages
ISBN
Price of the Book


BPB Publications, New Delhi, India
540
81-7656-922-4
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)





Buy Data recovery Book

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Next page

© Copyright 2002-2005 DataDoctor.Biz

Home | Contact us | Downloads | Services | Resources | Terms and conditions | Site map

Website Data Recovery | recuperación de Datos | Récupération de données | Datenrettung | Recupero dati | データ復旧 | 데이터 복구 | 数据恢复 | Восстановление данных | De terugwinning van gegevens | Ανάκτηση δεδομένων
Sitemap Site map1 2 3 4 | Spanish1 2 3 | French1 2 3 | German1 2 3 | Italian1 2 3 | Portuguese1 2 3 | Japanese1 2 3 | Korean1 2 3 | Chinese1 2 3 | Russian1 2 3 | Dutch1 2 3 | Greek1 2 3
Data Recovery Book English | Spanish | French | German | Italian | Portuguese | Japanese | Korean | Chinese | Russian | Dutch | Greek