My goal is to know if Windows is installed on an active disk partition. I can obtain the path for Windows:
C:\WINDOWS
and then it's partition:
\Device\Harddisk4\Partition4
But the question is how to know if this partition is active?
My goal is to know if Windows is installed on an active disk partition. I can obtain the path for Windows:
C:\WINDOWS
and then it's partition:
\Device\Harddisk4\Partition4
But the question is how to know if this partition is active?
Check this Link (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365451(v=vs.85).aspx)
PARTITION_INFORMATION has BootIndicator. but it is not guarantee about the running windows was booted by that partition.
Edited It is a example function tested on Windows7. I think 'activate' partition is not your goal. The 'activate' has meaning such as bootable USB device. I don't like WMI but it could be help your goal (http://msdn.microsoft.com/en-us/library/windows/desktop/bb986746(v=vs.85).aspx)
Call like