locked
Prevent to Change Date Time On Windows Mobile 6.5/Windows CE RRS feed

  • Question

  • Hi all,

    I am developing a sales application. I want users not to change mobile device date/time setting. 

    I found a method for windows mobile 6.0 like below and it works great. But this method is not working on wm 6.5 (Motorola MC65) and winCE (Casio DTX30) devices.

    Is there any way preventing to change date time on this device.

    Thank you for your supply.

    // 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", value);
    registryKey.Close(); 

    Wednesday, August 29, 2012 2:14 PM

All replies