>>>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.
An out-of-process COM server is an application that communicates with another process using COM (COmponent Object Model) to make its services available to the caller. An out-of-process server is one that runs as a separate process, possibly (in your case, probably) on another system as a separate executable. The COM server is accessed in VFP through CREATEOBJECT(), which either connects with a running server or attaches to an already existing server. The client can then invoke methods (functions) on the COM server, passing parameters to and receiving results from the server via the exposed (public) properties of the COM server object. See chapter 16 of the Developer's Guide for more details on using VFP to create and communicate with COM objects.