如何访问隐藏与Diskpart命令行实用程序驱动器后 [英] how to get access after hide the drive with Diskpart Command-Line Utility

查看:171
本文介绍了如何访问隐藏与Diskpart命令行实用程序驱动器后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏从Diskpart命令行实用程序的用户的驱动器。结果
我用信件删除命令和驱动器被隐藏。结果
但是,我想使用的驱动器,例如在我的C语言编写的程序的数据。结果
我怎样才能做到这一点还是有可能吗?结果
我只想对USB闪存驱动器做到这一点。结果
如果这是不可能的,请给我一个方法来正确地做到这一点?结果
非常感谢,祝你好运。

I want to hide the drive from user with Diskpart Command-Line Utility .
I use remove letter command and the drive becomes hidden .
But I want to use the data of that drive for example in my program written in C .
How I can do this or is it possible ?
I want to do this only for usb flash drives .
If it is not possible please give me another approach to do this correctly ?
Thanks a lot , good luck .

推荐答案

您可以使用GUID这样的音量:

You can use the volume GUID like this:

\\?\Volume{2a0b16cf-f76a-11df-9310-806e6f6e6963}\path\file.ext

请注意,只有统一code文件中的函数会接受这种路径,以及语法要严格正确的。例如,您不能使用正斜杠,而不是反斜杠。

Note that only the Unicode file functions will accept this sort of path, and the syntax has to be strictly correct. For example, you can't use forward slashes instead of backslashes.

我不知道如何最好地枚举卷的GUID。一种方法是 QueryDosDevice 但我希望有更好的方法。

I'm not sure how best to enumerate the volume GUIDs. One method is QueryDosDevice but I expect there are better ways.

这篇关于如何访问隐藏与Diskpart命令行实用程序驱动器后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