Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simulating sys(2015)
Message
From
09/02/1999 07:10:33
 
 
To
09/02/1999 01:58:21
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00185406
Message ID:
00185438
Views:
37
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform