In message <firstname.lastname@example.org>, Roy Schestowitz
Jeff Gaines wrote:
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?
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
There is a lot of good stuff available there. Alternatively, you can
search/browse the SDK online at