How to check raw partition on Windows

This is a discussion on How to check raw partition on Windows within the C Programming forums, part of the General Programming Boards category; Greetings All, I wonder which Windows C API detects raw partitions given the name of a partition. For example, given ...

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

    How to check raw partition on Windows

    Greetings All,

    I wonder which Windows C API detects raw partitions given the name of a partition. For example, given input \\.\R: or \\.\Disk2Partition1, check if it is a raw partition or not.

    Thanks in advance!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,556
    What do you mean "raw"?

    Not formatted with NTFS?
    Not formatted with an M$ operating system?
    Not recognised with any known OS?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    14
    A raw partition is a disk partition used in its native, raw state without having a file system imposed over it.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by lei_michelle View Post
    A raw partition is a disk partition used in its native, raw state without having a file system imposed over it.
    So, you would have to check if the disk has any of the metadata that the filesystem is adding. Most filesystems have specific places that the FS stores specific data, and that usually contains some sort of "magic number" that is used to identify that this is indeed a NTFS, FAT32 or Ext2 file-system. The information is not necessarily stored in the same location for all filesystems, but there should be a way to identify if the partition has any of a list of filesystems within it. Not necessarily ALL filesystems tho', since that would require knowing how MANY different filesystems store their metadata.

    --
    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. partition for windows and linux files
    By MisterSako in forum Tech Board
    Replies: 5
    Last Post: 09-21-2004, 05:38 PM
  2. Windows Rant followed by installation question
    By confuted in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 06-21-2003, 04:42 PM
  3. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21