Using Win32 functions in Visual FoxPro Image Gallery
Shell Lightweight Utility APIs -- Path Functions
..msdn
PathBuildRoot
PathCombine
PathCompactPathEx
PathFileExists
PathFindExtension
PathFindFileName
PathFindOnPath
PathGetDriveNumber
PathGetShortPath
PathIsDirectory
PathIsNetworkPath
PathIsRelative
PathIsRoot
PathIsURL
PathRenameExtension
PathSearchAndQualify
UrlEscape
UrlGetPart
UrlHash
UrlUnescape
Code examples:
PathGetShortPath
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the short path form of a specified input path.
Code examples:
Declaration:
void PathGetShortPath(
    LPWSTR pszLongPath
);
FoxPro declaration:
DECLARE PathGetShortPath IN shell32;
    STRING @pszLongPath
Parameters:
pszLongPath
[in, out] A NULL-terminated Unicode string that contains the long path. When the function returns it contains the equivalent short path.
Return value:
No return value.
Usage:
cPath = STRCONV(_vfp.ServerName,5)
= PathGetShortPath(@cPath)
? STRCONV(SUBSTR(cPath, 1, AT(CHR(0)+CHR(0), m.cPath)),6)
My comment:
Minimum OS: Windows 2000

Note that same parameter is used for both input and output. The short name most of the times takes less space than the buffer allocates, so the trailing part has to be cut off.

See also: GetLongPathName, GetShortPathName.
Word Index links for the PathGetShortPath :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-03-09 10:17:09
Modified: 2007-06-11 16:25:42
Visited in last 7 days: 5
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.38), 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.232.243)
12 sec.Function: 'GetPrinterDriverDirectory'
24 sec.Function: 'CertOpenSystemStore'
Function group: 'Cryptography Reference'
35 sec.Function: 'SQLInstallerError'
48 sec.Function: 'GetProcAddress'
58 sec.Function: 'WinHttpOpenRequest'
1.15 min.Function: 'mciSendString'
1.33 min.Function: 'GetQueueStatus'
1.52 min.Function: 'GdipCreateBitmapFromHICON'
1.68 min.Function: 'HeapFree'
1.85 min.Function: 'InternetTimeFromSystemTime'
Google
Advertise here!