I want to write to FAT/data sections to do something like create files.
Read whole sections is o.k, and write to sections prior to FAT/data section is o.k.
But got error code 5 (access deny) while write to FAT/data sections.
// FAT_SEC is retrived from boot sector
FILE* f = fopen("\\\\.\\F:", "rb+");
fseek(f, FAT_SEC * SECTOR_SIZE, SEEK_SET);
fwrite(buffer, 1, SECTOR_SIZE, f);
fflush(f); // Get error here
DWORD err = GetLastError();