RegRestoreFile (Windows Embedded CE 6.0)
1/6/2010
This function places the operating system (OS) in a state in which the registry can be replaced by the supplied file on a warm boot.
Syntax
BOOL RegRestoreFile(
LPCWSTR lpszFile
);
Parameters
- lpszFile
[in] Specifies the name of the file to be saved. The file can exist on any mounted file system that is accessible to the OS.
Return Value
TRUE indicates success; FALSE indicates failure. To get extended error information, call GetLastError. GetLastError may fail, returning ERROR_NOT_SUPPORTED.
Remarks
This function is supported only for the object store-based registry. To save and restore data in the hive-based registry, see RegSaveKey and RegReplaceKey.
**The file that is to be restored can exist on any mounted file system that is accessible to the OS.
Calling this function copies the file to the RAM file system. This function either renames lpszFile to Restore.fdf, or it copies the contents to Restore.fdf before it deletes lpszFile. If lpszFile is set to Restore.fdf, this function succeeds, but no data is copied.
To complete a registry replacement operation, the OS must undergo a warm boot. Then during initialization, the OS reads the Restore.fdf file and creates or stores the contents of the file in the registry.
The data file that is saved by the WriteRegistryToOEM function cannot be imported directly by this function. Use the RegCopyFile function to save the data that is to be restored by WriteRegistryToOEM function, or use WriteRegistryToOEM to save the data that is to be imported by the ReadRegistryFromOEM function.**
Requirements
Header | pwinreg.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 2.10 and later |
See Also
Reference
Registry Functions
RegCopyFile
RegSaveKey
RegReplaceKey
Concepts
Persisting Data with the RAM-Based Registry