Function to Hide and show Cursor on the screen

Data Recovery Software
Software Development Home Contact us Support

Data Recovery | Data Recovery Software | Partition Recovery | Undelete Partition | Password Recovery | Keylogger | File Recovery | Undelete Software

/* Function to Hide (and show) Cursor on the screen */

show_hide_cursor ( 32, 0 );

gotoxy(15,18);cprintf("[ %d ] Files Recovered...",
num);

/* search for the data until the ending sector of the disk */

while(loop<Sectors_in_HDD2)
{
/* Read one Sector (Sector No. = loop) */
readabsolutesectors ( 0x81, loop, 1, buffer );

gotoxy(19,16);cprintf("Scanning Sector Number = % ld",
loop);

if(kbhit())
{
show_hide_cursor ( 6, 7 ); /* Retrieve the
cursor before
Exit the program
*/
exit(0);
}

/* if specified header is found */
if((memcmp ( buffer, header,7))==0)
{

/* logic to provide the file name to automatically
create the files to save the recovered data */

strcpy(filename, path);
itoa(num,temp,10);
strcat(filename, temp);
strcat(filename,".DOC");
start_file=loop; /* starting sector of file */

gotoxy(5,19);cprintf("File Found..., Saving As %s",
filename);
num++;

Data Recovery
Data Recovery Services Pen Drive Data Recovery Data Recovery Utilities Digital Camera Data Recovery
File Recovery Software Undelete Files Data Recovery Utility Files Recovery
USB Drive Data Recovery iPod Data Recovery Data Retrieval Software Windows Data Recovery

////////////// File Close Conditions \\\\\\\\\\\\\\\\

file_size=0;
while( file_size<5000000)
{

loop++;
file_size+=512;
readabsolutesectors ( 0x81, loop, 1, buffer );

gotoxy(19,16);cprintf("Scanning Sector Number = % ld" ,
loop);

/* if file size reaches up to maximum size of 5MB */
if(file_size>=5000000)
{
end_file=loop; /* Ending Sector of File */
Recover_the_file();/* write the data to file */
break;
}

/* if footer of DOC file is found */
for(i=0;i<512;i++)
{
if( memcmp(buffer+i,DOC_footer,12)==0 )
{
end_file=loop; /* Ending Sector of File */
Recover_the_file();/* write the data to file */
break;
}
}

/* if another header is found */
if( memcmp(buffer,header,7)==0 )
{
loop=loop-1;
end_file=loop; /* Ending Sector of File */
Recover_the_file();/* write the data to file */
break;
}
if(kbhit())
{
show_hide_cursor ( 6, 7 );
exit(0);
}
}

}
loop++;
} ////////While Loop Ends Here

 

/* display message for completion of search and recovery */ if(loop>=Sectors_in_HDD2 )
{
gotoxy(17,23);cprintf("The Saving of files in the Disk is
Completed !!");
gotoxy(17,24);cprintf("Press Any Key to Exit...");
show_hide_cursor ( 6, 7 );
getch();
}

}

Comments on coding:

The structure geometry is used by getdrivegeometry function using INT 13H Extension, Function Number 0x48 to get the various parameters of the disk.

The structure diskaddrpacket is for Disk Address packet format, to be used by the readabsolutesectors Function.

The Function getdrivegeometry (int drive) is to get Drive Parameters of the disk specified physical drive number drive.

(char) peekb(0x0040, 0x0075) is used to find the number of hard disks connected to the computer, stored at memory location represented by segment 0040H:offset 0075H. If total number of hard disks attached is less then two Display Error Message and Exit.

Sectors_in_HDD2=getdrivegeometry (0x81); finds the various parameters of the second physical hard disk (0x81) and returns the total number of sectors of the disk.

The statement if(access(path, 0) != 0) checks the accessibility of the path given by the user. If destination directory does not exist, the destination is created up to one level and if the given path checked by condition if(mkdir(path)!=0) is illegal, error message is displayed.

The file names of automatically created files to save the recovered data are created such that the first three characters of the files are given PTT by strcat(path,"\\Ptt"); function. It is done so to avoid the duplicate file names in the destination directory. Therefore the file names of recovered files are given in format of “PTTxxxxx.DOC”

The Function show_hide_cursor ( 32, 0 ); is used to Hide the Cursor from the screen where show_hide_cursor ( 6, 7 ); retrieves the cursor back to screen.


The function readabsolutesectors (0x81, loop, 1, buffer); Reads one Sector of the second physical hard disk specified by sector number loop.

If the header of the file is found, start_file = loop; sets the start_file to starting sector number of the file to be recovered. The program follows the three conditions given next, to find the ending sector of the file:

  • If file size reaches up to maximum size of 5MB
  • If footer of DOC file is found
  • If another header is found


The long integer end_file is set to the ending sector number of the file by end_file=loop; if any one condition out of three is satisfied. Now the data of the sectors, starting from sector number start_file to sector number end_file is saved to the file with the function Recover_the_file( ).

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

Next page
Data recovery software Data recovery software
Windows Data Recovery Software Windows Data Recovery Software
iPod Data Recovery Software iPod Data Recovery Software
Memory Card Data Recovery Software Memory Card Data Recovery Software
Pen Drive Data Recovery Software Pen Drive Data Recovery Software
Digital Camera Data Recovery Software Digital Camera Data Recovery Software
Removable Media Data Recovery Software Removable Media Data Recovery Software
FAT Data Recovery Software

FAT Data Recovery Software

NTFS Data Recovery Software NTFS Data Recovery Software
Zune Music Recovery Software Zune Music Recovery Software
Sim Card Data Recovery Software Sim Card Data Recovery Software
Digital Pictures Recovery Software Digital Pictures Recovery Software

System Utilities System Utilities
Keylogger Keylogger
Secure Data Wiper Secure Data Wiper

Real Estate Ghaziabad

Real Estate Ghaziabad

Website Design

Website Design

Web Services

Web Services

Live Chat Online

Live Chat Online

Link Exchange

Link Exchange

Real Estate Noida

Real Estate Noida

Mobile Website Design

Mobile Website Design

Software Development

Software Development

File Recovery Tools

File Recovery Tools

Mobile Phone Data Recovery

Mobile Phone Data Recovery

Data Retrieval

Data Retrieval

iPod Restore

iPod Restore

Memory Stick Data Recovery

Memory Stick Data Recovery

Hard Drive Data Recovery

Hard Drive Data Recovery

Data Recovery Tools

Data Recovery Tools

Files Recovery

Files Recovery

© Copyright 2002-2005 DataDoctor.Biz

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

Languages: English Spanish French German italian portuguese Japanese Korean Chinese Russian Dutch Greek
Data Recovery Book: English Spanish French German Italian Portuguese Japanese Korean Chinese Russian Dutch Greek