My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
registry.h File Reference
#include <stddef.h>
#include <rtl/ustring.h>
#include <registry/regtype.h>
#include <registry/regdllapi.h>

Go to the source code of this file.

Functions

REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_createKey (RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phNewKey)
 This function creates the specified key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_openKey (RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phOpenKey)
 This function opens the specified key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_openSubKeys (RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle **pphSubKeys, sal_uInt32 *pnSubKeys)
 This function opens all subkeys of the specified key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_closeSubKeys (RegKeyHandle *phSubKeys, sal_uInt32 nSubKeys)
 This function closes all subkeys specified in the array.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_deleteKey (RegKeyHandle hKey, rtl_uString *keyName)
 This function deletes the specified key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_closeKey (RegKeyHandle hKey)
 This function closes the specified key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getKeyName (RegKeyHandle hKey, rtl_uString **pKeyName)
 This function returns the name of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_setValue (RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
 This function sets a value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_setLongListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 *pValueList, sal_uInt32 len)
 This function sets an long list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_setStringListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Char **pValueList, sal_uInt32 len)
 This function sets an ascii list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_setUnicodeListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode **pValueList, sal_uInt32 len)
 This function sets an unicode string list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getValueInfo (RegKeyHandle hKey, rtl_uString *keyName, RegValueType *pValueType, sal_uInt32 *pValueSize)
 This function gets info about type and size of a key value.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getValue (RegKeyHandle hKey, rtl_uString *keyName, RegValue pData)
 This function gets the value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getLongListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 **pValueList, sal_uInt32 *pLen)
 This function gets the long list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getStringListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Char ***pValueList, sal_uInt32 *pLen)
 This function gets the string list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getUnicodeListValue (RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode ***pValueList, sal_uInt32 *pLen)
 This function gets the unicode list value of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_freeValueList (RegValueType valueType, RegValue pValueList, sal_uInt32 len)
 This function frees the memory of a value list.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getKeyType (RegKeyHandle hKey, rtl_uString *keyName, RegKeyType *pKeyType)
 This function returns the type of a key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getResolvedKeyName (RegKeyHandle hKey, rtl_uString *keyName, sal_Bool firstLinkOnly, rtl_uString **pResolvedName)
 This function resolves a keyname.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_loadKey (RegKeyHandle hKey, rtl_uString *keyName, rtl_uString *regFileName)
 This function loads registry information from a file and save it under the specified keyName.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_saveKey (RegKeyHandle hKey, rtl_uString *keyName, rtl_uString *regFileName)
 This function saves the registry information under a specified key and all of its subkeys and save it in a registry file.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_mergeKey (RegKeyHandle hKey, rtl_uString *keyName, rtl_uString *regFileName, sal_Bool bWarnings, sal_Bool bReport)
 This function merges the registry information from a specified source with the information of the currently open registry.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_createRegistry (rtl_uString *registryName, RegHandle *phRegistry)
 This function creates a new registry with the specified name and creates a root key.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_openRootKey (RegHandle hRegistry, RegKeyHandle *phRootKey)
 This function opens the root key of a registry.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_getName (RegHandle hRegistry, rtl_uString **pName)
 This function returns the name of a registry.
REG_DLLPUBLIC sal_Bool
REGISTRY_CALLTYPE 
reg_isReadOnly (RegHandle hReg)
 This function returns the access mode of the registry.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_openRegistry (rtl_uString *registryName, RegHandle *phRegistry, RegAccessMode accessMode)
 This function opens a registry with the specified name.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_closeRegistry (RegHandle hRegistry)
 This function closes a registry.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_destroyRegistry (RegHandle hRegistry, rtl_uString *registryName)
 This function destroys a registry.
REG_DLLPUBLIC RegError
REGISTRY_CALLTYPE 
reg_dumpRegistry (RegKeyHandle hKey)
 This function reports the complete registry information of a key and all of its subkeys.

Function Documentation

This function closes the specified key.

Parameters
hKeyidentifies a currently open key which will be closed by this function. The memory of the variable specifying the key will be freed.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_closeRegistry ( RegHandle  hRegistry)

This function closes a registry.

Parameters
hRegistryidentifies a currently open registry which should be closed.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_closeSubKeys ( RegKeyHandle phSubKeys,
sal_uInt32  nSubKeys 
)

This function closes all subkeys specified in the array.

Parameters
phSubKeyspoints to a variable that containss an array of all opened subkeys. The allocated memory of pphSubKeys and all open subkeys will be freed.
nSubKeysspecifies the length of the array (the number of subkeys to closed).
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_createKey ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegKeyHandle phNewKey 
)

This function creates the specified key.

If the key already exists in the registry, the function opens the key only.

