win32 dbus-launch.bat replacement

Tor Lillqvist tml at iki.fi
Sat May 26 09:57:01 PDT 2007


Thiago Macieira writes:
 > If Windows can't handle more than MAX_PATH paths anywhere on the system, 

But it can... Like so many things in Windows, the "max path length"
issue is an underspecified and confusingly, misleadingly and
inconsistently documented mess.

Read the MSDN documentation on "Naming a file". I quote:

  The Unicode versions of several functions permit a maximum path
  length of approximately 32,000 characters composed of components up
  to 255 characters in length. To specify that kind of path, use the
  "\\?\" prefix.

Note the lovely words "several" and "approximately". This gives off
such an air of exactness and consistency, doesn't it?

So at some level presumably Windows handles pathnames up to 32K
length. Running a test program that tries various C library functions
on quite long file names using this magic \\?\ prefix shows that it is
rather vague when it works and when not. It seems that for instance
the _wchdir() function (the wide-char version if chdir()) does not
accept \\?\ -prefixed paths.

--tml


More information about the dbus mailing list