API 函数GetShortPathName:
The GetShortPathName function obtains the short path form of a specified input path.
DWORD GetShortPathName(
LPCTSTR lpszLongPath, // points to a null-terminated path string
LPTSTR lpszShortPath, // points to a buffer to receive the null-terminated short form of the path
DWORD cchBuffer // specifies the size of the buffer pointed to by lpszShortPath
);
Parameters
lpszLongPath
Points to a null-terminated path string. The function obtains the short form of this path.
lpszShortPath
Points to a buffer to receive the null-terminated short form of the path specified by lpszLongPath.
cchBuffer
Specifies the size, in characters, of the buffer pointed to by lpszShortPath.