windows - 这个字符串的含义\\.\c :

标签 windows file winapi ntfs

我正在阅读 this .这里我找到了一些代码行,例如: wsprintf(szDrive, "\\\\.\\%c:", *lpszSrc); 我想问一下,这个字符串给出?

我试图寻找信息,但我只找到了:

In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming Files, Paths, and Namespaces.

这并没有回答我的问题,所以在这里问。因为我认为它应该与特定的 Windows 或 NTFS 连接,但不确定。

最佳答案

%cwsprintf 的单字符格式说明符.

代码用于生成这种形式的路径名:

\\.\C:

这是物理卷的路径。当绕过文件系统直接在卷上执行文件操作时,您会使用这样的路径。因此,例如,您在实现原始磁盘复制时会使用这样的路径。 CreateFile 的文档有更多细节。

这一切都与您在其中找到的代码执行原始磁盘复制这一事实有关。

关于windows - 这个字符串的含义\\.\c :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19294704/

相关文章:

windows - Windows 上的 Nginx - 无法绑定(bind)任何端口

c++ - InternetGetConnectedStateEx 的使用

java - 如何实现Java windows服务包装器YAJSW的停止和启动逻辑?

c - Win32 在多大程度上支持中断?

winapi - CallNtPowerInformation(SystemPowerInfomation...) 是否适用于 WIndows XP?

python - 从 python 访问备用剪贴板格式

Python 授予读/写文件的完全权限

file - 批处理 - 有没有办法批量同步锁定txt文件?

python - 记录 TCP 套接字事件

winapi - 如何检测是否有网络摄像头连接到 PC?