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
GetShortPathName
    Add comment     W32 Constants      Translate this page
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
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-19 12:00:00
Modified: 2010-05-26 12:15:47
Visited in last 7 days: 17
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.80.137.168)
2 sec.Function: 'CeMoveFile'
3 sec.Function: 'FindFirstVolume'
5 sec.Function: 'JetCreateDatabase'
8 sec.Function: 'LookupPrivilegeDisplayName'
10 sec.Function: 'CryptUnprotectData'
14 sec.Function: 'GetCurrentProcess'
17 sec.Function: 'ChooseColor'
19 sec.Function: 'midiOutOpen'
22 sec.Function: 'CryptGenRandom'
24 sec.Function: 'GdipGetImageRawFormat'
Google
Advertise here!