简体   繁体   中英

Can I get write access to raw disk sectors under Vista and Windows 7 in user mode?

From the RawDisk website :

The new security model of Windows Vista puts tight restrictions on applications executed in user mode. Even with elevated administrative rights, the application can't get write access to raw disk sectors.

Is this true?

From the Microsoft doc :

The changes to the file system and to the storage stack do not apply if the volume is not mounted or if the volume has no file system.

Please give

  • either a link to the official Microsoft doc confirming the RawDisk website
  • or a working code example. (I obviously failed to create one, CreateFile() call fails with ERROR_ACCESS_DENIED if GENERIC_WRITE is set.)

Other relevant Microsoft docs that I have so far found:

Yes. The first article you link to provides a longer list of exceptions:

  • if the file system is not mounted
  • if the file system has been locked.
  • if the sectors being written to reside outside file system space (this includes the boot sectors, and the "no file system" case where obviously all sectors are outside the file system)
  • if the write request has been flagged by a kernel-mode driver.

Obviously, the last exception is irrelevant to you. User mode is the opposite of kernel mode. The other exceptions still apply.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM