我正在阅读 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 连接,但不确定。
最佳答案
%c
是 wsprintf
的单字符格式说明符.
代码用于生成这种形式的路径名:
\\.\C:
这是物理卷的路径。当绕过文件系统直接在卷上执行文件操作时,您会使用这样的路径。因此,例如,您在实现原始磁盘复制时会使用这样的路径。 CreateFile
的文档有更多细节。
这一切都与您在其中找到的代码执行原始磁盘复制这一事实有关。
关于windows - 这个字符串的含义\\.\c :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19294704/