An application vendor opened a bug with the product team saying that the PathIsUNC
function was returning incorrect values in Windows Vista. Specifically, the PathIsUNC
function was returning FALSE
for strings that begin with \\?\
, whereas Windows XP returned TRUE
.
The answer is, “Yes, the PathIsUNC
function returns FALSE
for strings that begin with \\?\
. Because they aren’t UNCs.”
There was a bug in the Windows XP version of the PathIsUNC
function where it reported that anything that began with two backslashes was a UNC, even if it wasn’t. In particular, paths that begin with \\?\
are not UNCs, unless they happen to begin with \\?\UNC\
. The bug was fixed in Windows Vista so it returned TRUE
only if the \\?\
is followed by UNC\
.
Fortunately, the application compatibility team had a ready answer for this: The EmulateOldPathIsUNC compatibility shim returns the PathIsUNC
function to its old behavior that is bug-for-bug compatible with Windows XP.
0 comments