Thread: Viewing and writing to clusters

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    14

    Viewing and writing to clusters

    Could someone point me in the write direction as to how I could view clusters or sectors in a windows file system using C++? Also, I will be doing the same with ext3 so maybe that as well if you know where I could find the resource.

    -DenKain

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Hold on, before posting any links you do realize that you are toying with fire, right? You can cause problems reading your hard-disk with improper implementation of whatever it is that you are trying to do. For ext, why not just look at some linux source? To be honest, you could hit up the ubuntu source for info about NTFS too.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    14
    Quote Originally Posted by master5001 View Post
    Hold on, before posting any links you do realize that you are toying with fire, right? You can cause problems reading your hard-disk with improper implementation of whatever it is that you are trying to do. For ext, why not just look at some linux source? To be honest, you could hit up the ubuntu source for info about NTFS too.
    Yes I am aware of that and that is why I will be using a "junk drive" so to speak (I have a 20 gig I am willing to use as a test subject). Actually, I also wanted to see if I could test it on a virtual machine as well.

    -DenKain

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Just open the drive itself with CreateFile() - there is a good amount of info in the link about "Opening a physical device". Note that you can not have it "mounted" (that is, Windows must not use the disk in any way when you try to open it as a physical disk).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Flight Simulator Viewing System
    By Anarchist in forum Game Programming
    Replies: 8
    Last Post: 02-12-2002, 05:16 AM