次の方法で共有


IOCTL_HAL_SAVE_HIVE_RAM_REGION (Windows Embedded CE 6.0)

1/5/2010

Important

This feature is deprecated and is not supported in Windows Embedded CE 6.0.

This IOCTL is called by Filesys.exe when an application calls RegSaveKey if the registry hive is stored in a region of RAM specified by the OEM.

Parameters

  • dwIoControlCode
    [in] Set to this IOCTL, IOCTL_HAL_SAVE_HIVE_RAM_REGION.
  • nInBufSize
    [in] Set to sizeof(HiveRAMInfo), the size of lpInBuf.
  • lpOutBuf
    [out] Ignored; set to NULL.
  • nOutBuSizef
    [out] Ignored; set to 0.
  • lpBytesReturned
    [out] Ignored; set to NULL.

Return Values

Returns TRUE if the IOCTL was successfully processed. Otherwise, returns FALSE.

Remarks

This IOCTL gives the OEM a chance to copy the registry RAM region to persistent storage while the registry is in a steady state. Applications that attempt to read from, or modify, the registry during the RegSaveKey call are blocked until the IOCTL call is complete. The hive-based registry does not provide another mechanism for backing up or restoring the hive RAM region. This IOCTL is only called during RegSaveKey if the hive-based registry is in use and if the OEM has implemented IOCTL_HAL_GET_HIVE_RAM_REGION.

If the IOCTL does not exist, or if the call fails, RegSaveKey does not overwrite the error set by the IOCTL using SetLastError. The IOCTL is not called if RegSaveKey is called with HKEY_CURRENT_USER or with any subkey of HKEY_CURRENT_USER. It is called in all other cases.

Applications typically call RegSaveKey twice, once to save the system hive and once to save the user hive. Because the IOCTL is only called when an application saves the system hive, the OEM does not save the hive RAM region twice. All user data is stored in the same hive RAM region as system data, so a single save suffices to persist all registry data.

Requirements

Header pkfuncs.h
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

Filesys.exe IOCTLs
IOCTL_HAL_GET_HIVE_RAM_REGION

Other Resources

Hive-Based Registry Stored in RAM
HiveRAMInfo
SetLastError