Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(2023) returns wrong directory in VFP 9
Message
From
03/10/2005 16:02:46
 
 
To
03/10/2005 13:35:20
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01055565
Message ID:
01055619
Views:
17
Andrus, I think the 'Visual Foxpro Beta' category is the best place for this 'bug'. The vfpteam scans that category currently with extra attention.

>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?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform