Why doesn't my program recognize mapped UNC paths?
问题 I have some problems writing to a mapped network drive (P:) in Windows 7 from my Delphi program. When I try, for example, ForceDirectories('P:\test\folder') , I get an error (path not found). I have tried typing in the UNC path in the code ( ForceDirectories('\\computername\share\test\folder') ) and that works. However, ExpandUNCFileName('P:\') does not seem to work; it returns 'P:\'. On Windows XP, ExpandUNCFileName('P:\') returns the UNC path. How do I get the UNC path in Delphi on Windows