Using Win32 functions in Visual FoxPro Image Gallery
File Management
..msdn
CopyFile
CopyFileTransacted
CreateDirectory
CreateFile
CreateFileTransacted
CreateHardLink
CreateSymbolicLink
DeleteFile
DeleteFileTransacted
FindClose
FindCloseChangeNotification
FindFirstChangeNotification
FindFirstFile
FindNextChangeNotification
FindNextFile
FlushFileBuffers
GetBinaryType
GetCurrentDirectory
GetDriveType
GetFileAttributes
GetFileAttributesEx
GetFileInformationByHandle
GetFileType
GetFullPathName
GetLongPathName
GetShortPathName
GetTempFileName
GetTempPath
LockFile
MoveFile
MoveFileTransacted
OpenFile
QueryDosDevice
ReadDirectoryChangesW
ReadFile
RemoveDirectory
RemoveDirectoryTransacted
ReplaceFile
SearchPath
SetCurrentDirectory
SetEndOfFile
SetFileAttributes
SetFilePointer
SetFilePointerEx
SetSearchPathMode
UnlockFile
WriteFile
_lclose
_lopen
Code examples:
Converting long file names to the short format and vice versa
Converting path to original case
Creating a unique filename based on existing filename
Using the GetTempFileName
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:
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.
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-01-26 12:19:04
Modified: 2010-05-26 12:14:46
Visited in last 7 days: 23
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.199.178)
13 sec.Function: 'IsPwrSuspendAllowed'
26 sec.Function: 'GdipBitmapSetResolution'
40 sec.Function: 'MQDeleteQueue'
54 sec.Function: 'JetAddColumn'
1.1 min.Function: 'WNetCloseEnum'
1.35 min.Function: 'SetWindowText'
1.53 min.Function: 'SetWindowLong'
1.73 min.Function: 'GetFullPathName'
1.98 min.Function: 'GdipSetMatrixElements'
2.18 min.Function: 'waveOutGetNumDevs'
Google
Advertise here!