문제

I'd like to configure Windows programmatically to use a user-specified SNTP server. Is there a function in the Windows API for that?

도움이 되었습니까?

해결책

You can do it through the registry:

Alternatively, you could interact with the W32tm console utility.

The Date and Time control panel (timedate.cpl) does this with a call to W32TimeSetConfig from w32time.dll, but that appears to do nothing but set the NtpServer value in HKLM\System\CurrentControlSet\Services\W32Time\Parameters.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top