Question

I try to use function DeleteVolumeMountPoint(L"C:\\"), but I have not access, and it's right. But I need to delete active partition, and I'm search way to do it. Please, could you give me example to delete this partition (unmount it). Operation Systems XP/Vista/7.

Était-ce utile?

La solution

The problem is that you cannot unmount the active partition Windows is running on. You should do such operation in a more "native" way like Fdisk does or at reboot.

There are some programs also from SysInternals that calling the native NT Apis perform page file defrag, for example, during the boot time.

The disk management program included in Windows NT/XP/Vista does not allow you to do this either if I remember well.

NT Native APIs

Autres conseils

As I suspect the system (the operating system itself) has all of its files on this partition, several of them must be actually in use. I doubt you can unmount this system partition.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top