前缀路径\??\
和前缀路径之间有什么区别\\?\
在Windows 7 CMD-Line
\??\Volume{00000000-0000-0000-0000-000000000000}\
\\?\Volume{00000000-0000-0000-0000-000000000000}\
谢谢
附加信息:
我在系统驱动器上创建了一个目录,我将所有挂载点放入其中.所以我做了MD C:\HDDs
第一个,然后是a
MD C:\HDD\Drive1
,MD C:\HDD\Drive2
...为我所有的驱动器.在这些空目录上安装驱动器后,我可以通过切换到该目录CD /D C:\HDDs
并发出DIR
命令来查看GUID .也许我必须发出一个DIR /ah
显示隐藏的东西,以防挂载点是隐藏目录...
为什么当我呼唤RtlDosPathNameToNtPathName_U
路径时\\?\C:
,而不是回来
\??\C:
Run Code Online (Sandbox Code Playgroud)
我回来了
\??\C:\?\\?\C:
Run Code Online (Sandbox Code Playgroud)
哪个明显不正确?
代码段(在D中):
struct CurDir { UnicodeString DosPath; HANDLE Handle; }
extern (Windows) static bool RtlDosPathNameToNtPathName_U(
in const(wchar)* DosPathName, out UnicodeString NtPathName,
out const(wchar)* NtFileNamePart, out CurDir DirectoryInfo);
wchar[] toNtPath(const(wchar)[] path)
{
UnicodeString ntPath;
CurDir curDir;
const(wchar)* fileNamePart;
enforce(RtlDosPathNameToNtPathName_U(path.ptr, ntPath,
fileNamePart, curDir));
try
{ return ntPath.Buffer[0 .. ntPath.Length / ntPath.Buffer[0].sizeof].dup; }
finally { RtlFreeHeap(RtlGetProcessHeap(), 0, ntPath.Buffer); }
}
writeln(toNtPath(r"\\?\C:")); //Returns the weird string
Run Code Online (Sandbox Code Playgroud)
更新:
我想出了问题 - 看我的答案.