IOCTL_HAL_SAVE_HIVE_RAM_REGION

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

Parameters

  • dwIoControlCode
    [in] Set to this IOCTL, IOCTL_HAL_SAVE_HIVE_RAM_REGION.
  • lpInBuf
    [in] Pointer to the HiveRAMInfo structure that was passed to IOCTL_HAL_GET_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 will be blocked until the IOCTL call is complete. The hive-based registry does not provide any other 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 will 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 will 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 of the user data is all stored in the same hive RAM region as the system data, so a single save suffices to persist all of the registry data.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Pkfuncs.h.

See Also

Hive-Based Registry Stored in RAM | HiveRAMInfo | IOCTL_HAL_GET_HIVE_RAM_REGION | SetLastError

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.