Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange directories from sys(16) , curdir()
Message
De
13/04/2002 20:52:29
 
 
À
13/04/2002 09:54:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00644667
Message ID:
00644773
Vues:
23
>Michael,
>What would it matter. In any case they're same dirs. But if you're desperate to correct it you could use winAPI :

Im my case it does matter since some comparisons are made against this directory in a long format which is picked up from ini file. And in this case the functions suggested by you are very handy, indeed.


>
>
>DECLARE integer GetLongPathName IN WIN32API ;
>	string @ lpszShortPath, string @ lpszLongPath, integer cchBuffer
>DECLARE integer GetShortPathName IN WIN32API ;
>  string @ lpszLongPath, string @ lpszShortPath, integer cchBuffer
>
>lcDir = SYS(5)+CURDIR()
>STORE SPACE(300) TO lpszShortPath, lpszLongPath
>lnLen = GetShortPathName(lcDir,@lpszShortPath, 300)
>? SUBSTR(lpszShortPath,1,lnLen)
>lnLen = GetLongPathName(SUBSTR(lpszShortPath,1,lnLen),@lpszLongPath,300)
>? SUBSTR(lpszLongPath,1,lnLen)
>
Cetin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform