Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I 've to get the System Date from another PC
Message
De
31/08/1998 13:32:29
 
 
À
31/08/1998 07:25:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00131444
Message ID:
00131581
Vues:
24
>>I'm developing a multiuser application (not a Client/server anyway) and I've the need to get the datetime() of a master PC to synchronize (I think I made a mistake but I don't want to get the dictionary) all the other PC with that one.
>>How can I do to do it ?
>
>Unfortunately, it depends on the type of machine being used as the master PC, and the network environment. On Novell networks, if all your systems use the same server, and use login scripts, they will be synced to the clock on the Novell server every time they reboot, and there is a Novell API call to read the clock of the default server. In a Microsoft networking environment, you can synchronize to that station's clock using the DOS command line:
>
> NET TIME \\computername /SET /YES
>
>If the machine is in another workgroup or domain, you will need additional parameters. See the built-in help for the NET TIME command by entering:
>
> NET TIME /? | MORE
>
>at a DOS command prompt.
>
>There is a Windows API call, NetRemoteTOD(), available to Windows NT 3.51 or later, and to Win98, but not to Win95 or Win3.x, that will request the time from a remote system acting as a time server. Short of that, you could create an out-of-process COM server that reported the time via a method call; you would run it on one of your machines which would become the server, and other machines would then attach to it via CREATEOBJ() and invoke the method when they wanted to read the server clock.

Sorry if I'm writing again on the same question but What do you mean with out-of-process COM server ? It sounds like it was the solution for my problem.
Thank you again
Alessio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform