From: machoman on 27 Nov 2006 22:27 to change the dynamic volume Partition and force the information refreshed in the cache, I can achieve that through following way(under XP, W2K3): 1) Set new partitiontable in MBR sector 2)call IOCTL_DISK_GET_DRIVE_LAYOUT to get all of the partition entries. 3) loop through them to find the one you want to make active (set its BootIndicator to TRUE) and set the others to non-active. 4) set RewriteParitition to TRUE for the entries you changed. 5) call IOCTL_DISK_SET_DRIVE_LAYOUT. 6) call IOCTL_DISK_UPDATE_PROPERTIES to invalidates the cached partition table. I can have this function in code, then guarantee the correct BootIndicator for the activated partition.under xp, w2K3. the "ftdisk.sys" driver create a new device object "\device\harddiskvolume(new)",the new VolumeLable is appear. same way on " VISTA RTM" or RC1 . the "volmgr.sys"d river can't create new device object "\device\harddiskvolume(new)" . but I refresh in the DiskManagement UI,the new partition show up. How can I retrieve the correct parameter for my partition having been activated even JUST after having activated it (without open the DiskManagement UI on VISTA OS) ? Thanks in advance. Regards.
|
Pages: 1 Prev: Emulating run command Next: HandlerEx and SERVICE_CONTROL_PRESHUTDOWN |