Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shorter than sys(2015)
Message
De
04/02/2015 15:24:21
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
04/02/2015 06:10:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01614860
Message ID:
01614891
Vues:
96
Peter,

Tamar has suggested that sys(2015) is not unique across sessions.

She is correct. *Definitely* there can be duplicates between simultaneous instances on a quick server.

You can get around it using Windows handles (that are unique across all sessions)
DECLARE INTEGER GetActiveWindow IN user32
? getactivewindow()
Truncating to 5 characters: integer is only 4 (!) , BINTOC() will return 4 chars but includes chr(0) and other characters not suitable for some uses. In the old days before integer dbf fields (remember those days?!) we used an AllowedCharacter algorithm to convert integer to 4 alphanumeric chars. Hex won't work- 5 characters not enough for Windows handle.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform