Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating sys(2015)
Message
De
09/02/1999 07:10:33
 
 
À
09/02/1999 01:58:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00185406
Message ID:
00185438
Vues:
39
>Ok, don't laugh. I have a Fox application that uses sys(2015) to create unique keys.
>
>I would like to create a small utility application in VB that acts upon this Fox data, but I need to know if there is a way to simulate the sys(2015) function. Any ideas?
>
>I suppose if someone can suggest any function, that will return a unique 10 character string, I could substitute this for the sys(2015) call.

Since MS didn't publish the algorithm anywhere, it's a bit tough to know. There are at least two options available, although both have a certain cost in overhead:

(1) Create an in-process server with VFP that has a method that invokes SYS(2015) and returns the value, or

(2) Use the Visual FoxPro FPOLE.DLL's FoxEval() API call or the Visual FoxPro Automation Object VisualFoxPro.Application EVAL() method to return the value of SYS(2015). VB should be able to access either.

In all cases, this will use VFP's runtime to get the SYS(2015) value, so it will use the same mechanism you've come to love in VFP.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform