B
bbomer
I have a CE device that supports persistent registry. The device
documentation says "To save the registry you must call the Standard
Windows CE API function RegFlushKey(HKEY_LOCAL_MACHINE);"
This is what I have as far as some generic code right now:
[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);
private void button1_Click(object sender, System.EventArgs e)
{
try
{
long test = RegFlushKey(0x80000002);
System.Diagnostics.Debug.WriteLine(test);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex,"ERROR");
}
}
What does "RegFlushKey" actually do? I have run this code and it
returns "0" which I assume means that it completed without error.
However it doesn't seem to do anything as the registry is restored to
the original upon reboot.
The device documentation mentions a "CEREG.BIN" file, but I can't find
that anywhere. I have built the CE image using platform builder, do I
need to do something there to enable persistent registry?
Note: device is a Kontron MOPSlcd7 Pentium III based PC/104
documentation says "To save the registry you must call the Standard
Windows CE API function RegFlushKey(HKEY_LOCAL_MACHINE);"
This is what I have as far as some generic code right now:
[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);
private void button1_Click(object sender, System.EventArgs e)
{
try
{
long test = RegFlushKey(0x80000002);
System.Diagnostics.Debug.WriteLine(test);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex,"ERROR");
}
}
What does "RegFlushKey" actually do? I have run this code and it
returns "0" which I assume means that it completed without error.
However it doesn't seem to do anything as the registry is restored to
the original upon reboot.
The device documentation mentions a "CEREG.BIN" file, but I can't find
that anywhere. I have built the CE image using platform builder, do I
need to do something there to enable persistent registry?
Note: device is a Kontron MOPSlcd7 Pentium III based PC/104