3.1.1.9 Handles
Handles (HKEY) are used by the client and the server to refer to individual keys within the registry hierarchy in the HANDLETABLE. The handle value uniquely refers to a single key within the registry hierarchy on a single registry server instance. The path of the registry key in the registry hierarchy is stored in the PATH element of the HANDLETABLE.
The server is responsible for tracking the value of a handle and the corresponding key (FQN) in the registry hierarchy. A handle MUST be created (opened) on the server for each successful client access to a registry key, and the handle value MUST be unique from all other handles currently tracked on the server. The handle MUST be destroyed (closed) after the client has closed access to the registry key using the BaseRegCloseKey method or the server shuts down.
On Remote Registry servers that support the 64-bit key namespace (section 3.1.1.4), the UPDATECOPY element of the HANDLETABLE is used to track whether changes in either the 32-bit or the 64-bit key namespace are copied to the 64-bit or 32-bit key namespace, respectively. For the specific registry paths for which updates are required to be copied across namespaces (section 3.1.1.4), the server sets the UPDATECOPY element in the HANDLETABLE to TRUE any time the key or values referred to by the HANDLE element are updated. When the HANDLE is closed, the server checks the value of UPDATECOPY. If UPDATECOPY is set to TRUE, the server copies the updates to the key or values across namespaces.