Re: Logical Drive Name

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thank you for such a prompt and accurate reply

i wanted to read the MFT of individual drives, i had some sample code
that does it without logical drive names but now it seems the correct
way is to iterate all the drive names through GetLogicalDriveNames and
the read through QueryDosDevice and read the MFT

but i don't know how to read the MFT using QueryDosDevice and then
CreateFile
can you guide me or point me to some material that would provide more
detailed info

Thank you so much for your precious time

Marc Kupper wrote:

Monty wrote:
i opend the harddisk like this

sHardDisk.Format("\\\\.\\PhysicalDrive1");
<snip>
How can i find out the logical drive name corresponding to the
Partitions and extended
partitions that i read directly from hard disk?

The main challenge is that a drive letter can span multiple
physical disks and that a single physical disk can contain two or
more volumes.

Take a look at GetLogicalDriveStrings() and QueryDosDevice() to
get the volume names. Use IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
to translate from the volume names into physical device device
numbers. Insert "\\.\PhysicalDrive" in front of the numbers to
read from that physical disk.

Marc

.



Relevant Pages

  • Re: What is "Reserved System Space" and what can I do with it?
    ... Because MFT fragmentation can degrade performance the file system ... preemptively reserves a large contiguous block for the MFT when the ... If the disk runs out of space for files the file system ... drives, or even my one 500 Gbyte drive. ...
    (microsoft.public.windowsxp.basics)
  • Re: What is "Reserved System Space" and what can I do with it?
    ... Because MFT fragmentation can degrade performance the file system ... preemptively reserves a large contiguous block for the MFT when the ... If the disk runs out of space for files the file system ... drives, or even my one 500 Gbyte drive. ...
    (microsoft.public.windowsxp.basics)
  • Re: Beware of Diskeeper10 Pro
    ... do a disk cleanup prior to a major defrag. ... history, if I want to keep something I move it to a temp folder, cleanup IE, ... data is actually writtent to the appropriate MFT entry. ... DRIVES and enable! ...
    (microsoft.public.windowsxp.general)
  • Re: Beware of Diskeeper10 Pro
    ... data is actually writtent to the appropriate MFT entry. ... In Defrag Priority, set it to LOW (unless you are using Set it and Forget ... Next, Fragmentation Method, set it to "Quick Defrag". ... DRIVES and enable! ...
    (microsoft.public.windowsxp.general)
  • Re: Beware of Diskeeper10 Pro
    ... data is actually writtent to the appropriate MFT entry. ... In Defrag Priority, set it to LOW (unless you are using Set it and Forget ... Next, Fragmentation Method, set it to "Quick Defrag". ... DRIVES and enable! ...
    (microsoft.public.windowsxp.general)