Loading...
Searching...
No Matches
juce_WindowsRegistry.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
#if JUCE_WINDOWS || DOXYGEN
class JUCE_API WindowsRegistry
{
public:
enum WoW64Mode
{
WoW64_Default = 0,
WoW64_64bit = 0x100,
WoW64_32bit = 0x200
};
//==============================================================================
static String JUCE_CALLTYPE getValue (const String& regValuePath,
const String& defaultValue = String(),
WoW64Mode mode = WoW64_Default);
static uint32 JUCE_CALLTYPE getBinaryValue (const String& regValuePath, MemoryBlock& resultData, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE setValue (const String& regValuePath, const String& value, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint32 value, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint64 value, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE setValue (const String& regValuePath, const MemoryBlock& value, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE valueExists (const String& regValuePath, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE keyExists (const String& regKeyPath, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE deleteValue (const String& regValuePath, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE deleteKey (const String& regKeyPath, WoW64Mode mode = WoW64_Default);
static bool JUCE_CALLTYPE registerFileAssociation (const String& fileExtension,
const String& symbolicDescription,
const String& fullDescription,
const File& targetExecutable,
int iconResourceNumber,
bool registerForCurrentUserOnly,
WoW64Mode mode = WoW64_Default);
#ifndef DOXYGEN
// DEPRECATED: use the other methods with a WoW64Mode parameter of WoW64_64bit instead.
[[deprecated]] static String getValueWow64 (const String&, const String& defaultValue = String());
[[deprecated]] static bool valueExistsWow64 (const String&);
[[deprecated]] static bool keyExistsWow64 (const String&);
#endif
private:
WindowsRegistry() = delete;
JUCE_DECLARE_NON_COPYABLE (WindowsRegistry)
};
#endif
} // namespace juce