...I am testing a custom boot loader I wrote and need to know how I can either:

1) Rewrite the bootloader on the main windows drive OR
2) Write a new bootloader on a new drive that doesn't already have one.

To do this I must write the 512 byte bootloader I wrote to sector 0 of the harddisk. I have tried the Debug w command with the correct args but the problem is Windows denies access to doing this (right now trying XP but need to be able to do this in XP and 7). Does anyone konw of any win32 api calls that will allow me to write directly to the disk in sector 0? Thanks.