public readdriver(string driverName){Load(driverName);}public void Load(string driverName){if (driverName == null && driverName.Length == 0){throw new ArgumentNullException("driverName");}handleValue = CreateFile("\\\\.\\"+driverName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_READ,IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero);if (handleValue.IsInvalid){Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());}}请大家看一下,问什么在读取光驱时很正常,在读取硬盘时就不成功呢?按你这么说,那光盘也不应该读取出来,这是api编程,还有,createfile也可以打开文件的好不
2 回答
- 2 回答
- 0 关注
- 758 浏览
添加回答
举报
0/150
提交
取消