ORCloseHive function

Closes the specified offline registry hive and frees memory allocated for the hive.

Syntax

DWORD ORCloseHive(
  _In_ ORHKEY Handle
);

Parameters

Handle [in]

A handle to the root key of the offline registry hive to be closed.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.

Remarks

The ORCloseHive function frees all memory allocated by the offline registry functions on behalf of the specified hive.

To preserve changes to the hive, call the ORSaveHive function before calling ORCloseHive.

Requirements

Requirement Value
Redistributable
Windows Offline Registry library version 1.0 or later
Header
Offreg.h
DLL
Offreg.dll

See also

OROpenHive

ORSaveHive