how to get long file name (instead of old 8.3 notation)
-
i'm using this code snippet to create a temp file name :
CString CUtil::CreateTempFileName( void ) { CString cs = ""; TCHAR szTempName[_MAX_PATH]; TCHAR szPath[_MAX_PATH]; if(GetTempPath(sizeof(szPath), szPath) != 0) { if(GetTempFileName(szPath, _T("csc"), 0, szTempName) != 0) { cs = szTempName; } } return( cs ); }
Its results in something like : c:\DOKUME~1\USERKE~1\LOKALE~1\Temp\csc14.tmp Anybody with an idea how to get the (real) long file name instead of this old 8.3 notation ? Thank's for any hint ! :) -
i'm using this code snippet to create a temp file name :
CString CUtil::CreateTempFileName( void ) { CString cs = ""; TCHAR szTempName[_MAX_PATH]; TCHAR szPath[_MAX_PATH]; if(GetTempPath(sizeof(szPath), szPath) != 0) { if(GetTempFileName(szPath, _T("csc"), 0, szTempName) != 0) { cs = szTempName; } } return( cs ); }
Its results in something like : c:\DOKUME~1\USERKE~1\LOKALE~1\Temp\csc14.tmp Anybody with an idea how to get the (real) long file name instead of this old 8.3 notation ? Thank's for any hint ! :)Have a look at the
GetLongPathName
function. Steve -
Have a look at the
GetLongPathName
function. Steve