views:

13

answers:

0

My goal is to manipulate the boot-sector in my flashdrive (volume E:) I am using XP.

I am able to read the boot-sector

FILE *fp_read = fopen("\\\\.\\E:", "rb");
/* Able to proceed to read boot sector  */ 

however i am not able to open the file to write using fopen in 'wb' mode.

FILE *fp_read = fopen("\\\\.\\E:", "wb"); 
/* Unable to proceed due to Failed to open file to write.:Permission Denied */

The flash-drive is not in use at the moment of execution.

Hex-editors are able to manipulated boot sector etc, i believe it possible to do so in c.

Any suggestion or insight to overcome the access problem so as to be able to write?