Hi,
I’m developing a utility that needs to partition a disk. After calling the
IOCTL_DISK_SET_DRIVE_LAYOUT on the disk, I call SetupDi function to try to
find the volume of the new created partition, but it fails. However, if I
launch disk mamangement MMC, it can see the volume of the new partition. And
after that my program can see the new volume too. So it must doing something
to force the volume manager to re-enum the disk. Is there any way I could
force the volume manager to do so, programmatically?
Thanks in advance,
Michael Huang
Get DiskMon from http://www.sysinternals.com/Utilities/Diskmon.html and see
what is done to the drive when you fire off MMC.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Michael Huang” wrote in message news:xxxxx@ntdev…
> Hi,
>
> I’m developing a utility that needs to partition a disk. After calling the
> IOCTL_DISK_SET_DRIVE_LAYOUT on the disk, I call SetupDi function to try to
> find the volume of the new created partition, but it fails. However, if I
> launch disk mamangement MMC, it can see the volume of the new partition.
> And after that my program can see the new volume too. So it must doing
> something to force the volume manager to re-enum the disk. Is there any
> way I could force the volume manager to do so, programmatically?
>
> Thanks in advance,
>
> Michael Huang
>
>
Why are you messing around with ioctls ?
Use VDS to do this properly, it’s got all the bangs and whistles
you’ll need and you stand a chance of getting it to work.
Mark.
At 02:28 PM 4/7/2006, Michael Huang wrote:
Hi,
I’m developing a utility that needs to partition a disk. After calling the
IOCTL_DISK_SET_DRIVE_LAYOUT on the disk, I call SetupDi function to try to
find the volume of the new created partition, but it fails. However, if I
launch disk mamangement MMC, it can see the volume of the new partition. And
after that my program can see the new volume too. So it must doing something
to force the volume manager to re-enum the disk. Is there any way I could
force the volume manager to do so, programmatically?
Thanks in advance,
Michael Huang