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!
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!
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.
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.