::GetShortPathName("C:\Program Files\AAA\AAA BBB");
returns
"C:\PROGRA~1\AAA\AAA BBB".
and ::GetLastError() was ERROR_SUCCESS.
file system is NTFS, of course.
Then, it works : "PROGRA~1\" is the short path of "Program Files"
What did you expect ?!
Try verifying the file's actual short name with "dir /x". I don't know the
details for Vista, but it's possible, for example, that it turns off short
file name generation after installation. In this case "Program Files" would
have a short name but "AAA BBB" would not.
--
J.
i found that the result of ::GetShortPathName(...) are composed of long path
and short path in VISTA.
ex)
::GetShortPathName("C:\Program Files\FIRST LONG PATH\AAA\SECOND LONG PATH")
returns
"C:\PROGRA~1\FIRSTL~1\AAA\SECOND LONG PATH"
i can not understand why last folder name was long path name.
**************************************************************
"Uwe Kotyczka" <uwe.ko...@web.de> wrote in message
news:fc3ddaa6-96cf-428c...@34g2000hsh.googlegroups.com...
needs to escape the "\" with another "\"?
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.2
^ ^ 17:05:01 up 27 days 1:17 3 users load average: 1.03 1.01 1.00
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/
Did you try what Jeroen suggested and see what its real "short" name is?
It is possible that short file names is disabled on that system and the
shortened folders either already had them or were created for compatibility.
What is the value (if it exists) of the value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation
--
Dean Earley (dean....@icode.co.uk)
i-Catcher Development Team
iCode Systems
thank you a lot.
**************************************************************
"Dean Earley" <dean....@icode.co.uk> wrote in message
news:48be56b7$0$26086$db0f...@news.zen.co.uk...
i solve the problem.
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/28231.mspx?mfr=true
**************************************************************
"Uwe Kotyczka" <uwe.ko...@web.de> wrote in message
news:48c8d059-33d1-4cd1...@z66g2000hsc.googlegroups.com...