How configure and use SNTP on WinCE 7 (T20)?

We only want to enable/disable SNTP, set server and time zone from a Silverlight application.
How set it into WinCE and/or via an WinCE API?

You can be able to enable/disable this feature by first modifying the registry and then notify the system to reload the settings.

Modify registry

You have to set the Server key to an empty string. You find a documentation about that on our developer website. If you need some hints on how to modify the registry from a program, we provide some sample C++ code here.

Refresh service

After you have modified the registry, you have to send the IOCTL IOCTL_SERVICE_REFRESH. Details about that can be found on this MSDN page (also valid for CE 7).

Thank you for that solution.

Only one question remains from my side. On the developer website, you set the refresh value as :
“refresh” = dword:240C8400 ;get time from server once a week

When I set another value, sntp doesn’t work anymore : is it possible to set a custom value in refresh?

Thank you for your help.

Check maybe that you have encoded it in DWORD. If it is not DWORD, the service is not registered.