Parameters
hKeyidentifies a currently open key. The key which will be opened or created by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of a key.
phNewKeypoints to a variable that receives the handle of the opened or created key. The memory to store this variable will be allocated and will be freed by the function reg_closeKey. If the function fails, phNewKey is NULL.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_createRegistry ( rtl_uString *  registryName,
RegHandle phRegistry 
)

This function creates a new registry with the specified name and creates a root key.

Parameters
registryNamepoints to a null terminated string specifying the name of the new registry.
phRegistrypoints to a handle of the new registry if the function succeeds otherwise NULL.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_deleteKey ( RegKeyHandle  hKey,
rtl_uString *  keyName 
)

This function deletes the specified key.

Parameters
hKeyidentifies a currently open key. The key deleted by this function is a subkey of the key identified by hKey
keyNamepoints to a null terminated string specifying the name of a key which will be deleted.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_destroyRegistry ( RegHandle  hRegistry,
rtl_uString *  registryName 
)

This function destroys a registry.

Parameters
hRegistryidentifies a currently open registry.
registryNamespecifies a registry name of a registry which should be destroyed. If the name is NULL the registry itselfs will be destroyed.
Returns
REG_NO_ERROR if succeeds else an error code.

This function reports the complete registry information of a key and all of its subkeys.

All information which are available (keynames, value types, values, ...) will be printed to stdout for report issues only.

Parameters
hKeyidentifies a currently open key which content will be reported.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_freeValueList ( RegValueType  valueType,
RegValue  pValueList,
sal_uInt32  len 
)

This function frees the memory of a value list.

Parameters
valueTypespecifies the type of the list values.
pValueLista Pointer to the value list.
lenspecifies the length of the value list.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getKeyName ( RegKeyHandle  hKey,
rtl_uString **  pKeyName 
)

This function returns the name of a key.

Parameters
hKeyidentifies a currently open key which name will be returned.
pKeyNamecontains the keyname if succeeds else an empty string.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getKeyType ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegKeyType pKeyType 
)

This function returns the type of a key.

The registry differentiates two possible types:

  • RG_KEYTYPE represents a real key
  • RG_LINKTYPE used to represent a link (no longer used)
    Parameters
    keyNamepoints to a null terminated string specifying the name of the key which keytype will be returned.
    pKeyTypereturns the type of the key.
    Returns
    REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getLongListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Int32 **  pValueList,
sal_uInt32 *  pLen 
)

This function gets the long list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be got. If keyName is NULL, then the value of the key specified by hKey will be got.
pValueLista Pointer to a long value list which returns the data of the value.
pLenreturns the length of the value list.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getName ( RegHandle  hRegistry,
rtl_uString **  pName 
)

This function returns the name of a registry.

Parameters
hRegistryidentifies a currently open registry whose name will be returned.
pNamereturns the name of the registry if the function succeeds otherwise an empty string.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getResolvedKeyName ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Bool  firstLinkOnly,
rtl_uString **  pResolvedName 
)

This function resolves a keyname.

and returns the resolved keyName in pResolvedName.

Parameters
hKeyidentifies a currently open key. The key specified by keyName is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the relativ name of a key. The name of hKey together with keyName will be generated.
firstLinkOnlyignored
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getStringListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Char ***  pValueList,
sal_uInt32 *  pLen 
)

This function gets the string list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be got. If keyName is NULL, then the value of the key specified by hKey will be got.
pValueLista Pointer to an ascii value list which returns the data of the value.
pLenreturns the length of the value list.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getUnicodeListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Unicode ***  pValueList,
sal_uInt32 *  pLen 
)

This function gets the unicode list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be got. If keyName is NULL, then the value of the key specified by hKey will be got.
pValueLista Pointer to an unicode value list which returns the data of the value.
pLenreturns the length of the value list.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegValue  pData 
)

This function gets the value of a key.

Parameters
hKeyidentifies a currently open key. The key which value will be got by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of a key which value will be got. If keyName is NULL, then the value of the key specified by hKey will be got.
pDatapoints to an allocated memory block receiving the data of the value.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_getValueInfo ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegValueType pValueType,
sal_uInt32 *  pValueSize 
)

This function gets info about type and size of a key value.

Parameters
hKeyidentifies a currently open key. The key which value info will be got by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of a key which value will be got. If keyName is NULL, then the value info of the key specified by hKey will be got.
pValueTypereturns the type of the value.
pValueSizereturns the size of the value in bytes
Returns
REG_NO_ERROR if succeeds else an error code.

This function returns the access mode of the registry.

Parameters
hRegidentifies a currently open registry.
Returns
TRUE if accessmode is read only else FALSE.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_loadKey ( RegKeyHandle  hKey,
rtl_uString *  keyName,
rtl_uString *  regFileName 
)

This function loads registry information from a file and save it under the specified keyName.

