Windows RAMDisk 存储驱动程序示例。名称为 'R' 的驱动器不存在

Windows RAMDisk Storage Driver Sample. Drive with the name 'R' does not exist

上下文:玩微软RAMDisk Storage Driver Sample。驱动程序的构建和安装进展顺利。已验证注册表中存在 Ramdisk 服务,并且可以在设备管理器中看到 Ramdisk 设备。

问题:尝试通过WindowsPowerShell访问Ramdisk设备(驱动器R:)时执行IO I收到以下错误消息:

Set-Location : Cannot find drive. A drive with the name 'R' does not exist.
At line:1 char:1

Set-Location R:
~~~~~~~~~~~~~~~
CategoryInfo : ObjectNotFound: (R:String) [Set-Location], DriveNotFoundException
FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

尝试通过命令提示符文件资源管理器访问 Ramdisk 但没有成功。

问题:我做错了什么?

开发环境:

目标环境:

根本原因:Ramdisk 示例驱动程序未正确处理 Windows 10.

的磁盘设备请求

解决方案:更新了 Ramdisk 示例驱动程序以正确处理磁盘设备请求。有关详细信息,请参阅 Windows driver sample pull request #53

注意:此代码仅在Windows 10上测试过,并且只允许您通过[=31=访问Ramdisk ] PowerShell,或命令提示符文件资源管理器 仍然不起作用;如果有人能够让 File Explorer 工作,请告诉我。