OpenVMS Connectivity Developer Guide


Previous Contents Index


LIST KEY

Displays the attributes for the specified key.

Note

Symbolic links are not followed.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

LIST KEY key-name


Parameters

key-name

Specifies the name of the key to list.

Qualifiers

/FULL

Displays all available information---that is, information displayed by the /LAST_WRITE, /CACHE_ACTION, /INFORMATION, /LINK_PATH, and /CLASS_NAME qualifiers.

/CACHE_ACTION=value

Specifies the cache attribute for the subkey. The value can be WRITEBEHIND (default) or WRITETHRU (write to disk immediately).

/CLASS_NAME

Displays the class name of the subkey.

/INFORMATION

Displays the information (subkey number, value number, subkey name max, and so on) about the specified key.

/LAST_WRITE

Displays the time when the subkey was last updated.

/LINK_PATH

Displays the key path to which the subkey is linked.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

Examples


REG> LIST KEY/FULL HKEY_USERS\GUEST 
 
Key name:            HKEY_USERS\GUEST 
Security policy:     REG$K_POLICY_NT_40 
Volatile:            REG$K_NONE 
Cache:               REG$K_WRITEBEHIND 
Class:               System Authorization 
Link Type:           REG$K_NONE 
Last written:         7-AUG-1998 12:42:08.55 
 
Key information: 
  Number of subkeys:             2        Number of values:              0 
  Max size of subkey name:      40        Max size of class name:       40 
  Max size of value name:        0        Max size of value data:        0 
 
Subkey(s): 
 
    Key name:            QUOTAS 
    Security policy:     REG$K_POLICY_NT_40 
    Volatile:            REG$K_NONE 
    Cache:               REG$K_WRITEBEHIND 
    Class:               Disk quota 
    Link Type:           REG$K_NONE 
    Last written:         7-AUG-1998 12:41:19.21 
 
    Key information: 
      Number of subkeys:             0        Number of values:              0 
      Max size of subkey name:       0        Max size of class name:        0 
      Max size of value name:        0        Max size of value data:        0 
 
    Key name:            IDENTIFIER 
    Security policy:     REG$K_POLICY_NT_40 
    Volatile:            REG$K_NONE 
    Cache:               REG$K_WRITETHRU 
    Class:               Disk quota 
    Link Type:           REG$K_SYMBOLICLINK 
    Link Path:           HKEY_LOCAL_MACHINE\SOFTWARE\IDENTIFIER\GUEST 
    Last written:         7-AUG-1998 12:42:08.55 
 
    Key information: 
      Number of subkeys:             0        Number of values:              0 
      Max size of subkey name:       0        Max size of class name:        0 
      Max size of value name:        0        Max size of value data:        0 
 

The LIST KEY/FULL command in this example displays the GUEST key attributes as well as the name and attributes of the subkeys of GUEST .

Note

The Max sizes information shows the number of bytes, not characters. (Each character is 4 bytes long.)

LIST VALUE

Displays all values and value attributes of the specified key.

Note

Symbolic links are not followed.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

LIST VALUE key-name


Parameters

key-name

Specifies the name of the key to enumerate.

Qualifiers

/FULL

Displays all available information---that is, information displayed by the /TYPE_CODE, /LINK_PATH, /DATA_FLAGS, and /VALUE_DATA qualifiers.

/TYPE_CODE

Display the type code of the value.

/FLAGS

Displays an ASCII representation of the data flag of the value in hexadecimal format.

/LINK_PATH

Displays the key path to which the subkey is linked.

/DATA

Displays an ASCII representation of the value in hexadecimal format.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

Examples


REG> LIST VALUE/TYPE_CODE/DATA HKEY_LOCAL_MACHINE\SOFTWARE\FORTRAN 
 
   Key name:            HKEY_LOCAL_MACHINE\SOFTWARE\FORTRAN 
   Security policy:     REG$K_POLICY_NT_40 
   Volatile:            REG$K_NONE 
   Last written:        11-AUG-1998 16:27:55.81 
 
   Value(s): 
 
     Value name:   Version 
     Volatile:     REG$K_NONE 
     Type:         REG$K_SZ 
     Data:         5.3-50 
 
     Value name:   Date Installed 
     Volatile:     REG$K_NONE 
     Type:         REG$K_SZ 
     Data:         04-Jan-1998 

The LIST VALUE/TYPE_CODE/DATA command in this example displays the FORTRAN key and its value names, types, and data.


MODIFY KEY

Modifies the attributes of the specified key.

Caution

Modifying a key results in symbolic links not being followed. This is because the system modifies the key you specified, not the key pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY KEY key-name


Parameters

key-name

Specifies the name of the key to modify.

Qualifiers

/CACHE_ACTION=value

Specifies the cache attribute for the new key. The value can be WRITEBEHIND (default) or WRITETHRU (write to disk immediately).

/CLASS_NAME=string

Specifies the new class name of the key.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies that the key information must be written to disk immediately. /NOWRITEBEHIND specifies a write-through operation.

/NEW_NAME=new-key-name

Specifies the new name of the key.

/SECPOLICY=policy

Defines the security policy for the key. Currently the only valid policy is NT_40 .

/LINK=(TYPE=value, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:


/LINK=(TYPE=NONE,NAME="") 


Examples


REG> MODIFY KEY/CACHE_ACTION=WRITEBEHIND HKEY_USERS\GUEST

Modifies the cache attribute of the GUEST key.


MODIFY VALUE

Specifies the data component for the specified value. This command modifies an existing value.

Caution

Modifying a value results in symbolic links not being followed. This is because the system modifies the value you specified, not the value pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY VALUE /NAME=string key-name


Parameters

key-name

Specifies the name of the key for which to set the value.

Qualifiers

/FLAGS=flag

Specifies the data flags value. This is an application-dependent 64-bit flag specified as a decimal number or as a hexadecimal number preceded by 0x or %X.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies that the value information must be written to disk immediately. /NOWRITEBEHIND specifies a write-through operation.

/DATA=value

Specifies the data for the value. The value can be:

/NAME=string

Specifies the name of the value.

/TYPE_CODE=type

Specifies the type of the new value. The type value must be one of the following:

/LINK=(TYPE=value, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:


/LINK=(TYPE=NONE,NAME="") 


Examples


REG> MODIFY VALUE/DATA=COSMOS/TYPE=SZ/NAME=COMPUTERNAME HKEY_LOCAL_MACHINE\NODE

Creates COMPUTERNAME value for the key HKEY_LOCAL_MACHINE\NODE , and sets its type code to SZ and its data value to COSMOS .


MODIFY TREE

Modifies the information for the specified key and its subkeys.

Caution

Modifying a tree results in symbolic links not being followed. This is because the key and subkeys you specify are modified, not the key pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY TREE key-name


Parameters

key-name

Specifies the name of key to modify.

Qualifiers

/CACHE_ACTION=value

Specifies the cache attribute for the key and its subkeys. The value can be WRITEBEHIND (default) or WRITETHRU (write to disk immediately).

/CLASS_NAME=string

Specifies the new class name for the given key and all its subkeys.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies that the key information must be written to disk immediately. /NOWRITEBEHIND specifies a write-through operation.

/SECPOLICY=policy

Defines the security policy for the key. Currently the only valid policy is NT_40 .

Examples


REG> MODIFY TREE/CACHE_ACTION=WRITEBEHIND HKEY_USERS\GUEST

Modifies the cache attribute of the GUEST key and all its subkeys.


SEARCH KEY

Displays the path name of all the keys that match the specified key.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

SEARCH KEY key-search


Parameters

key-search

Specifies the key name for which to search.

Qualifiers

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

Examples


REG> SEARCH KEY HKEY_LOCAL_MACHINE\...\NODE
HARDWARE\CLUSTER\NODE 
HARDWARE\LOCAL\NODE  
NODE  

Displays all the key paths that match the HKEY_LOCAL_MACHINE\...\NODE selection. The ellipsis (...) wildcard specifies that there can be any number of subkeys between the HKEY_LOCAL_MACHINE entry point and the NODE subkey. Note that the search is not case sensitive.


SEARCH VALUE

Displays the path name of all the values that match the specified value name.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

SEARCH VALUE key-name value-name


Parameters

key-name

Specifies the name of the key path to search.

value-name

Specifies the value name for which to search.

Qualifiers

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

Examples


REG> SEARCH VALUE HKEY_LOCAL_MACHINE\... *AM%
HARDWARE\CLUSTER\Name  
HARDWARE\CLUSTER\NODE\Name  
HARDWARE\LOCAL\NODE\Name  
NODE\COMPUTERNAME  

Displays all the value names that match the HKEY_LOCAL_MACHINE\...\*am% selection. The ellipsis (...) wildcard specifies that there can be any number of subkeys between the HKEY_LOCAL_MACHINE entry point and the *am% value name. Note that the search is not case sensitive.


SHOW

Displays OpenVMS Registry server internal statistics and information.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

SHOW COUNTERS/FILE [name]

SHOW FILE [name]


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Displays counters for the specified file or for all files.

/PERFORMANCE

Displays performance counters.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

Examples


REG> SHOW COUNTERS/FILE

Displays monitoring information from the OpenVMS Registry server.


START MONITORING

Starts a monitoring component within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

START MONITORING/FILE [name]

START MONITORING/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Start gathering counters for the specified file or for all files.

/PERFORMANCE

Start gathering performance counters.

Examples


REG> START MONITORING/PERFORMANCE

Enables a monitoring component of the OpenVMS Registry.


STOP

Stops a monitoring component within the OpenVMS Registry server.

This command is used to stop a monitoring component within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

STOP MONITORING/FILE [name]

STOP MONITORING/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Stop gathering counters for the specified file or for all files.

/PERFORMANCE

Stop gathering performance counters.

Examples


REG> STOP MONITORING/PERFORMANCE

Disables a monitoring component of the OpenVMS Registry.


ZERO COUNTERS

Initializes counters within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

ZERO COUNTERS/FILE [name]

ZERO COUNTERS/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Initializes the file counters for the specified file or for all files.

/PERFORMANCE

Initializes all performance counters.

Examples


REG> ZERO COUNTERS/PERFORMANCE

Resets the performance counters.


Chapter 13
OpenVMS Registry System Services

This chapter lists and describes the OpenVMS Registry $REGISTRY and $REGISTRYW system services.


$REGISTRY and $REGISTRYW

The $REGISTRY and $REGISTRYW system services are the interface to the OpenVMS Registry database server. The $REGISTRY service allows you to query, update, and set keys, subkeys, and values in the OpenVMS Registry database.

The $REGISTRY service supports both asynchronous and synchronous operations. For asynchronous completion, use the Registry ($REGISTRY) system service. For synchronous completion, use the Registry and Wait ($REGISTRYW) system service. The $REGISTRYW system service is identical to the $REGISTRY system service, except that $REGISTRYW returns to the caller after the system completes the requested operation. For additional information about system service completion, see the Synchronize ($SYNCH) system service.

This system service is 64-bit compatible.


Format

SYS$REGISTRY [efn], func, 0, itmlst, [iosb or iosa_64], [astadr or astadr_64], [astprm or astprm_64]

SYS$REGISTRYW [efn], func, 0, itmlst, [iosb or iosa_64], [astadr or astadr_64], [astprm or astprm_64]


Arguments

efn


OpenVMS usage: ef_number
type: longword (unsigned)
access: read only
mechanism: by value

Number of the event flag to be used by $REGISTRY. If you do not specify the event flag, the system defaults to event flag 0. The event flag is initially cleared by $REGISTRY and then set when the operation completes.

func


OpenVMS usage: function_code
type: longword (unsigned)
access: read only
mechanism: by value

Function code specifying the action that $REGISTRY is to perform. The func argument is a longword containing this function code. The function code can contain function modifiers. For more information on function modifiers, see the Function Modifiers section in this chapter.

A single call to $REGISTRY can specify only one function code. All function codes require additional information to be passed in the call with the itmlst argument.

itmlst


OpenVMS usage: item_list3 or item_list_64b
type: longword (unsigned)
access: read only
mechanism: by reference

Item list supplying information that the system will use to perform the function specified by the func argument. The itmlst argument is the address of the item list. The item list consists of one or more sets of item descriptors. Each descriptor is either an item-list-3 or item-list-64b format.

Some function codes allow you specify multiple operations in a single call. In this case, you must place the REG$_SEPARATOR item code between each set of item codes. Each request, separated by a REG$_SEPARATOR item code, can contain the item codes in any order.

You can specify item codes as either input or output parameters. Input parameters modify functions, set context, or describe the information to be returned. Output parameters return the requested information. For item-list-3 lists, you must terminate the list with a longword of 0. For item-list-64b lists, you must terminate the list with a quadword of 0.

Figure 13-1 shows the structure of an item-list-3 descriptor.

Figure 13-1 Item-list-3 Structure


Figure 13-2 shows the structure of an item-list-64b descriptor.

Figure 13-2 Item-list-64b Structure


Table 13-1 defines the item descriptor fields.

Table 13-1 Item Descriptor Fields
Descriptor Field Definition
Buffer length A word that specifies the length of the buffer. The buffer either supplies information to be used by $REGISTRY, or receives information from $REGISTRY. The required length of the buffer varies, depending on the item code specified. Each item code description specifies the required length.
Item code A word containing a symbolic code that describes the type of information currently in the buffer or that is returned in the buffer. The buffer address field points to the location of the buffer.
Buffer address A longword that contains the address of the buffer that specifies or receives the information.
Return length address A longword that contains the address of a word that specifies the actual length in bytes of the information returned by $REGISTRY. The information resides in a buffer identified by the buffer address field. The field applies to output item list entries only, and must be 0 (zero) for input entries. If the return length address is 0, it is ignored.

iosb or iosa_64


OpenVMS usage: status_block
type: buffer
access: write only
mechanism: by reference

Status block to receive the final completion status and information of the $REGISTRY operation. If multiple operations are requested for a function code, the value returned in iosb is either SS$_NORMAL or SS$_REGERROR . A more specific return status for each operation is returned in the REG$_RETURNSTATUS item code (if specified). The iosb argument is the address of the $REGISTRY status block.

When $REGISTRY begins execution, it clears the quadword I/O status block if you specify the iosb argument.

Although the iosb argument is optional, Compaq strongly recommends that you specify it for the following reasons:

The condition value returned in R0 and the condition value returned in the I/O status block provide information about different aspects of the call to the $REGISTRY service. The condition value returned in R0 provides information about the success or failure of the service call itself; the condition value returned in the I/O status block provides information about the success or failure of the service operation.

To assess the success or failure of the call to $REGISTRY accurately, you must first check the condition value returned in R0. If R0 contains a successful value, you must check the condition value in the I/O status block.

Table 13-2 defines the item descriptor fields.

Table 13-2 Descriptor Fields
Descriptor Field Definition
Status A longword specifying the final status of the $REGISTRY service. If you request multiple operations for a function code, the system returns either SS$_NORMAL or SS$_REGERROR to iosb. This field is set to 0 (zero) when the operation begins.
Reserved A reserved longword.

astadr or astadr_64


OpenVMS usage: ast_procedure
type: procedure value
access: call without stack unwinding
mechanism: by reference

AST service routine to be executed when $REGISTRY completes. The astadr argument is the address of this routine. If you specify astadr, the AST routine executes at the same access mode as the caller of the $REGISTRY service.

If the $REGISTRY service is not called successfully (that is, if it returns an error immediately), the AST routine is not executed.

astprm or astprm_64


OpenVMS usage: user_arg
type: longword (unsigned)
access: read only
mechanism: by value

AST parameter to be passed to the AST service routine specified by the astadr argument. The astprm argument specifies this longword parameter.

Description

The $REGISTRY service provides the means to create, delete and modify registry keys, key values, and key attributes.

The $REGISTRY service uses process P1 space to store handles to keys. The $REGISTRY service must be called at IPL 0, and requires system dynamic memory to deliver AST requests.

Related Services

$REGISTRYW

Condition Values Returned

SS$_ACCVIO One of the arguments cannot be read/written
SS$_BADPARAM Function code or one of the item list code is invalid
SS$_EXASTLM Exceeded AST limit
SS$_EXBYTLM Exceeded byte count quota
SS$_ILLEFC Illegal event flag number
SS$_INSFARG Insufficient number of argument supplied
SS$_INSFMEM Insufficient dynamic memory
SS$_NORMAL Normal successful completion
SS$_TOO_MANY_ARGS Too many arguments
REG$_ACCESSDENIED Requested access to key is denied
REG$_BADFILEVER Bad file version number
REG$_BUFFEROVF Buffer overflow
REG$_CANTCLEANVOLSEG Cannot clean the registry volatile segments
REG$_CANTCONVCS Code set conversion error
REG$_CANTOPENOUTFILE Cannot open the specified output file
REG$_DBACCESS Cannot access registry database object
REG$_DBALREADYLOADED Database is already loaded
REG$_DBCREATE Cannot create registry database
REG$_DBCSMISMATCH Database checksum mismatch: Stored=!XL Calculated=!XL
REG$_DBFIND Cannot locate registry database
REG$_DBFULL Registry database is full
REG$_DBLOAD Cannot load registry database
REG$_DBNOTYETLOADED Database is not yet loaded
REG$_DBVERMISMATCH Database version mismatch: Current=V!UW.!UW Database=V!UW.!UW
REG$_DELROOTKEY Root key was deleted
REG$_DOUBLEDEALLOC Structure is already on the free list
REG$_DTMUTEXERROR DECthreads mutex lock/unlock error
REG$_DTMUTEXINIT DECthreads mutex init error !UL
REG$_DTMUTEXLOCK DECthreads mutex lock error !UL
REG$_DTMUTEXLOCKED DECthreads mutex is already held by another thread
REG$_DTMUTEXUNLOCK DECthreads mutex unlock error !UL
REG$_DTRWLOCKINIT DECthreads read/write lock init error !UL
REG$_DTRWLOCKLOCK DECthreads read/write lock error !UL
REG$_DTRWLOCKUNLOCK DECthreads read/write unlock error !UL
REG$_DUPLREQUEST Work-in-progress hash table insert found duplicate request
REG$_EXQUOTA Registry file quota or page file quota exceeded
REG$_FILECREATE Error creating !AZ!AZ
REG$_FILENAMEINVAL Invalid file name
REG$_FILEOPEN Error opening !AZ!AZ
REG$_FILEREADEOF Attempt to read past end of file; FTE !XL
REG$_FNAMMISMATCH Physical/logical file name mismatch; FTE=!AZ LTE=!AZ
REG$_FSOCORRUPT File was previously flagged as corrupt; FSO: !XL !XL
REG$_FSOFILEINDEX Invalid file index in FSO: !XL !XL
REG$_FSOOFFSET Invalid offset in FSO: !XL !XL
REG$_FSOSEGNUMBER Invalid segment number in FSO: !XL !XL
REG$_FSOSEGREADERR Error reading segment in FSO: !XL !XL
REG$_FTEALLOC Error allocating file table entry !XL for !AZ
REG$_FTEALREADYEXIST Cannot create file !AZ!AZ; file already exists
REG$_FTEALREADYOPEN File is already open
REG$_FTEDUPNAME Error allocating file table entry; duplicate file name
REG$_FTEINSUFFINFO Specified file table entry is not allocated
REG$_FTEINUSE Error allocating file table entry; entry in use
REG$_FTENOTEXIST Specified file table entry does not exist
REG$_FTENOTOPEN Specified file is not open
REG$_FTIMISMATCH Physical file index mismatch; LTE = !XL, FTE = !XL
REG$_HASLINK Key has a link to another key
REG$_HAVESUBKEYS Cannot delete a key with subkeys
REG$_INTERNERR Registry internal error
REG$_INVCACHEACTION Invalid cache action parameter
REG$_INVCREDENTIALS NT credentials are not valid
REG$_INVDATA Invalid data value
REG$_INVDATATYPE Invalid data type parameter
REG$_INVFUNCCODE Invalid function code
REG$_INVKEYFLAGS Invalid key flags
REG$_INVKEYID Key does not exist or invalid key ID was specified
REG$_INVKEYNAME Invalid key name
REG$_INVLINK Invalid link or link type
REG$_INVLINKPATH Invalid link path
REG$_INVLOG Invalid log file
REG$_INVLOGREC Invalid log record
REG$_INVPARAM Invalid parameter
REG$_INVPATH Invalid key path
REG$_INVSECDESCRIPTOR Invalid security descriptor
REG$_INVSECPOLICY Invalid security policy parameter
REG$_INVSEGNUM Invalid segment number
REG$_INVVOLROOTKEY Cannot create a new file with a volatile root key
REG$_IOREADERR Disk read error at block !UL for length !UL
REG$_IOWRITERR Disk write error at block !UL for length !UL
REG$_IPCCONACC IPC connect accept failure: !XL
REG$_IPCCONREJ IPC connect reject failure: !XL
REG$_IPCDCLAST IPC cannot declare AST for synch completion: !XL
REG$_IPCOPEASS IPC open association failure: !XL
REG$_IPLTOOHIGH Callers above IPL 0 cannot call this service
REG$_KEYCHANGED Key or subkey has changed
REG$_KEYEXIST Key already exists
REG$_KEYLOCKED Key locked by another thread
REG$_KEYNAMEEXIST Key name already exists
REG$_LOGFILETABFULL Logical file table is full
REG$_LTENOTEXIST Specified logical file table entry does not exist
REG$_MOREDATA Buffer provided is too small for requested data
REG$_NOBLOCKFOUND Registry database has no available blocks
REG$_NOKEY Specified key does not exist
REG$_NOMEMORY Insufficient memory
REG$_NOMOREITEMS No more items for specified key
REG$_NOMORESEG No more segments available
REG$_NOMORESUBSTRING No substring found
REG$_NOPATHFOUND Path not found
REG$_NORESPONSE OpenVMS Registry server not available
REG$_NOSUCHFILE No such file
REG$_NOTROOTKEY Invalid root key index
REG$_NOTSUPPORTED Function code, item code, or item value is not supported
REG$_NOVALUE Specified value does not exist
REG$_OBJWITHLINK Deleted key or value had link(s)pointing to it
REG$_REQRECEIVED Received request for key change notification
REG$_RESERVED Cannot delete or modify a reserved key or value
REG$_ROOTINSFILE Insufficient file list in root file
REG$_RUIDMISMATCH Root key UID mismatch; LTE = !@XQ !@XQ; Root key = !@XQ !@XQ
REG$_SECVIO Violates the security access method specified when this key was last opened
REG$_SEGREADERR Error reading segment !UL of file !AZ
REG$_STRINGTOOLONG Input string too long
REG$_STRINGTRUNC Output buffer is not large enough to contain the converted string
REG$_SVRVERMISMATCH Version mismatch: Server=V!UL.!UL Database=V!UL.!UL
REG$_SVRSHUTDOWN Server shutdown in progress
REG$_TOOMANYOPENKEY Number of opened keys exceeds the limit; close some opened key
REG$_UNKTHRREQ Unknown thread request code
REG$_VALUEEXIST Value already exists
REG$_VOLMISMATCH Cannot create nonvolatile subkey for a volatile key
Function Codes Table 13-3 provides a summary of valid function codes, a brief description of their function, and the OpenVMS Registry rights identifier required to perform the function. You can find a detailed description of each item code in the Item Codes section of this chapter.

The OpenVMS Registry identifier is required only if you do not provide a valid NT access token and you do not have the SYSPRV privilege. If you have a granted REG$UPDATE identifier, you can perform all the functions in Table 13-3.

Table 13-3 Valid Function Codes
Function Code Identifier Description
REG$FC_CLOSE_KEY REG$LOOKUP Closes an open key or subkey.
REG$FC_CREATE_KEY REG$UPDATE Creates (and opens) a subkey.
REG$FC_DELETE_KEY REG$UPDATE Removes a subkey from a key.
REG$FC_DELETE_VALUE REG$UPDATE Removes a value from a key.
REG$FC_ENUM_KEY REG$LOOKUP Lists (enumerates) the subkeys of a key.
REG$FC_ENUM_VALUE REG$LOOKUP Lists (enumerates) the values of a key.
REG$FC_FLUSH_KEY REG$UPDATE Ensures that all information for the key is backed to disk.
REG$FC_MODIFY_KEY REG$UPDATE Modifies a key.
REG$FC_MODIFY_TREE_KEY REG$UPDATE Modifies a key and all its subkeys.
REG$FC_NOTIFY_CHANGE_KEY_VALUE REG$UPDATE Notifies when a key or value has changed.
REG$FC_OPEN_KEY REG$LOOKUP Opens a key or subkey.
REG$FC_QUERY_KEY REG$LOOKUP Fetches information about a key.
REG$FC_QUERY_VALUE REG$LOOKUP Fetches information about a value.
REG$FC_SEARCH_TREE_DATA REG$LOOKUP Searches the value data of key and its subkeys.
REG$FC_SEARCH_TREE_KEY REG$LOOKUP Searches the names of a key and its subkeys.
REG$FC_SEARCH_TREE_VALUE REG$LOOKUP Searches the values of a key and its subkeys.
REG$FC_SET_VALUE REG$UPDATE Changes the data associated with a value name.

REG$FC_CLOSE_KEY

This request releases the open resources of the specified key. If REG$_KEYID indicates a predefined key, the system ignores the action and returns success.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_RETURNSTATUS No Output

REG$FC_CREATE_KEY

If the key does not exist, this request creates a new subkey under the key specified by REG$_KEYID . If the key does exist, the system does not modify it.

If you specify the REG$_KEYRESULT item code, the system opens the specified subkey.

The system returns the result in the REG$_DISPOSITION item code buffer.

Using this function code, you can group multiple requests into a single call to the $REGISTRY service. To use the multiple-request feature, you must use the REG$_SEPARATOR item code to indicate the end of the set of item codes for the current request and that there is another request to process.

To set a value for a key, call the $REGISTRY service with the REG$FC_SET_VALUE function code.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_CACHEACTION No Input
REG$_CLASSNAME No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_DISPOSITION No Output
REG$_KEYFLAGS No Input
REG$_KEYID Yes Input
REG$_KEYRESULT No Output
REG$_LINKPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Input
REG$_RETURNSTATUS No Output
REG$_SECACCESS No Input
REG$_SECURITYPOLICY No Input
REG$_SEPARATOR No n/a
REG$_SUBKEYNAME Yes Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_VOLATILE No Input

If you specify the REG$_LINKPATH item code, it must point to a key path already defined in the OpenVMS Registry; otherwise the system returns the REG$_INVALIDPATH error.

Note

If you do not specify the REG$_CACHEACTION item code, the new key is created with the same cache action value as the parent key. The same rule applies to the REG$_VOLATILE and REG$_SECURITYPOLICY item codes.

REG$FC_DELETE_KEY

This request removes the specified subkey and its values from the OpenVMS Registry database. If the specified key has subkeys, the key is not deleted. You must delete the subkeys first.

Using this function code, you can group multiple requests into a single call to the $REGISTRY service. If you use this multiple-request feature, use the REG$_SEPARATOR item code to indicate the end of the set of item codes for the current request and that there is another request to process.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output
REG$_SEPARATOR No n/a
REG$_SUBKEYNAME Yes Input (Pointer to Unicode string. Unicode character is 4 bytes long.)

REG$FC_DELETE_VALUE

This request deletes the specified value from the key.

Using this function code, you can group multiple requests into a single call to the $REGISTRY service. If you use this multiple-request feature, use the REG$_SEPARATOR item code to indicate the end of the set of item codes for the current request and that there is another request to process.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output
REG$_SEPARATOR No n/a
REG$_VALUENAME Yes Input

REG$FC_ENUM_KEY

This request retrieves information about one subkey of the key. You identify the subkey in the REG$_SUBKEYINDEX item code. To enumerate all the key's subkeys, the application must call the $REGISTRY service repeatedly using the REG$FC_ENUM_KEY function code. Begin with a REG$_SUBKEYINDEX of zero, then increment the count until the request returns a REG$_NOMOREITEMS error.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_CACHEACTION No Output
REG$_CLASSNAME No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYFLAGS No Output
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LASTWRITE No Output
REG$_LINKCOUNT No Output
REG$_LINKPATH No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Output
REG$_RETURNSTATUS No Output
REG$_SECURITYPOLICY No Output
REG$_SUBKEYINDEX Yes Input
REG$_SUBKEYNAME No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_VOLATILE No Output

REG$FC_ENUM_VALUE

This request retrieves information about a value of the specified key identifier. The value to retrieve is identified in the REG$_VALUEINDEX item code.

To enumerate all a key's values, the application must call the $REGISTRY service repeatedly using the REG$FC_ENUM_VALUE function code. Begin with a REG$_VALUEINDEX of zero, then increment the count until the request returns a REG$_NOMOREITEMS error.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_DATAFLAGS No Output
REG$_DATATYPE No Output
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output
REG$_VALUEDATA No Output
REG$_VALUEINDEX Yes Input
REG$_VALUENAME No Output
REG$_VOLATILE No Output

REG$FC_FLUSH_KEY

This request writes all the information about a specified key to disk. This request returns only after the operation is complete and all attributes of the key have been written to the OpenVMS Registry database.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output

REG$FC_MODIFY_KEY

This request modifies a specified key's attributes.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_CACHEACTION No Input
REG$_CLASSNAME No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYFLAGS No Input
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Input
REG$_NEWNAME No Input
REG$_RETURNSTATUS No Output
REG$_SECURITYPOLICY No Input

To remove the link from the specified key, enter a REG$_LINKPATH item code with an address of zero. You cannot add a link to a key that has either values or subkeys (or both).

REG$FC_MODIFY_TREE_KEY

This request modifies a specified key and all its subkey attributes. No link will be followed or modified.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_CACHEACTION No Input
REG$_CLASSNAME No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output
REG$_SECURITYPOLICY No Input

REG$FC_NOTIFY_CHANGE_KEY_VALUE

This request notifies the calling process when a specified key or any of its subkeys has changed. That is, the requested function waits for the specified condition before returning.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_FLAGSUBKEY Yes Input
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_NOTIFYFILTER Yes Input
REG$_RETURNSTATUS No Output

REG$FC_OPEN_KEY

This request opens the specified key. If you do not specify a subkey, the system opens the key specified in REG$_KEYID . If REG$_KEYID specifies a key other than a predefined key, the system opens the key again (duplicates the key).

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_KEYRESULT Yes Output
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_RETURNSTATUS No Output
REG$_SECACCESS Yes Input
REG$_SUBKEYNAME No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)

REG$FC_QUERY_KEY

This request retrieves attributes about a specified key.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_CACHEACTION No Output
REG$_CLASSNAME No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_CLASSNAMEMAX No Output
REG$_KEYFLAGS No Output
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LASTWRITE No Output
REG$_LINKCOUNT No Output
REG$_LINKPATH No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Output
REG$_RETURNSTATUS No Output
REG$_SECURITYPOLICY No Output
REG$_SUBKEYNAMEMAX No Output
REG$_SUBKEYSNUMBER Yes Output
REG$_VALUEDATAMAX No Output
REG$_VALUENAMEMAX No Output
REG$_VALUENUMBER No Output
REG$_VOLATILE No Output

REG$FC_QUERY_VALUE

This request retrieves the type, data flags, and data for the specified value name.

Using this function code, you can group multiple requests into a single call to the $REGISTRY service. If you use this multiple-request feature, use the REG$_SEPARATOR item code to indicate the end of the set of item codes for the current request and that there is another request to process.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_DATAFLAGS No Output
REG$_DATATYPE No Output
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYID Yes Input
REG$_LINKCOUNT No Output
REG$_LINKPATH No Output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Output
REG$_RETURNSTATUS No Output
REG$_SEPARATOR No n/a
REG$_VALUEDATA No Output
REG$_VALUENAME Yes Input
REG$_VOLATILE No Output

REG$FC_SEARCH_TREE_DATA

This request scans a specified key and all its descendants for a match with a specified set of data information. The set of data information can be either the REG$_DATAFLAGS item code, or the pair REG$_DATATYPE and REG$_VALUEDATA item codes, or all three item codes.

The REG$_FLAGOPCODE item code specifies how the REG$_DATAFLAGS item code should be matched against the database. (See the item codes description for more information about the REG$_FLAGOPCODE item code.)

Every time the system finds a match, it appends the path name relative to the specified key to the REG$_PATHBUFFER item code. A Unicode null character is used to separate the value path names.

If the buffer supplied by the application is not big enough to hold all the value path names found, the system returns the SS$_BUFFEROVF error message in the iosb argument, and the length required to complete the operation successfully is returned in the REG$_REQLENGTH item (if specified).

Use the ellipsis (...) wildcard to match zero or more subkeys in the REG$_KEYPATH item code. (For example, Hardware\...\disks finds all the paths that start with the Hardware subkey and end with the disk subkey, with zero or more subkeys in between.) Use the asterisk (*) wildcard to match an entire subkey or a portion of a subkey in the REG$_KEYPATH item code. Use the percent (%) wildcard to match one character in a key name in the REG$_KEYPATH item code.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_DATAFLAGS No Input
REG$_DATATYPE No Input
REG$_FLAGOPCODE No Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYID Yes Input
REG$_PATHBUFFER Yes Output
REG$_REQLENGTH No Output
REG$_RETURNSTATUS No Output
REG$_VALUEDATA No Input

REG$FC_SEARCH_TREE_KEY

This request scans a specified key and all its descendants for a specified key path.

For this function code, a valid key path is a Unicode string that can include the ellipsis (...), asterisk (*), or percent (%) wildcard character, but that cannot start with the backslash character (\).

Use the ellipsis (...) wildcard to match zero or more subkeys in the REG$_KEYPATH item code. (For example, Hardware\...\disks finds all the paths that start with the Hardware subkey and end with the disk subkey, with zero or more subkeys in between.) Use the asterisk (*) wildcard to match an entire subkey or a portion of a subkey in the REG$_KEYPATH item code. Use the percent (%) wildcard to match one character in a key name in the REG$_KEYPATH item code.

An example of a valid key path is as follows:


  hardware\system\*\disk%% 

Every time the system finds a match, the system appends its path name relative to the specified key identifier to the REG$_PATHBUFFER item code. A Unicode null character (4 bytes) separates the subkey path names.

If the buffer supplied by the application is not big enough to contain all the subkey path names found, the system returns the SS$_BUFFEROVF error message in the iosb argument, and the system returns the required length to complete the operation successfully in the REG$_REQLENGTH item (if specified).

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_PATHBUFFER Yes Output
REG$_REQLENGTH No Output
REG$_RETURNSTATUS No Output

REG$FC_SEARCH_TREE_VALUE

This request scans a specified key and all its descendants for a specified value name.

For this function code a valid key name is a Unicode string that can include the ellipsis (...), asterisk (*), or percent (%) wildcard character, but cannot start with the backslash character (\).

Use the ellipsis (...) wildcard to match zero or more subkeys in the REG$_KEYPATH item code. (For example, Hardware\...\disks finds all the paths that start with the Hardware subkey and end with the disk subkey, with zero or more subkeys in between.) Use the asterisk (*) wildcard to match an entire subkey or a portion of a subkey in the REG$_KEYPATH item code. Use the percent (%) wildcard to match one character in a key name in the REG$_KEYPATH item code.

An example of a valid key path is as follows:


  hardware\system\... 

For this function code, a valid name is a Unicode string that can include the asterisk (*) and percent (%) wildcard characters.

Every time the system finds a match, the system appends its path name relative to the specified key identifier to the REG$_PATHBUFFER item code. A Unicode null character (4 bytes) separates the subkey path names.

If the buffer supplied by the application is not big enough to contain all the subkey path names found, the system returns the SS$_BUFFEROVF error message in the iosb argument, and the system returns the required length to complete the operation successfully in the REG$_REQLENGTH item (if specified).

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYID Yes Input
REG$_PATHBUFFER Yes Output
REG$_REQLENGTH No Output
REG$_RETURNSTATUS No Output
REG$_VALUENAME Yes Input

REG$FC_SET_VALUE

This request sets value and type information for a specified key.

Using this function code, you can group multiple requests into a single call to the $REGISTRY service. If you use this multiple-request feature, use the REG$_SEPARATOR item code to indicate the end of the set of item codes for the current request and that there is another request to process.

When a value is set to a link, the system validates the link unless you specify the REG$M_IGNORE_LINKS function code modifier.

Specify the item codes as follows:
Item Code Required Parameter Type
REG$_DATAFLAGS No Input
REG$_DATATYPE No Input
REG$_KEYID Yes Input
REG$_KEYPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKPATH No Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE No Input
REG$_RETURNSTATUS No Output
REG$_SEPARATOR No n/a
REG$_VALUEDATA No Input
REG$_VALUENAME No Input

Item Codes Table 13-4 provides a summary of item codes that are valid as an item descriptor in the itmlst argument. The table lists the item codes, input/output usage, and data types. Complete descriptions of each item code are provided in the sections that follow this table.

Table 13-4 Item Code Summary
Item Code Input/Output Data Type
REG$_CACHEACTION Input, output Longword
REG$_CLASSNAME Input, output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_CLASSNAMEMAX Output Longword
REG$_DATAFLAGS Input, output Quadword
REG$_DATATYPE Input, output Longword
REG$_DISPOSITION Output Longword
REG$_FILELOAD Input Unicode string
REG$_FLAGOPCODE Input Longword
REG$_FLAGSUBKEY Input Longword
REG$_KEYPATH Input (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_KEYFLAGS Input, output Longword
REG$_KEYID Input, output Longword
REG$_KEYRESULT Output Longword
REG$_LASTWRITE Output Quadword
REG$_LINKCOUNT Output Longword
REG$_LINKPATH Input, output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_LINKTYPE Input, output Longword
REG$_NEWNAME Input Unicode string
REG$_NOTIFYFILTER Input Longword
REG$_PATHBUFFER Output Buffer
REG$_REQLENGTH Output Longword
REG$_RETURNSTATUS Output Longword
REG$_SECACCESS Input Longword
REG$_SECURITYPOLICY Input, output Longword
REG$_SEPARATOR n/a None
REG$_SUBKEYINDEX Input Longword
REG$_SUBKEYNAME Input, output (Pointer to Unicode string. Unicode character is 4 bytes long.)
REG$_SUBKEYNAMEMAX Output Longword
REG$_SUBKEYSNUMBER Output Longword
REG$_VALUEDATA Input, output Buffer
REG$_VALUEDATAMAX Output Longword
REG$_VALUEINDEX Input Longword
REG$_VALUENAME Input, output Unicode string
REG$_VALUENAMEMAX Output Longword
REG$_VALUENUMBER Output Longword
REG$_VOLATILE Input, output Longword

REG$_CACHEACTION

The REG$_CACHEACTION item code is an input item code. It is a longword flag that specifies whether the information on a specified object should be written to disk immediately. It takes one of the following values:
Cache Value Description
REG$K_WRITEBEHIND Write information about the specified object written to disk at a later time (default).
REG$K_WRITETHRU Write information about the specified object to disk immediately.

Note

If you do not specify this item code, the value or key inherits its value from the parent object. By default, the entry points ( REG$_HKEY_CLASSES_ROOT , REG$_HKEY_LOCAL_MACHINE , and REG$_HKEY_USERS ) are set with a value equal to that of REG$K_WRITEBEHIND .

REG$_CLASSNAME

The REG$_CLASSNAME item code is, depending on the function code, either an input or output item code. The class name is an information field for a key. The type of an object is an example of a class name. It can be composed of any string of Unicode characters. A Unicode character is 4 bytes long.

REG$_CLASSNAMEMAX

The REG$_CLASSNAMEMAX item code is an output item code. It receives the length, in bytes, of the longest string specifying a subkey class name.

REG$_DATAFLAGS

Depending on the function code, the REG$_DATAFLAGS item code is either an input or output item code. It is a 64-bit application-dependent value data flag.

REG$_DATATYPE

Depending on the function code, the REG$_DATATYPE item code is either an input or output item code. It is a longword that either specifies the type of information to be stored as a value data or receives the type of information of a specified value data component. It takes one of the following values:
Type code Description
REG$K_BINARY Binary data
REG$K_DWORD A 32-bit number
REG$K_EXPAND_SZ A string of Unicode characters
REG$K_MULTI_SZ A concatenated array of REG$K_SZ strings
REG$K_NONE No defined value type (default)
REG$K_QWORD A 64-bit number
REG$K_SZ A null-terminated Unicode string

The difference between REG$K_EXPAND_SZ and REG$K_SZ

A string is a set of characters usually in human-readable form. Many value entries in the OpenVMS Registry are written using a string ( REG_SZ ) or an expandable string ( REG_EXPAND_SZ ) format. An expandable string is usually human-readable text, but it can also include a variable that will be replaced when the string is called by an application.

For example, on a Windows NT system, in the value entry %SystemRoot%\System32\Bootok.exe , %SystemRoot% is the expandable portion of the variable. This part is replaced with the actual location of the directory that contains the Windows NT system files.

REG$_DISPOSITION

The REG$_DISPOSITION item code is an output item code. It is a longword and takes one of the following values:
Disposition value Description
REG$K_CREATENEWKEY The key did not exist and was created.
REG$K_OPENEXISTINGKEY The key existed and was opened.

REG$_FLAGOPCODE

The REG$_FLAGOPCODE item code is an input item code. It is a longword flag that indicates how the REG$_DATAFLAGS input item code should be matched against the data flags field in the OpenVMS Registry database. It takes one of the following values:
Operator code options Description
REG$K_ANY The data field in the OpenVMS Registry database must contain at least one of the flags in the REG$_DATAFLAGS input item code.
REG$K_EXACTMATCH The REG$_DATAFLAGS input item code must match exactly the data flags field in the OpenVMS Registry database.
REG$K_EXCLUDE The data flags field in the OpenVMS Registry database must not contain the flags in the REG$_DATAFLAGS input item code.
REG$K_INCLUDE The data flags field in the OpenVMS Registry database must contain, at a minimum, the flags in the REG$_DATAFLAGS input item code.
REG$K_NOTANY The data field in the OpenVMS Registry database must not contain any of the flags in the REG$_DATAFLAGS input item code.

REG$_FLAGSUBKEY

The REG$_FLAGSUBKEY item code is an input item code. It is a longword Boolean field that indicates the following:

REG$_KEYID

The REG$_KEYID item code is an input item code. It is a longword that contains the key identifier.

REG$_KEYRESULT

The REG$_KEYRESULT item code is an output item code. It is a longword that receives a key identifier. The key identifier can be passed to other Registry calls using the REG$_KEYID item code.

REG$_KEYPATH

The REG$_KEYPATH item code is an input item code. It is a string of Unicode characters that specifies a key path. A Unicode character is 4 bytes long.

REG$_LASTWRITE

The REG$_LASTWRITE item code is an output item code. It is a quadword representation of absolute time that receives the time a specified key was last written to (including changes to its values).

REG$_LINKCOUNT

The REG$_LINKCOUNT item code is an output item code. It is longword count of the number of symbolic links that refer to the item.

REG$_LINKPATH

The REG$_LINKPATH item code is, depending on the function code, either an input or an output item code. It is a string of Unicode characters that specifies the key path to which a specified key is linked. A Unicode character is 4 bytes long.

REG$_LINKTYPE

The REG$_LINKTYPE item code is, depending on the function code, either an input or an output item code. It is longword type that indicates the link type.
Link Type Description
REG$K_NONE No link (default)
REG$K_SYMBOLICLINK Symbolic (logical) link

REG$_NEWNAME

The REG$_NEWNAME item code is a string of Unicode characters that specifies the new name of the key.

REG$_NOTIFYFILTER

The REG$_NOTIFYFILTER item code is an input item code. It is a longword mask that specifies which changes to the specified key and its subkeys and values to report. It takes any combination of the following values:
Value Description
REG$M_CHANGEATTRIBUTES An attribute change of the specified key or its subkeys.
REG$M_CHANGELASTSET Changes to the last write time of the specified key or its subkeys.
REG$M_CHANGENAME A key name change, including creation and deletion, of the specified key or its subkeys.

Note

The system report changes to subkeys of the specified key only if the REG$_FLAGSUBKEY item code is set to 1.

REG$_PATHBUFFER

The REG$_PATHBUFFER item code is an output item code. It is a buffer that receives a set of either key paths or value paths, separated by a null Unicode character (4 bytes long). (The third longword of the item descriptor contains the number of bytes written to the buffer.)

REG$_REQLENGTH

The REG$_REQLENGTH item code is an output item code. It is a longword that receives the required buffer size (in bytes) to complete the operation successfully.

REG$_RETURNSTATUS

The REG$_RETURNSTATUS item code is an output item code. It is a longword that receives the final completion status for a specified operation. For more information, see the Condition Values Returned section of this chapter.

REG$_SECACCESS

The REG$_SECACCESS item code is an input item code. It is a longword mask that specifies the desired security access for the new key. It takes any combination of the following values:
Security access mask Description
REG$M_ALLACCESS A combination of the following access values:
REG$K_CREATELINK
REG$K_CREATESUBKEY
REG$K_ENUMSUBKEYS
REG$K_NOTIFY
REG$K_QUERYVALUE
REG$K_SETVALUE
REG$M_CREATELINK Allows creation of a symbolic link.
REG$M_CREATESUBKEY Allows creation of subkeys.
REG$M_ENUMSUBKEYS Allows enumeration of subkeys.
REG$M_EXECUTE Allows read access.
REG$M_NOTIFY Allows change notification.
REG$M_QUERYVALUE Allows queries of subkey data.
REG$M_READ A combination of the following access values:
REG$K_ENUMSUBKEYS
REG$K_QUERYVALUE
REG$K_NOTIFY
REG$M_SETVALUE Allows setting of values and data.
REG$M_WRITE A combination of the following access values:
REG$K_CREATESUBKEY
REG$K_SETVALUE

REG$_SECURITYPOLICY

The REG$_SECURITYPOLICY item code is an input item code. It is a longword that specifies the security policy to enforce for the key. It takes the following value:
Policy Setting Description
REG$K_POLICY_NT_40 Access is required to the first key and the requested key (default).

REG$_SEPARATOR

The REG$_SEPARATOR item code is an empty item code that provides a separator between sets of item codes.


Previous Next Contents Index