Mail Archives: cygwin/2002/07/03/15:38:28
On Wed, Jul 03, 2002 at 11:59:51AM -0400, you [Bernard A Badger] wrote:
>
> So what _is_ it? It doesn't seem like a legitimate UNC name.
> It doesn't match \\Host\share\dir\dir2\.
> dir \\%COMPUTERNAME%\c:\ doesn't work either.
>
> (Sorry if this is too OT.)
It is a way to access cumbersome filenames such as "aux", "prn", "com",
"lpt1" and filenames with more than MAX_PATH characters in them. (I think
typed the prefix wrong in the previous mail - it should be "\\?\". "\\.\" is
prefix for the NT device names such as "\\.\PhysicalDrive0").
FindFirstFile() documentation:
"Windows NT/2000: In the ANSI version of this function, the name is limited
to MAX_PATH characters. To extend this limit to nearly 32,000 wide
characters, call the Unicode version of the function and prepend "\\?\" to
the path."
and file naming conventions in MSDN:
"The Unicode versions of several functions permit paths that exceed the
MAX_PATH length if the path has the "\\?\" prefix. The "\\?\" tells the
function to turn off path parsing. However, each component in the path
cannot be more than MAX_PATH characters long. Use the "\\?\" prefix with
paths for local storage devices and the "\\?\UNC\" prefix with paths having
the Universal Naming Convention (UNC) format. The "\\?\" is ignored as part
of the path. For example, "\\?\C:\myworld\private" is seen as
"C:\myworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as
"\\bill_g_1\hotstuff\coolapps". "
(Yes, the bill_g example is actually Microsoft's :)
In addition, you can propably find a KB article talking about nasty
filenames ("com", "aux" etc) and how to get rid of them. Since "\\?\" prefix
turns of path parsing, you can access them with the prefix.
-- v --
v AT iki DOT fi
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -