Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set the computer clock from VFP ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00431253
Message ID:
00431255
Vues:
18
>Hi All
>
>I need to create some kind of Time Synchronization scheme, but unfortunately I can not find a command to set the clock of the computer directly from VFP (VFP5a) and also a VFP command to retrieve the time from a server (NT Server).
>
>I hope someone can help me out.

The trivial way toget the date from a remote system is to FCREATE() a temporary file on the server; the time/date stamp on the file is determined by the system where the file is created, not the local workstation's time. Use ADIR() to retreive the time/date stamp on the file. Given that, there's a Win32 API function that will set the system clock to the new value. There's sample code in the FAQ that shows how to do this.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform