Getting result of RTCSync when refreshing NTP

A user wants to be able to set their own internal NTP server. After setting this into the registry, I call IOCTL_SERVICE_REFRESH to the NTP driver and it correclty updates.

Now, how do I know that they have a valid NTP server input? Is there any way to get the result of the RTCSync event? If they have typed in an invalid NTP server for whatever reason, I would like to know if it failed, so I can fall back and try pool.ntp.org before giving up.

Any advice?

Reading from here: https://msdn.microsoft.com/en-us/library/ee500860.aspx it seems that if you list multiple entries in the ‘Server’ key, it will try them in the order that is entered. Also remember to change the key type to REG_MULTI_SZ when doing this.

Hope that helps anyone else with this question

@Cerealkiller050: Thanks for sharing that.