How to convert between short and long path names

Use GetShortPathName to get short file name for a given long file name. Use GetLongPathName to get long file name for a given short file name. Eg: [sourcecode language=’cpp’]TCHAR szPath[MAX_PATH] = { 0 }; GetShortPathName( _T( “C:/Program Files/Microsoft Visual Studio” ), szPath, MAX_PATH ); MessageBox( NULL, szPath, _T( “Short path” ), MB_OK ); TCHAR szShortPath[MAX_PATH]; […]
Continue reading…