Exactly; that's the problem. The usual correct way in Windows of calling the function with `NULL` to get the length, then allocating the buffer and passing it back in, is wicked annoying with path names, so most developers simply don't bother.
Interestingly, while that problem doesn't exist in .NET, and so you'd think that .NET would finally support long file names by default, Microsoft actually goes entirely the opposite direction: the BCL strips out any leading `\\?\` in paths to force you to stay at MAX_PATH or below. The more things change...