C++ Windows Detect If MBR or GPT PartitionStyle Simple Example
As the title suggest this is a Windows-only example, you may notice that I used it in QT environment from qDebug() helper function, honestly, the only small project that I can think of for this function is one where you would like to change the bootloader, but as I said this is a trivial example.
A few remarks:
- 1 CreateFile needs to be called from a process that was run as admin in order to work ( require admin in manifest )
- 2 On MBR Fist sector/boot sector is always writeable
- 3 L"\\\\.\\PHYSI...