尝试在win10下写磁盘扇区,程序编译后以管理员身份运行,却无法写入磁盘扇区。
public void WritSector(byte[] SectorBytes, long SectorIndex)
{
if (SectorBytes.Length != 512) return;
if (SectorIndex > _SectorLength) return;
_DirverStream.Position = SectorIndex * 512;
_DirverStream.Write(SectorBytes, 0, 512); //写入扇区
}