I have a program in UM that gets a list of removable drives that meet
certain requirements, and lets the user select one. The program can then
format some of the raw “disk” space found, and then copy some firmware to
the end of the space, beyond the partition bounds. The formatting and
copying is done by accessing the device as PhysicalDiskN.
After the drive is formatted the user can copy files by dragging and
dropping using explorer or the like.
However, the files need to be in a specific order, and related to the
firmware file loaded to the drive. It would be nicer to do allof the
necessary file copying in the program that loads the firmware, since it can
assure the right files in the right order.
I’d like to do the copying by simply using CopyFile. But for that I need to
know the partition name that NT has assigned to the disk I just formatted.
So I need some way to relate \PhysicalDiskN to E: or whatever. I’m
reasonably sure this shoud be fairly simple, but I can’t figure out how to
do it.
So: how can I get the drive id for the first (and only) partition on my
device, for which I know PhysicalDiskN?
Thanks,
Loren
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS and IOCTL_DISK_GET_DRIVE_LAYOUT_EX
On 6/13/05, Loren Wilton wrote:
> I have a program in UM that gets a list of removable drives that meet
> certain requirements, and lets the user select one. The program can then
> format some of the raw “disk” space found, and then copy some firmware to
> the end of the space, beyond the partition bounds. The formatting and
> copying is done by accessing the device as PhysicalDiskN.
>
> After the drive is formatted the user can copy files by dragging and
> dropping using explorer or the like.
>
> However, the files need to be in a specific order, and related to the
> firmware file loaded to the drive. It would be nicer to do allof the
> necessary file copying in the program that loads the firmware, since it can
> assure the right files in the right order.
>
> I’d like to do the copying by simply using CopyFile. But for that I need to
> know the partition name that NT has assigned to the disk I just formatted.
> So I need some way to relate \PhysicalDiskN to E: or whatever. I’m
> reasonably sure this shoud be fairly simple, but I can’t figure out how to
> do it.
>
> So: how can I get the drive id for the first (and only) partition on my
> device, for which I know PhysicalDiskN?
>
> Thanks,
> Loren
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>