Full registry backup and recovery solution for Windows Mobile:
You can use regcopyfile (), regrestorefile (), regsavekey (), and regreplacekey () to complete registry backup and recovery on Windows Mobile.
Regcopyfile () and regsavekey () are two types of functions, both of which copy the registry. The difference is that they are for different types of registries. In Windows, the Registry types are divided into oject storage-based registries and hive-based registries. Oject storage-based registry. Stores all registry data in Ram. Hive-based registry. Stores all or part of the registry data in permanent storage. Regcopyfile () is the registry for oject storage, while regsavekey () is the registry for hive.
When you try to use these two functions directly, you will find thatProgramThese two functions cannot be recognized. This is because the program lacks the pwinreg. h header file. The solution is to download the Pb software. After installation, copy the pwinreg. h file under the Pb software to the project and call it directly.
Notes:
1. When using regreplacekey (), follow the following procedure:
A> restore regreplacekey;
B> regflushkey () prompts it to be fully written;
C> program sleep for 3-5 seconds to end the write process;
D> the program restarts immediately (2003 and 2005 are different ).
2. Soft restart is required after recovery;
3. differentiate different types of registries;
4. Be sure to include the pwinreg. h and winreg. H files.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/Leroy_xie/archive/2007/08/13/1741218.aspx