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

NextPrevUpTopContentsIndex

create-registry-key

Function
Summary

Creates a new registry key.

Package

win32

Signature

create-registry-key subkey &key class root access volatile errorp => handle, disposition, error-code

Arguments

subkey

A string specifying the name of the key.

class

A string.

root

A keyword or handle.

access

A keyword or an integer.

volatile

A generalized boolean.

errorp

A generalized boolean.

Values

handle

The handle of the new key.

disposition

A keyword, either :created-new-key or :opened-existing-key.

error-code

An integer error code or nil.

Description

The function create-registry-key creates a new registry key named subkey under the parent key root. If the key already exists, it is opened and returned.

subkey is a string specifying a path from a root. Each component of the path is separated by a backslash. Use "" to denote the null path (that is, the root).

class can be used to specify the class of the key if it is created.

root should be a handle to an open registry key (for example a key returned by create-registry-key or open-registry-key or one of the keywords :classes, :user, :local-machine and :users which represent the standard top level roots in the registry. The default value of root is :user.

If access is :read, then the key is created with KEY_READ permissions. If access is :write, then the key is created with KEY_WRITE permissions. If access is an integer, then the value access specifies the desired Win32 access rights. The default value of access is :read.

The return values on success are the handle of the new key and a keyword :created-new-key or :opened-existing-key indicating whether a new key was created or opened.

When volatile is true, the key is created with REG_OPTION_VOLATILE. volatile defaurs to false.

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

See also

delete-registry-key
open-registry-key


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex