Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(2023) returns wrong directory in VFP 9
Message
De
03/10/2005 13:35:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
SYS(2023) returns wrong directory in VFP 9
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01055565
Message ID:
01055565
Vues:
110
VFP 9 help about SYS(2023) says:
SYS(2023) uses the Windows API GetTempPath to search for the path
containing the temporary files.
DECLARE INTEGER GetTempPath IN "kernel32"  ;
		LONG nBufferLength,  		STRING lpBuffer
LOCAL lnBufferLength, lnReturn
lnBufferLength = 512
lcBuffer = REPLICATE( " ", lnBufferLength )
lnReturn = GetTempPath( lnBufferLength, @lcBuffer )
* Strip the null delimiter before returning the value
MESSAGEBOX( 'GetTempPath: '+ STRTRAN( TRIM( lcBuffer ), CHR(0), '' ) + CHR(13) + ;
     'SYS(2023): '+SYS(2023) )
Produces different results:

GetTempPath: C:\WIND98\TEMP\
SYS(2023): C:\DOCUME~1\ANDRUS\LOCALS~1\TEMP

Why?
In VFP 7 results are the same.

My VFP 7 and 9 applications use SYS(2023) directory to communicate and this causes my code to fail. How to fix this?
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform