Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm writing a simple service for synchronizing date&time between PC's.

How to change PC date-time (local or global) with visual dotnet c++ API ?
I think I need to require privilege to do it too.

Best regards.
Posted

1 solution

See SetDateTime method of the Win32_OperatingSystem Class [^]

[UPDATE] and ::SetSystemTime().
 
Share this answer
 
v2
Comments
Foulques NERA 8-Feb-12 11:48am    
Sorry, where can I found this class ?
Jochen Arndt 8-Feb-12 11:59am    
It's part of WMI. Follow the links from the above link. I have also updated my solution by adding ::SetSystemTime().

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900