 |
GetLongPathName ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
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: |
 |
|
|
 |
 |
| 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. |
 |
 |
| Usage: |
 |
FUNCTION GetLong(lcName)
LOCAL lcBuffer, lnResult
lcBuffer = Repli(Chr(0), 512)
lnResult = GetLongPathName(lcName,;
@lcBuffer, Len(lcBuffer))
* 2=ERROR_FILE_NOT_FOUND
RETURN IIF(lnResult=0, "error #" +;
LTRIM(STR(GetLastError())),;
Left(lcBuffer, lnResult))
|
 |
 |
| My comment: |
 |
| See also: GetShortPathName, PathGetShortPath, GetFullPathName |
 |
 |
| Word Index links for the GetLongPathName : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-01-26 12:19:04 | | Modified: | 2010-05-26 12:14:46 | Visited in last 7 days: 33 |