RegCopyFile (Windows CE 5.0)

Send Feedback

This function saves a copy of the current Windows CE RAM–based registry to a specified file.

BOOL RegCopyFile( LPCWSTR lpszFile );

Parameters

  • lpszFile
    [in] Specifies the name of the file to which the registry is saved.

Return Values

TRUE indicates success; FALSE indicates failure. To get extended error information, call GetLastError. GetLastError may fail, returning ERROR_NOT_SUPPORTED.

Remarks

The RegCopyFile API is only supported by the object store-based registry. To save and restore data in the hive-based registry, see RegSaveKey and RegReplaceKey.

The saved registry file can exist on any mounted file system that is accessible by the operating system. RegCopyFile always attempts to create the specified file and open it exclusively for read/write access. The data saved with this API is not compatible with the data save or restored through the OAL registry functions.

The data file saved by RegCopyFile cannot be imported directly by ReadRegistryFromOEM. Use RegCopyFile to save the data to be restored by RegCopyFile, or use WriteRegistryToOEM to save the data to be imported by ReadRegistryFromOEM.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Pwinreg.h.
Link Library: Coredll.lib.

See Also

RegRestoreFile | RegSaveKey | RegReplaceKey | ReadRegistryFromOEM | WriteRegistryToOEM | Persisting Data with the RAM-Based Registry

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.