Call ibec_reg_CloseKey to write the current key to the registry and close the key.
function ibec_reg_CloseKey(Registry : variant) : variant;