All Manuals > LispWorks User Guide and Reference Manual > 51 The Windows registry API

NextPrevUpTopContentsIndex

open-registry-key

Function
Summary

Opens a registry key.

Package

win32

Signature

open-registry-key subkey &key root access errorp => handle, error-code

Arguments

subkey

A string specifying the name of the key.

root

A keyword or handle.

access

An integer or keyword.

errorp

A generalized boolean.

Values

handle

The handle of the key.

error-code

An integer error code or nil.

Description

The function open-registry-key opens a registry key named subkey under the parent key root.

subkey and root are interpreted as described for create-registry-key. If subkey is an empty string, then the root key is returned. The default value of root is :user.

If access is :read, then it opens the key with KEY_READ permissions. If access is :write, then it opens the key with KEY_WRITE permissions. If access is an integer, then the value access specifies the desired Win32 access rights. If access is omitted and root is :user, then open-registry-key uses KEY_ALL_ACCESS. Otherwise it uses KEY_READ.

The return value on success is the handle of the opened key.

If an error occurs and errorp is true, then an error is signaled. Otherwise, the return values are nil and the Windows error-code. The default value of errorp is t.

See also

create-registry-key


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex