且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

直接写入HardDisk,WriteFile返回5访问被拒绝错误

更新时间:2022-11-30 16:56:33

您好Rani,

Hi Rani,

我不确定您的位置追踪是硬盘驱动器将在位置0(并且如果它是交易安全的情况下可能位置为1)具有主引导记录,您可能没有写入权限,并且可能是您的
错误的来源。 我建议搜索一些其他有用的示例代码网站,因为消隐磁盘的内容不是一个新概念,可能会有一些有用的帖子。 例如,我发现这是在计算器上

HTTP: //***.com/questions/13390843/how-to-erase-a-hard-disk-drive
功能。可以帮助你。

I am not sure about your position tracking as the hard drive will have a Master Boot Record at position 0 (and potentially position 1 if it is transaction safe) that you probably don't have permission to write and potentially that is the source of your error.  I recommend searching some of the other helpful sample code sites as blanking the contents of a disk is not a new concept there are likely to be some helpful posts there.  For example I found this one on *** http://***.com/questions/13390843/how-to-erase-a-hard-disk-drive that might help you.

此致

IoTGirl