How to control in-built SNTP Service IN Windows Ce 5.0 Programatic

M

Manish Bafna

Hi,
It is since 8 to 10 days i am trying to configure SNTP
Service(programatically) in windows CE 5.0 as suggested by eMVP in this
newsgroup.But code sample given in below msdn link for SNTP Service
Configuration Code Sample is neither compiling nor it is working:
http://msdn2.microsoft.com/en-us/library/ms899593.aspx
Please help me out as how to control in-built SNTP Service in windows ce 5.0
through code.That is on button click i want my clock in windows ce 5.0 to
synchronize with time servers.
Thanks in advance for replying(as always)
 
G

Guest

What part isn't working? It should be a simple Open/Ioctl/Close set of
calls. The link you reference in native code, so you obviously have to
create a managed version. You could also just query the time server
directly and set your clock.
 
P

Paul G. Tobey [eMVP]

The OP may be having difficulty getting the service to actually run because
the documentation for the registry settings is a little hazy. I thought I
gave this list previously, but maybe not. Here are the registry values that
you should set (all of them, to something suitable), to allow the service to
run as a client:

"Server" - the server or list of servers to sync with

"Refresh" - how often to check for the need to update the clock

"RecoveryRefresh" - when connection to all servers fails, how long to wait
to retry

"AutoUpdate" - set to 1 to have the service update the clock (pretty
useless if you don't set it)

"Threshold" - If the local clock is trusted, the maximum offset from the
server that will allow the local clock to be updated. That is, if the local
clock is different from the server by more than this amount and the local
clock is trusted (below), the local clock will not be updated. If it is
different by less than this value or if the local clock is untrusted, it
will be updated.

"TrustLocalClock" - If set to 1, the local clock will only be set if the
time is way off from the server. If set to 0, the local clock is generally
treated as "wrong" and updated.

I think that's the list...

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top