Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.52 KB

GetShortPathName.md

File metadata and controls

60 lines (41 loc) · 1.52 KB

Home

Function name : GetShortPathName

Group: File Management - Library: kernel32


Retrieves the short path form of a specified input path


Code examples:

Converting long file names to the short format and vice versa
Converting path to original case

Declaration:

DWORD GetShortPathName(
  LPCTSTR lpszLongPath,  // null-terminated path string
  LPTSTR lpszShortPath,  // short form buffer
  DWORD cchBuffer        // size of short form buffer
);  

FoxPro declaration:

DECLARE INTEGER GetShortPathName IN kernel32;
	STRING    lpszLongPath,;
	STRING  @ lpszShortPath,;
	INTEGER   cchBuffer  

Parameters:

lpszLongPath [in] Pointer to a null-terminated path string

lpszShortPath [out] Pointer to a buffer to receive the null-terminated short form of the path specified by lpszLongPath

cchBuffer [in] Specifies the size, in TCHARs, of the buffer pointed to by lpszShortPath


Return value:

If the function succeeds, the return value is the length of the string copied to lpszShortPath


Comments:

The short path means the 8.3 compliant path/filename.

See also: PathGetShortPath, GetLongPathName, GetFullPathName.