JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_WindowsRegistry.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26#if JUCE_WINDOWS || DOXYGEN
27
34class JUCE_API WindowsRegistry
35{
36public:
41 {
44 WoW64_Default = 0,
45
47 WoW64_64bit = 0x100,
48
50 WoW64_32bit = 0x200
51 };
52
53 //==============================================================================
58 static String JUCE_CALLTYPE getValue (const String& regValuePath,
59 const String& defaultValue = String(),
60 WoW64Mode mode = WoW64_Default);
61
67 static uint32 JUCE_CALLTYPE getBinaryValue (const String& regValuePath, MemoryBlock& resultData, WoW64Mode mode = WoW64_Default);
68
72 static bool JUCE_CALLTYPE setValue (const String& regValuePath, const String& value, WoW64Mode mode = WoW64_Default);
73
77 static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint32 value, WoW64Mode mode = WoW64_Default);
78
82 static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint64 value, WoW64Mode mode = WoW64_Default);
83
87 static bool JUCE_CALLTYPE setValue (const String& regValuePath, const MemoryBlock& value, WoW64Mode mode = WoW64_Default);
88
90 static bool JUCE_CALLTYPE valueExists (const String& regValuePath, WoW64Mode mode = WoW64_Default);
91
93 static bool JUCE_CALLTYPE keyExists (const String& regKeyPath, WoW64Mode mode = WoW64_Default);
94
96 static bool JUCE_CALLTYPE deleteValue (const String& regValuePath, WoW64Mode mode = WoW64_Default);
97
99 static bool JUCE_CALLTYPE deleteKey (const String& regKeyPath, WoW64Mode mode = WoW64_Default);
100
118 static bool JUCE_CALLTYPE registerFileAssociation (const String& fileExtension,
119 const String& symbolicDescription,
120 const String& fullDescription,
121 const File& targetExecutable,
122 int iconResourceNumber,
123 bool registerForCurrentUserOnly,
124 WoW64Mode mode = WoW64_Default);
125
126 #ifndef DOXYGEN
127 // DEPRECATED: use the other methods with a WoW64Mode parameter of WoW64_64bit instead.
128 [[deprecated]] static String getValueWow64 (const String&, const String& defaultValue = String());
129 [[deprecated]] static bool valueExistsWow64 (const String&);
130 [[deprecated]] static bool keyExistsWow64 (const String&);
131 #endif
132
133private:
134 WindowsRegistry() = delete;
136};
137
138#endif
139
140} // namespace juce
Represents a local file or directory.
Definition juce_File.h:45
A class to hold a resizable block of raw data.
The JUCE String class!
Definition juce_String.h:53
Contains some static helper functions for manipulating the MS Windows registry (Only available on Win...
static uint32 JUCE_CALLTYPE getBinaryValue(const String &regValuePath, MemoryBlock &resultData, WoW64Mode mode=WoW64_Default)
Reads a binary block from the registry.
static bool JUCE_CALLTYPE setValue(const String &regValuePath, const String &value, WoW64Mode mode=WoW64_Default)
Sets a registry value as a string.
static bool JUCE_CALLTYPE deleteValue(const String &regValuePath, WoW64Mode mode=WoW64_Default)
Deletes a registry value.
static bool JUCE_CALLTYPE valueExists(const String &regValuePath, WoW64Mode mode=WoW64_Default)
Returns true if the given value exists in the registry.
WoW64Mode
These values can be used to specify whether the 32- or 64-bit registry should be used.
static bool JUCE_CALLTYPE setValue(const String &regValuePath, const MemoryBlock &value, WoW64Mode mode=WoW64_Default)
Sets a registry value as a binary block.
static String JUCE_CALLTYPE getValue(const String &regValuePath, const String &defaultValue=String(), WoW64Mode mode=WoW64_Default)
Returns a string from the registry.
static bool JUCE_CALLTYPE setValue(const String &regValuePath, uint32 value, WoW64Mode mode=WoW64_Default)
Sets a registry value as a DWORD.
static bool JUCE_CALLTYPE deleteKey(const String &regKeyPath, WoW64Mode mode=WoW64_Default)
Deletes a registry key (which is registry-talk for 'folder').
static bool JUCE_CALLTYPE keyExists(const String &regKeyPath, WoW64Mode mode=WoW64_Default)
Returns true if the given key exists in the registry.
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)
Creates a file association in the registry.
static bool JUCE_CALLTYPE setValue(const String &regValuePath, uint64 value, WoW64Mode mode=WoW64_Default)
Sets a registry value as a QWORD.
#define JUCE_DECLARE_NON_COPYABLE(className)
This is a shorthand macro for deleting a class's copy constructor and copy assignment operator.
#define JUCE_CALLTYPE
This macro defines the C calling convention used as the standard for JUCE calls.
JUCE Namespace.
unsigned long long uint64
A platform-independent 64-bit unsigned integer type.
unsigned int uint32
A platform-independent 32-bit unsigned integer type.