Parameters
hKeyidentifies a currently open key. The key which should store the registry information is a subkey of this key.
keyNamepoints to a null terminated string specifying the name of the key which stores the registry information. If keyName is NULL the registry information will be saved under the key specified by hKey.
regFileNamepoints to a null terminated string specifying the file which conains the registry information.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_mergeKey ( RegKeyHandle  hKey,
rtl_uString *  keyName,
rtl_uString *  regFileName,
sal_Bool  bWarnings,
sal_Bool  bReport 
)

This function merges the registry information from a specified source with the information of the currently open registry.

All existing keys will be extended and existing key values will be overwritten.

Parameters
hKeyidentifies a currently open key. The key which information is merged by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of the key which will be merged. If keyName is NULL the registry information under the key specified by hKey is merged with the complete information from the specified file.
regFileNamepoints to a null terminated string specifying the file containing the registry information.
bWarningsif TRUE the function returns an error if a key already exists.
bReportif TRUE the function reports warnings on stdout if a key already exists.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openKey ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegKeyHandle phOpenKey 
)

This function opens the specified key.

Parameters
hKeyidentifies a currently open key. The key which will be opened by this function is a subkey of the key identified by hKey
keyNamepoints to a null terminated string specifying the name of a key.
phOpenKeypoints to a variable that receives the handle of the opened key. The memory to store this variable will be allocated and will be freed by the function reg_closeKey. If the function fails, phNewKey is NULL.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRegistry ( rtl_uString *  registryName,
RegHandle phRegistry,
RegAccessMode  accessMode 
)

This function opens a registry with the specified name.

Parameters
registryNamepoints to a null terminated string specifying the name of the registry.
phRegistrypoints to a hanle of the opened registry if the function succeeds otherwise NULL.
accessModespecifies the accessmode of the registry, REG_READONLY or REG_READWRITE.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRootKey ( RegHandle  hRegistry,
RegKeyHandle phRootKey 
)

This function opens the root key of a registry.

Parameters
hRegistryidentifies a currently open registry whose rootKey will be returned.
phRootKeypoints to a handle of the open root key if the function succeeds otherwise NULL.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openSubKeys ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegKeyHandle **  pphSubKeys,
sal_uInt32 *  pnSubKeys 
)

This function opens all subkeys of the specified key.

Parameters
hKeyidentifies a currently open key. The key that subkeys will be opened by this function is a subkey of the key identified by hKey
keyNamepoints to a null terminated string specifying the name of a key whose subkeys will be opened.
pphSubKeyspoints to a variable that receives an array of all opened subkeys. The memory to store this variable will be allocated and will be freed by the function reg_closeSubKeys. If the function fails, pphSubKeys is NULL.
pnSubKeysspecifies the length of the array (the number of open subkeys).
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_saveKey ( RegKeyHandle  hKey,
rtl_uString *  keyName,
rtl_uString *  regFileName 
)

This function saves the registry information under a specified key and all of its subkeys and save it in a registry file.

Parameters
hKeyidentifies a currently open key. The key which information is saved by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of the subkey. If keyName is NULL the registry information under the key specified by hKey will be saved in the specified file.
regFileNamepoints to a null terminated string specifying the file which will contain the registry information.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_setLongListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Int32 *  pValueList,
sal_uInt32  len 
)

This function sets an long list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be set. If keyName is NULL, then the value of the key specified by hKey will be set.
pValueListpoints to an array of longs containing the data of the value.
lenspecifies the len of pValueList.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_setStringListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Char **  pValueList,
sal_uInt32  len 
)

This function sets an ascii list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be set. If keyName is NULL, then the value of the key specified by hKey will be set.
pValueListpoints to an array of sal_Char* containing the data of the value.
lenspecifies the len of pValueList.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_setUnicodeListValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
sal_Unicode **  pValueList,
sal_uInt32  len 
)

This function sets an unicode string list value of a key.

Parameters
keyNamepoints to a null terminated string specifying the name of a key which value will be set. If keyName is NULL, then the value of the key specified by hKey will be set.
pValueListpoints to an array of sal_Unicode* containing the data of the value.
lenspecifies the len of pValueList.
Returns
REG_NO_ERROR if succeeds else an error code.
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_setValue ( RegKeyHandle  hKey,
rtl_uString *  keyName,
RegValueType  valueType,
RegValue  pData,
sal_uInt32  valueSize 
)

This function sets a value of a key.

Parameters
hKeyidentifies a currently open key. The key which value will be set by this function is a subkey of the key identified by hKey.
keyNamepoints to a null terminated string specifying the name of a key which value will be set. If keyName is NULL, then the value of the key specified by hKey will be set.
valueTypespecifies the type of the value.
pDatapoints to a memory block containing the data of the value.
valueSizespecifies the size of pData in bytes
Returns
REG_NO_ERROR if succeeds else an error code.