delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/03/15:38:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 3 Jul 2002 22:37:33 +0300
From: Ville Herva <vherva AT niksula DOT hut DOT fi>
To: cygwin AT cygwin DOT com
Subject: Re: dir \\.\c:\
Message-ID: <20020703193732.GL9092@niksula.cs.hut.fi>
References: <01e501c22294$fecd8060$0100a8c0 AT advent02> <INEKLKBFCDBPKMKAJLMDAEENCFAA DOT bab AT vx DOT com>
Mime-Version: 1.0
In-Reply-To: <INEKLKBFCDBPKMKAJLMDAEENCFAA.bab@vx.com>
User-Agent: Mutt/1.3.25i

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019