Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.7 KB

GetLongPathName.md

File metadata and controls

60 lines (42 loc) · 1.7 KB

Home

Function name : GetLongPathName

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.


Code examples:

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

Declaration:

DWORD GetLongPathName(
  LPCTSTR lpszShortPath, // file name
  LPTSTR lpszLongPath,   // path buffer
  DWORD cchBuffer        // size of path buffer
);  

FoxPro declaration:

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

Parameters:

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.


Return value:

If the function succeeds, the return value is the length of the string copied to the lpszLongPath parameter, in TCHARs.


Comments:

See also: GetShortPathName, PathGetShortPath, GetFullPathName.