Group: File Management - Library: kernel32
The GetLongPathName function converts the specified path to its long form. If no long path is found, this function simply returns the specified name.
Creating a unique filename based on existing filename
Using the GetTempFileName
Converting long file names to the short format and vice versa
Converting path to original case
DWORD GetLongPathName(
LPCTSTR lpszShortPath, // file name
LPTSTR lpszLongPath, // path buffer
DWORD cchBuffer // size of path buffer
);
DECLARE INTEGER GetLongPathName IN kernel32;
STRING lpszShortPath,;
STRING @ lpszLongPath,;
INTEGER cchBuffer
lpszShortPath [in] Pointer to a null-terminated path to be converted.
lpszLongPath [out] Pointer to the buffer to receive the long path. You can use the same buffer you used for the lpszShortPath parameter.
cchBuffer [in] Specifies the size of the buffer, in TCHARs.
If the function succeeds, the return value is the length of the string copied to the lpszLongPath parameter, in TCHARs.
See also: GetShortPathName, PathGetShortPath, GetFullPathName.