Saving/restoring registry keys

  • Thread starter Thread starter Geoff Callaghan
  • Start date Start date
G

Geoff Callaghan

I have a touch screen that I need to have stay calibrated when the power
goes off. I'm thinking my best bet is to calibrate the screen, extract the
registry value, and then set that registry value every time the device
boots. I'm even willing to export the whole registry file and do it that
way, if necessary. I see that OpenNetCF has a registry wrapper, but no one
is answering my questions on that forum. What is the easiest way to do this?

Geoffrey Callaghan
 
The device should provide a means of saving the registry. What device is
this? Talk to the device OEM about how to persist the registry. Copying
stuff back to the registry, eventually, isn't going to make it suddenly take
effect...

Paul T.
 
Why don't you pinvoke RegFlushKey so you can persist the calibration data?
Otherwise if you need to extract a reg value and restore it on boot then you
can use the opennetcf.win32 registry and registrykey classes. The interface
resembles that of the desktop so there is plenty of documentation. Show us
what code you have tried so someone can help...

Cheers
Daniel
 
I'm talking to the OEM now about it, but I was hoping for a short term,
quick fix. Thanks anyway.
 
You'd have to do a two-stage boot: on cold boot, restore the registry
entries, then perform a warm boot, which should maintain them in RAM. This
is not a good choice. If the OEM has not considered persistent registry,
you might want to think about a different device vendor...

Paul T.
 
Back
Top