Tech Support > Microsoft Windows > Drivers > Raw write access in vista
Raw write access in vista
Posted by Nidhi Malik on September 28th, 2007


Hi all,
I need raw write access to drive ( to write on sectors) for my utility. But vista return ACCESS_DENIED to WriteFile().
according to msdn documentation the following changes have been made in Windows Vista and later:

A write on a volume handle will succeed if the volume is not mounted by a file system, or if one of the following conditions is true:

a.. The sectors to be written to are boot sectors.
b.. The sectors to be written to reside outside of file system space.
c.. You have explicitly locked or dismounted the volume by using FSCTL_LOCK_VOLUME or FSCTL_DISMOUNT_VOLUME.
d.. The volume has no file system. (In other words, it has been mounted as a RAW volume.)
A write on a disk handle will succeed if one of the following conditions is true:
a..
The sectors to be written to do not fall within a volume's extents.
b.. The sectors to be written to fall within a mounted volume, but you have explicitly locked or dismounted the volume by using FSCTL_LOCK_VOLUME or FSCTL_DISMOUNT_VOLUME.
c.. The sectors to be written to fall within a volume that is not mounted or has no file system.
The modification of some disk parts, like the boot sector ( upto 16 ), is still allowed . But my utility relies on raw write access to the disk. I am not able to lock volume by FSCTL_LOCK_VOLUME. Result is ACCESS DENIED. While searching through net i come to know that kernel mode driver is only solution. But in this group i come to know driver is not require. I work on services and pass through SCSI, but i am not able to find the solution. If kernel mode driver is require then what kind of driver it should be ?
Is anybody know the solution of the problem then please help me out
Waiting for solutions
Nidhi


Similar Posts