Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sys(2023) returning weird values
Message
De
07/04/2017 22:08:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Sys(2023) returning weird values
Divers
Thread ID:
01649962
Message ID:
01649962
Vues:
72
Has anybody encountered situations where SYS(2023) is occasionally not returning a valid temporary folder?

I'm running situation where value could be:
1. blank
2. somewhere in c:\windows\ (or any of the protected directories)
3. sometimes a non-existent folder (usually looking like a portion of a directory name -- e.g. "indows\te")

It seems to be occurring when:
a. it is called within multithreaded DLL
b. it is called in regular application code being run in a remote desktop session

If I try looking at the TEMP environment variable with GETENV(), I'm getting the same sort of results I'm getting with SYS(2023).

For the time being, I've added a kludge so that application code checks to see if SYS(2023) returns invalid folder -- when such a situation is detected, it uses JUSTPATH() to get the folder of one of the tables it happens to have open at that point and use that folder as the temporary folder. It did work around the immediate problem (was frequently getting "access denied" errors before the kludge was added), though the tradeoff has been that now the data folders gets cluttered with temporary files.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform