Link to home
Start Free TrialLog in
Avatar of lermytte
lermytte

asked on

Clock synchronisation over a network

I would like to synchronise the clock off a workstation with the clock that's running on a server. They are networked with Windows 98. How can I do this with Visual Basic 6.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tylerd
tylerd

right an application that sits on the server that generates a text file every x number of seconds with the current server time.  Then the client can access that file like this:
open "\\server\c\time.txt" for input as 1
Avatar of lermytte

ASKER

Hi EDDYKT,

I tried your program but got the error "can't find DLL entry point NetremoteTOD in NETAPI32.DLL". By the way we use Windows 98.

Thanks

Eddy
You could shell the 'net time' command:

Shell "net.exe time \\" & ServerName, 1

Or create a batch file...

@ECHO OFF
cls
ECHO.
ECHO Syncronizing Time...
net time \\ServerName
exit

Replace the ServerName variable with the server you want to sync with.
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange