title: winapi c - read/write mbr of system drive
body: <p>Does anyone have any example code that shows how to identify the system boot harddisk, and read/write the mbr from the harddisk in windows xp and vista?</p>
  
  <p>I know createfile can be used. But I do not know how to properly identify which device is the boot device. </p>
  
  <p>Like how do you find out which ones you are meant to use?   \.\Volume{GUID}\ or  \?\Device\HarddiskVolumeX etc?</p>