Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Windows Filesystem is Broken

  • Subject: Re: Windows Filesystem is Broken
  • From: Peter Scales <peter@loud-n-clear.net>
  • Date: Mon, 25 Apr 2005 14:47:59 +0100
  • Newsgroups: uk.comp.os.win2000
  • Organization: Loud-n-Clear.net
  • References: <d4en17$1q4m$1@godfrey.mcc.ac.uk> <xn0e1domm2jlt3001@news.individual.net> <d4fta3$5hg$1@godfrey.mcc.ac.uk>
  • User-agent: Turnpike/6.02-U (<6gH63FprSRraXr8gJBVCqEUJ9y>)
  • Xref: news.mcc.ac.uk uk.comp.os.win2000:18071
In message <d4fta3$5hg$1@godfrey.mcc.ac.uk>, Roy Schestowitz <newsgroups@schestowitz.com> writes
Jeff Gaines wrote:

<snip>

MAX_PATH is defined in the Windows API as 256 and is the maximum length of a full path to a file (including its name and extension).

Why isn't that common knowledge? And where is standardisation?

<snipped>

In the copy of the Microsoft Platform SDK that I have (August 2001), MAX_PATH is defined as 260 (and in all the other versions that I can remember seeing). It can be circumvented. This is what the Microsoft Platform SDK (August 2001) says:

'The globally defined constant MAX_PATH defines the maximum number of characters a path can have. You can avoid this constraint by doing both of the following:

Referring to volumes by their unique volume names, which have \\? prepended to the path.
Using Unicode so that you use the Unicode (W) versions of file functions, which support the \\? prefix.
The \\?\ turns off path parsing. By using this form, you can work with paths that are nearly 32,000 Unicode characters long. However, each component in the path cannot be more than a file-system-specific value indicated by the function GetVolumeInformation. You must use full paths with this technique. This technique also works with universal naming convention (UNC) names such as "\\OtherComputer\Directory\Filename.ext".


The \\?\ is ignored as part of the path example, and "\\?\C:\myworld\private" is seen as "C:\myworld\private".'

It may not be common knowledge, but it is certainly freely available knowledge. The latest Microsoft Platform SDK can be downloaded for free (call charges might apply) from
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/


There is a lot of good stuff available there. Alternatively, you can search/browse the SDK online at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro
/sdkintro/devdoc_platform_software_development_kit_start_page.asp


Regards

     Pete
--
Peter Scales

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index