C++ Checking if internet time is ON

PSHUN99 21 Reputation points
2021-10-02T16:32:08.277+00:00

Hi!
I'm writing a program, and some parts of it can work correctly only if the Internet Time is enabled in the Win10 settings.
How can I check through C++ code if it's turned On?

The program runs in other people's PCs, so the goal is to be able to do this without any additional settings, or system variables (for example in the Registry Editor).

This is the setting's place in the Control Panel:
137087-image.png

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,159 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,629 questions
{count} votes

Accepted answer
  1. Castorix31 83,106 Reputation points
    2021-10-02T17:00:30.303+00:00

    It is stored in the registry, at :

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\Parameters\Type

    (NTP if configured)

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful