 |
GetShortPathName Add comment W32 Constants Translate this page |
 |
 |
|
Retrieves the short path form of a specified input path |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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 |
 |
 |
| Usage: |
 |
FUNCTION GetShort(lcName)
LOCAL lcBuffer, lnResult
cBuffer = Repli(Chr(0), 512)
nResult = GetShortPathName(lcName,;
@lcBuffer, Len(lcBuffer))
RETURN IIF(lnResult=0, "error #" +;
LTRIM(STR(GetLastError())),;
Left(lcBuffer, lnResult))
|
 |
 |
| My comment: |
 |
The short path means the 8.3 compliant path/filename.
See also: PathGetShortPath, GetLongPathName, GetFullPathName |
 |
 |
| Word Index links for the GetShortPathName : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-19 12:00:00 | | Modified: | 2010-05-26 12:15:47 | Visited in last 7 days: 36 |