admin管理员组文章数量:1335612
After Installing my driver, Windows prompt for restart to apply changes. Then after restarting, From the User Mode, I store the unique identifier in the registry which I made to distinguish the disks and In Kernel Mode Driver.
Then I check for that disk and Intercept the IOCTL_DISK_IS_WRITABLE. I am calling the EvtIoDeviceControl to intercept the IOCTLs and then I am returning STATUS_MEDIA_WRITE_PROTECTED like:
if (IoControlCode == IOCTL_DISK_IS_WRITABLE) {
WdfRequestComplete(Request, STATUS_MEDIA_WRITE_PROTECTED);
DbgPrint("IOCTL_DISK_IS_WRITABLE Write operation blocked for device with pdoName: %ws\n", pdoName);
return;
}
In Disk Management, It shows Read Only in for the particular disk, But in the Explorer I can still create and write file for the same disk.
But after restarting again, The disk goes back to previous state like it deletes whatever files I created and the writes too and shows as Read Only everywhere! That's the main problem!
Can someone please tell me why is this happening and how can I immediately notify windows that the disk is write protected without restarting it again?
本文标签: Disk’s State Update Problem for KMDF DiskDrive UpperFilter DriverStack Overflow
版权声明:本文标题:Disk’s State Update Problem for KMDF DiskDrive UpperFilter Driver - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742392353a2466237.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论