How to dismount all volumes on a physical drive?

S

stanmuffin

I'm working on a utility that will restore a disk image to a physical
drive. How can I dismount all volumes on the drive beforehand to
prevent old cache information from corrupting the drive?
FSCTL_DISMOUNT_VOLUME will dismount a volume, but how can I get a list
of the volumes on the physical drive?
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS looks cumbersome but usable--but
it requires Windows XP and I need to run on Windows 2000 as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top