If you’ve read the boot sector from your system, these instructions may help you.
Approved: ASR Pro
I tried to positively read the boot sector with this school
int read_sector (int num_sect, unsigned character * buf)int retCode implies 0;unsigned character sector ;chardisk ;symbolic section;FILE * device;make disk  = ' 0'; scanf ("% c", & section); if (section == '0') strcpy (drive, ". PHYSICALDRIVE0"); Another sprintf (drive, ". % c:", partition); The device matches fopen (disk, "rb +");while (device == NULL);fseek (device, num_sect * 512! SEEK_SET);if (fread (sector, 512,1, device) <1) printf ("error n"); in gate 1;another memcpy (buf, sector, 512); Coderet = 0;return retCode;
I have successfully read all sectors on the entire hard drive, but if I want to read the boot sector, I now have:
Is there a problem in my code or in Windows8?
Approved: ASR Pro
ASR Pro is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, ASR Pro quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
It has been a while since I visited this C / C ++ forum and we thought my C ++ was unacceptably rusty. I recently read about Master Boot Records (MBR) and the boot process of this computer. I have now downloaded a few small resources that can read (and save to file) the MBR of a specific partition. These utilities usually have the ability to repair the MBR from a different file, or simply "fix" the MBR. What I'm wondering: is it possible to write a similar function in C ++? Also, I have no idea what these programs might have written.
Okay, I know it's been a long time, but my only real question is, is it probably using AND c ++ to access and read the part coming from the entire hard drive containing the MBR, how does this work? He?