As noted in the documentation:
"By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\?\" to the path."
Have you tried doing that?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have this folder path in short-form like this
C:\Users\admin\Downloads\NEWFOL~2\NEWFOL~1\...\NEWFOL~1
using GetLongPathName
, then I have
C:\Users\admin\Downloads\New folder (2) - Copy - Copy test\New folder\...\New folder
but now using GetShortPathName,
length = GetShortPathName(lpszPath, NULL, 0); //with getlasterror=0
the length alway return 0;
seems like the lpszPath is too long causing it to fail, if I remove some characters in lpszPath to <256, now it works.
Is there a way to reclaim the original short path?
Thanks you!
As noted in the documentation:
"By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\?\" to the path."
Have you tried doing that?