Support Forum       G3D Web Page     
Static Public Member Functions | List of all members
G3D::RegistryUtil Class Reference

Provides generalized Windows registry querying. More...

Static Public Member Functions

static bool keyExists (const String &key)
 returns true if the key exists and the current user has permission to read More...
 
static bool readBytes (const String &key, const String &value, uint8 *data, uint32 &dataSize)
 
Reads an arbitrary amount of data from a binary registry key. More...
 
static bool readInt32 (const String &key, const String &value, int32 &data)
 returns false if the key could not be read for any reason. More...
 
static bool readString (const String &key, const String &value, String &data)
 returns false if the key could not be read for any reason. More...
 
static bool valueExists (const String &key, const String &value)
 returns true if the key exists and the current user has permission to read More...
 
static bool writeBytes (const String &key, const String &value, const uint8 *data, uint32 dataSize)
 
Writes an arbitrary amount of data to a binary registry key. More...
 
static bool writeInt32 (const String &key, const String &value, int32 data)
 returns false if the key could not be written for any reason. More...
 
static bool writeString (const String &key, const String &value, const String &data)
 returns false if the key could not be written for any reason. More...
 

Detailed Description

Provides generalized Windows registry querying.

All key names are one string in the format: "[base key]\[sub-keys]"

A value must now be provided for every query. An empty value string will use the (Default) value.

[base key] can be any of the following: HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_PERFORMANCE_NLSTEXT HKEY_PERFORMANCE_TEXT HKEY_USERS

valueExists() should be used to validate a key+value before reading or writing to ensure that a debug assert or false return is for a different error during reads and writes.

All read and write calls will assert when a key will not open for reasons other that it does not exist. All read and write calls will assert when the value cannot be read or written for any reason.

Member Function Documentation

◆ keyExists()

static bool G3D::RegistryUtil::keyExists ( const String key)
static

returns true if the key exists and the current user has permission to read

◆ readBytes()

static bool G3D::RegistryUtil::readBytes ( const String key,
const String value,
uint8 data,
uint32 dataSize 
)
static


Reads an arbitrary amount of data from a binary registry key.

returns false if the key could not be read for any reason.

BETA API Likely to receive incompatible changes in future releases.
Parameters
datapointer to the output buffer of sufficient size. Pass nullptr as data in order to have available data size returned in dataSize.
dataSizesize of the output buffer. When nullptr is passed for data, contains the size of available data on successful return.

◆ readInt32()

static bool G3D::RegistryUtil::readInt32 ( const String key,
const String value,
int32 data 
)
static

returns false if the key could not be read for any reason.

◆ readString()

static bool G3D::RegistryUtil::readString ( const String key,
const String value,
String data 
)
static

returns false if the key could not be read for any reason.

◆ valueExists()

static bool G3D::RegistryUtil::valueExists ( const String key,
const String value 
)
static

returns true if the key exists and the current user has permission to read

◆ writeBytes()

static bool G3D::RegistryUtil::writeBytes ( const String key,
const String value,
const uint8 data,
uint32  dataSize 
)
static


Writes an arbitrary amount of data to a binary registry key.

returns false if the key could not be written for any reason.

Parameters
datapointer to the input buffer
dataSizesize of the input buffer that should be written

◆ writeInt32()

static bool G3D::RegistryUtil::writeInt32 ( const String key,
const String value,
int32  data 
)
static

returns false if the key could not be written for any reason.

◆ writeString()

static bool G3D::RegistryUtil::writeString ( const String key,
const String value,
const String data 
)
static

returns false if the key could not be written for any reason.


documentation generated on Wed Nov 24 2021 08:01:59 using doxygen 1.8.15