JUCE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
WindowsRegistry Class Reference

Contains some static helper functions for manipulating the MS Windows registry (Only available on Windows, of course!) More...

Static Public Member Functions

static String getValue (const String &regValuePath, const String &defaultValue=String::empty)
 Returns a string from the registry.
 
static String getValueWow64 (const String &regValuePath, const String &defaultValue=String::empty)
 Returns a string from the WOW64 registry.
 
static uint32 getBinaryValue (const String &regValuePath, MemoryBlock &resultData)
 Reads a binary block from the registry.
 
static bool setValue (const String &regValuePath, const String &value)
 Sets a registry value as a string.
 
static bool setValue (const String &regValuePath, uint32 value)
 Sets a registry value as a DWORD.
 
static bool setValue (const String &regValuePath, uint64 value)
 Sets a registry value as a QWORD.
 
static bool setValue (const String &regValuePath, const MemoryBlock &value)
 Sets a registry value as a binary block.
 
static bool valueExists (const String &regValuePath)
 Returns true if the given value exists in the registry.
 
static bool valueExistsWow64 (const String &regValuePath)
 Returns true if the given value exists in the registry.
 
static void deleteValue (const String &regValuePath)
 Deletes a registry value.
 
static void deleteKey (const String &regKeyPath)
 Deletes a registry key (which is registry-talk for 'folder').
 
static bool registerFileAssociation (const String &fileExtension, const String &symbolicDescription, const String &fullDescription, const File &targetExecutable, int iconResourceNumber, bool registerForCurrentUserOnly)
 Creates a file association in the registry.
 

Detailed Description

Contains some static helper functions for manipulating the MS Windows registry (Only available on Windows, of course!)

Member Function Documentation

static String WindowsRegistry::getValue ( const String regValuePath,
const String defaultValue = String::empty 
)
static

Returns a string from the registry.

The path is a string for the entire path of a value in the registry, e.g. "HKEY_CURRENT_USER\Software\foo\bar"

static String WindowsRegistry::getValueWow64 ( const String regValuePath,
const String defaultValue = String::empty 
)
static

Returns a string from the WOW64 registry.

The path is a string for the entire path of a value in the registry, e.g. "HKEY_CURRENT_USER\Software\foo\bar"

static uint32 WindowsRegistry::getBinaryValue ( const String regValuePath,
MemoryBlock resultData 
)
static

Reads a binary block from the registry.

The path is a string for the entire path of a value in the registry, e.g. "HKEY_CURRENT_USER\Software\foo\bar"

Returns
a DWORD indicating the type of the key.
static bool WindowsRegistry::setValue ( const String regValuePath,
const String value 
)
static

Sets a registry value as a string.

This will take care of creating any groups needed to get to the given registry value.

static bool WindowsRegistry::setValue ( const String regValuePath,
uint32  value 
)
static

Sets a registry value as a DWORD.

This will take care of creating any groups needed to get to the given registry value.

static bool WindowsRegistry::setValue ( const String regValuePath,
uint64  value 
)
static

Sets a registry value as a QWORD.

This will take care of creating any groups needed to get to the given registry value.

static bool WindowsRegistry::setValue ( const String regValuePath,
const MemoryBlock value 
)
static

Sets a registry value as a binary block.

This will take care of creating any groups needed to get to the given registry value.

static bool WindowsRegistry::valueExists ( const String regValuePath)
static

Returns true if the given value exists in the registry.

static bool WindowsRegistry::valueExistsWow64 ( const String regValuePath)
static

Returns true if the given value exists in the registry.

static void WindowsRegistry::deleteValue ( const String regValuePath)
static

Deletes a registry value.

static void WindowsRegistry::deleteKey ( const String regKeyPath)
static

Deletes a registry key (which is registry-talk for 'folder').

static bool WindowsRegistry::registerFileAssociation ( const String fileExtension,
const String symbolicDescription,
const String fullDescription,
const File targetExecutable,
int  iconResourceNumber,
bool  registerForCurrentUserOnly 
)
static

Creates a file association in the registry.

This lets you set the executable that should be launched by a given file extension.

Parameters
fileExtensionthe file extension to associate, including the initial dot, e.g. ".txt"
symbolicDescriptiona space-free short token to identify the file type
fullDescriptiona human-readable description of the file type
targetExecutablethe executable that should be launched
iconResourceNumberthe icon that gets displayed for the file type will be found by looking up this resource number in the executable. Pass 0 here to not use an icon
registerForCurrentUserOnlyif false, this will try to register the association for all users (you might not have permission to do this unless running in an installer). If true, it will register the association in HKEY_CURRENT_USER.

The documentation for this class was generated from the following file: