Share via


RegCopyFile (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

BOOL RegCopyFile(
  LPCWSTR lpszFile
);

Parameters

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

Return Value

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

Remarks

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

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

Requirements

Header pwinreg.h
Library coredll.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

Registry Functions
RegRestoreFile
RegSaveKey
RegReplaceKey

Concepts

Persisting Data with the RAM-Based Registry

Other Resources

ReadRegistryFromOEM
WriteRegistryToOEM