A lot of people don't think it is possible to lock the time on Pocket
PC's but Microsoft apparently left a little known backdoor that does
exactly this.
You will need the OpenNETCF SDF in order for the registry code below to
work.
http://www.opennetcf.org/
// disable clock
System.Byte[] offValue = new byte[1];
offValue [0] = 0x30;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Clock\",
true);
registryKey.SetValue("AppState", offValue);
registryKey.Close();
// enable clock
System.Byte[] onValue = new byte[1];
onValue[0] = 0x11;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Clock\",
true);
registryKey.SetValue("AppState", onValue);
registryKey.Close();