次の方法で共有


SNTP Registry Settings (Compact 2013)

3/26/2014

The SNTP registry settings are located under the HKEY_LOCAL_MACHINE\Services\Timesvc registry key. Upon system startup, servicesd.exe uses the information located under this key to initialize the SNTP service.

After you have modified the registry settings for your SNTP service, it is not necessary that you reboot your device for the changes to take effect. To implement the changes in the registry without rebooting the device, you must pass in the IOCTL_SERVICE_REFRESH IOCTL to the xxx_IOControl (Servicesd.exe) function.

The following table shows the named values for the HKEY_LOCAL_MACHINE\Services\Timesvc registry key.

Value : type

Description

Context : REG_DWORD

Default set to zero (0). Specifies the initial value passed into the initialization routine.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
Do not modify this value.

Dll : REG_SZ

Default set to "timesvc.dll". Specifies the name of the dynamic-link library (DLL) file to be loaded.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
Do not modify this value.

Order : REG_DWORD

Default set to 99. Specifies the order in which Servicesd.exe will load the service.

Keep : REG_DWORD

Default set to 1. If set to zero (0), the DLL will be unloaded immediately after initialization.

Prefix : REG_SZ

Default set to NTP. Specifies the prefix of the DLL to be loaded.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
Do not modify this value.

Index : REG_SZ

Default set to zero (0). Specifies the service index.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
Do not modify this value.

Server

Specifies the domain name of the SNTP server. If the name of one server is specified, this value is type REG_SZ. If a list of servers is specified, this value is type REG_MULTI_SZ. If no name is provided, server-only operation will be assumed.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
For a list of available SNTP servers, visit this Microsoft Web site.

Refresh : REG_DWORD

Specifies the period, in milliseconds, between synchronizations with the SNTP server. This is ignored in server-only mode.

RecoveryRefresh : REG_DWORD

Specifies the time, in milliseconds, until next synchronization if the previous attempt failed. This is ignored in server-only mode.

Ee500860.note(en-us,WinEmbedded.80).gifNote:
The time specified for this key must be less than the time specified for the Refresh key.

Threshold : REG_DWORD

Specifies the interval, in milliseconds, between the time on the SNTP server and the current time. If the difference between the SNTP server time and the local system time is larger, the update is ignored unless the system clock is presumed incorrect. This is ignored in server-only mode.

ServerRole : REG_DWORD

Default set to zero (0). Specifies the time server role. If this value is set to 1, a time server running on the Windows Embedded Compact powered device will be enabled.

Trustlocalclock : REG_DWORD

Default set to 1. If this value is set to zero (0), the system is presumed not to have Real-time Communication (RTC) capabilities. If this is the case, server multicast is disabled until the clock synchronization with the SNTP server succeeds, and queries to the server return the "unreliable clock" flag. Also, time synchronization is forced on system wake-up.

If the client is disabled, the clock is presumed to be privileged and this value is ignored.

Multicast : REG_DWORD

Specifies the IPv4 address for multicast mode. Setting this value to 1 turns on the multicast server.

Multicastperiod : REG_DWORD

Specifies the interval between subsequent multicasts.

AutoUpdate : REG_DWORD

If 1, enables automatic time updates by SNTP client. "Server" must be specified.

Enable automatic daylight savings switch-over

The HKEY_LOCAL_MACHINE\Software\Microsoft\Clock\AutoDST registry subkey enables the SNTP service (timesvc.dll) to perform automatic daylight savings switch-over.

Note

Timesvc.dll is not included on all devices.

Table below shows the named value for this subkey.

Value : type

Description

AutoDST : DWORD

Default setting is 1, which enables the automatic daylight savings switch-over service. Setting of 0 disables the service.

Ports

Both SNTP and NTP are clients of the User Datagram Protocol (UDP). The UDP port number assigned to NTP is 123.

See Also

Reference

xxx_IOControl (Servicesd.exe)

Other Resources

Simple Network Time Protocol (SNTP)