Link to home
Start Free TrialLog in
Avatar of kakamna
kakamna

asked on

Getting the NT Server Time from Windows 98 client

How can i Get the Current Time of Windows NT Server while my
application is running on win98 client and then synchronize my workstation tiem with the server time
Avatar of jclanz
jclanz

hello,
Do the following command

NET TIME \\YOURSERVER /SET /YES

regards, jean-claude.
I'd assume that you want to do this programmatically, and not from the console manually. So:

The 15-point answer is: spawn the NET TIME command from your application.

The more expensive answer is to thunk a call to the 16-bit version of NetRemoteTOD() and deal with the results. Unfortunately, the 16-bit version of this routine is pretty buggy; it doesn't account for time-zone differences between the server and the client, so you'll need to work that out after you make the call yourself. NET TIME works around that bug for you, so it's probably your best bet.

..B ekiM
Avatar of kakamna

ASKER


Actually I have used the Prot 37 but when i want to connect the socket the server refuses to get the result althogh there server of IBM AIX operating system is working fine with my routine. Now I want to know that waht kind of Services woulb be installed or have to enabled in order to communiate on port 37
First, you said your server was running Windows NT.  Now, you're saying that your server is running AIX.

Which is it?  What's your _real_ question?

..B ekiM
Avatar of kakamna

ASKER

Well I am trying to write an apllication whcihc can pick the time from the NT server I have wriiten a routine but when when i give the hostname of ntserver or win98 it does not work but when i use the host name of AIX the routine is Perfect. It means that there is nothing wrong at client side. In case of NT I rcieve Error Code 10061 which describes that there is problem on server side that either server has actively refused to give a connection or the desire service is not running. Now I want to resolve that problem
That just means that the Windows machine you're connecting to isn't running the time protocol server you expect.

If you want to use that protocol, you've got to install the software to support it. Once its running, it'll work just fine.

..B ekiM
Avatar of kakamna

ASKER

What kind of software i need is available and where which can install time protocol
Avatar of kakamna

ASKER

Adjusted points to 30
Avatar of kakamna

ASKER

From Where can I get that Protocol or Software so That I become enale for communication on Port 37
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

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