How do I set the system time

B

Boris Stoicov

Hi,


I am writing .NET CF application that will run on PPC and HPC devices.
I want to set the system time of the device according to GPS time that I
get.
How can i programmatically set the time of the device from my application.
I also want to turn off the device programmatically from the application but
I don't know what API I should call.
Any help will be appreciated. Thank you in advance.
 
P

Peter Foot [MVP]

The API is SetSystemTime - it expects the date/time as a SYSTEMTIME struct.
You can use the DateTimeEx class in the SDF which wraps this (or if you
prefer just borrow that particular piece of source code)
www.opennetcf.org/sdf (source: http://vault.netcf.tv username: guest
password: guest)

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top