Jump to content
  • Advertisement
Sign in to follow this  
joeyg2477

Reading raw data from hard drive?

This topic is 4922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im taking on a project this summer to write a program that will undelete files that have been deleted. i'm looking to read raw data straight from the hard drive and am needing some help with this. If anyone can point me in the right direction I would appreciate it. [Edited by - joeyg2477 on April 25, 2005 4:41:14 AM]

Share this post


Link to post
Share on other sites
Advertisement
I just hope that you only have to handle FAT32, NTFS is a bitch of a file system to read manually. Plus, theres not too much info on it.

-arm

Share this post


Link to post
Share on other sites
You can read raw data from a removable or fixed disc in winNT (and similar, like win2k and xp) by using CreateFile with \\.\a etc.

I don't know whether this works on hard drives while the drive is mounted, possibly not (due to sharing violation). I don't know how to unmount hard drives in Windows (i.e. programmatically) except using the disc manager application in "computer management". In any case, you wouldn't be able to unmount the boot drive, or any other drive which has open files.

On Linux and Unix type systems you can read/write the raw device by using /dev/hda1 or whatever the device name is. Although it is probably possible to do it on a mounted filesystem (especially if mounted read/write) it is highly inadvisable.

Probably your best bet would be a dos or Linux floppy or CD boot, as that way you'd be able to run without the hard drive mounted.

On NTFS, I wish you good luck, as information is sketchy and it's really complicated. FAT will be easier.

Mark

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!