How to mark a partition as "active".
-
Hi all, How can I set a partition as active partition using c++ code? Is there any API or function to do that? Please guide me with your comments. thanks.
-
Hi all, How can I set a partition as active partition using c++ code? Is there any API or function to do that? Please guide me with your comments. thanks.
I suspect DeviceIoControl[^] and the IOCTL_DISK_SET_PARTITION_INFO_EX[^] control code may point you in the right direction. I don't know if they'll actually let you do what you want, though - that function may only be accessible through lower level NT functions that are (publicly) undocumented, or documented in the device driver documentation? In fact, looking a bit further, I suspect IoSetPartitionInformationEx[^] is probably the function you need - but that's part of the NT API, not the Win32 API.