If get drive Geometry function Fails, Display Error Message and Exit

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

/*If get drive Geometry function Fails, Display Error Message and Exit */

if(g.spt==0)
{
printf("\n Get Drive Geometry Function Fails....");
printf("\n Extensions Not Supported, Press any Key to
Exit...");
getch();
exit(1);
}

return *g.sectors; /* Return The Number of
Sectors on Drive */

}

void main()
{
unsigned long loop=0, Sectors_in_HDD2=0;
unsigned char buffer[61440]; /* Data buffer of 61440
bytes Equivalent to
120 Sectors */
unsigned long i=0;
char choice;

clrscr();

/* If total no. of hard disks attached is less then two Display Error Message and Exit. */

if(((char)peekb(0x0040, 0x0075))<2)
{
printf("\n\n You Must Have At least Two Hard Disks
Attached to your Computer To Run This");
printf("\n Program. This Program has been developed
to Wipe the Data of Second Hard Disk.");
printf("\n Press any Key to Exit... ");
getch();
exit(1);
}

Sectors_in_HDD2 = getdrivegeometry (0x81);
printf(" Total Sectors in Second Hard Disk =
%lu\n\n",
Sectors_in_HDD2);

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17

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