I am maintaining a legacy Windows application with both a user-space and kernel component. The user space passes some file paths to the device driver via registry keys.

Currently, the code finds the full path to the file, then prepends \??\ to it before writing it to the registry, so the path ends up something like \??\C:\foo.bar. The driver passes this path to InitializeObjectAttributes() and ZwCreateFile(), which successfully opens the file (or creates it as appropriate).

I'm familiar with the \\.\ prefix as an alias for \DosDevices\, but not \??\, and it's not the sort of thing that can be Googled. Does anyone know what this means?

有帮助吗?

解决方案

It is a namespace subdirectory created during the boot process. Within it are links to resources accessible by the Win32 API. During boot before the system is fully up, if that path is referenced it may not resolve without having the \??\ in place.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top