2#ifndef _MICROSOFT_WIN32_REGISTRY_H_
3#define _MICROSOFT_WIN32_REGISTRY_H_
5#include <system/object.h>
6#include <system/shared_ptr.h>
7#include <system/array.h>
8#include <system/string.h>
9#include <system/reflection.h>
19class SafeRegistryHandle;
20class RegistrySecurity;
37 ClassesRoot = (std::numeric_limits<int32_t>::min)(),
176 MEMBER_FUNCTION_MAKE_OBJECT(
RegistryKey, CODEPORTING_ARGS(), CODEPORTING_ARGS());
API to manipulate registry values. Support is very limited and Windows-only. Objects of this class sh...
Definition: registry.h:160
System::ArrayPtr< System::String > GetSubKeyNames()
Enumerates subkeys. Not implemented.
void DeleteSubKeyTree(const System::String &subkey, bool throwOnMissingSubKey)
Deletes subkey tree under current key. Not implemented.
void DeleteSubKeyTree(const System::String &subkey)
Deletes subkey tree under current key. Not implemented.
RegistryValueKind GetValueKind(const System::String &name)
Gets key value type. Not implemented.
void Dispose()
Frees handles associated with key. Not implemented.
System::SharedPtr< RegistryKey > OpenSubKey(const System::String &name, bool writable)
Opens subkey of current key. Not implemented.
void DeleteValue(const System::String &name)
Deletes value of current key. Not implemented.
static System::SharedPtr< RegistryKey > OpenRemoteBaseKey(RegistryHive hKey, const System::String &machineName, RegistryView view)
Opens base key on remote host. Not implemented.
void SetValue(const System::String &name, const System::SharedPtr< System::Object > &value, RegistryValueKind valueKind)
Sets registry value. Not implemented.
void DeleteSubKey(const System::String &subkey)
Deletes subkey under current key. Not implemented.
static System::SharedPtr< RegistryKey > OpenBaseKey(RegistryHive hKey, RegistryView view)
Opens base key. Not implemented.
void Flush()
Writes all attributes of key to registry. Not implemented.
System::SharedPtr< System::Object > GetValue(const System::String &name, const System::SharedPtr< System::Object > &defaultValue)
Gets key value. Not implemented.
void DeleteSubKey(const System::String &subkey, bool throwOnMissingSubKey)
Deletes subkey under current key. Not implemented.
System::SharedPtr< RegistryKey > CreateSubKey(const System::String &subkey, RegistryKeyPermissionCheck permissionCheck)
Creates subkey under current key. Not implemented.
System::SharedPtr< RegistryKey > CreateSubKey(const System::String &subkey, RegistryKeyPermissionCheck permissionCheck, const System::SharedPtr< RegistrySecurity > ®istrySecurity)
Creates subkey under current key. Not implemented.
virtual ~RegistryKey() override
Destructor.
System::SharedPtr< SafeRegistryHandle > get_Handle()
Gets raw handle of registry key. Not implemented.
static System::SharedPtr< RegistryKey > FromHandle(const System::SharedPtr< SafeRegistryHandle > &handle)
Opens key from handle. Not implemented.
void SetValue(const System::String &name, const System::SharedPtr< System::Object > &value)
Sets registry value. Not implemented.
System::SharedPtr< RegistryKey > CreateSubKey(const System::String &subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options)
Creates subkey under current key. Not implemented.
RegistryView get_View()
Gets view of registry key. Not implemented.
System::SharedPtr< RegistrySecurity > GetAccessControl()
Gets access control object associated with key. Not implemented.
System::SharedPtr< RegistryKey > CreateSubKey(const System::String &subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, const System::SharedPtr< RegistrySecurity > ®istrySecurity)
Creates subkey under current key. Not implemented.
void DeleteValue(const System::String &name, bool throwOnMissingValue)
Deletes value of current key. Not implemented.
int get_ValueCount()
Gets number of values. Not implemented.
System::String ToString() const override
Converts key to string. Not implemented.
System::SharedPtr< RegistryKey > OpenSubKey(const System::String &name, RegistryKeyPermissionCheck permissionCheck)
Opens subkey of current key. Not implemented.
System::SharedPtr< RegistryKey > CreateSubKey(const System::String &subkey)
Creates subkey under current key. Not implemented.
System::SharedPtr< RegistryKey > OpenSubKey(const System::String &name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
Opens subkey of current key. Not implemented.
System::SharedPtr< RegistrySecurity > GetAccessControl(AccessControlSections includeSections)
Gets access control object associated with key. Not implemented.
System::ArrayPtr< System::String > GetValueNames()
Gets list of value names under current key.
void Close()
Closes registry key. Not implemented.
System::SharedPtr< RegistryKey > OpenSubKey(const System::String &name)
Opens subkey of current key.
System::SharedPtr< System::Object > GetValue(const System::String &valueName)
Gets key value. Windows only.
System::String get_Name()
Gets name of registry key. Not implemented.
static System::SharedPtr< RegistryKey > FromHandle(const System::SharedPtr< SafeRegistryHandle > &handle, RegistryView view)
Opens key from handle. Not implemented.
int get_SubKeyCount()
Gets number of subkeys. Not implemented.
static System::SharedPtr< RegistryKey > OpenRemoteBaseKey(RegistryHive hKey, const System::String &machineName)
Opens base key on remote host. Not implemented.
System::SharedPtr< System::Object > GetValue(const System::String &name, const System::SharedPtr< System::Object > &defaultValue, RegistryValueOptions options)
Gets key value. Not implemented.
void SetAccessControl(const System::SharedPtr< RegistrySecurity > ®istrySecurity)
Sets access control value. Not implemented.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
RegistryView
Defines which of the registry views to use on 64-bit Windows.
Definition: registry.h:24
@ Registry32
Use 32-bit registry view.
@ Registry64
Use 64-bit registry view.
RegistryOptions
Registry keys creation options.
Definition: registry.h:65
@ Volatile
Keep value in memory only.
AccessControlSections
Specifies which part of security descriptor to save or load.
Definition: registry.h:74
RegistryRights
Registry access rights.
Definition: registry.h:121
@ TakeOwnership
Ownership taking.
@ SetValue
Setting values.
@ ExecuteKey
Key execution permissions mask.
@ CreateLink
Link creation.
@ EnumerateSubKeys
Listing subkeys.
@ QueryValues
Reading values.
@ CreateSubKey
Creating subkeys.
@ ReadKey
Key reading permissions mask.
@ FullControl
Full control mask.
@ Notify
Sending notifications.
@ ReadPermissions
Reading permissions mask.
@ WriteKey
Key writing permissions mask.
@ ChangePermissions
Permission change.
RegistryKeyPermissionCheck
Defines how the security checks are performed on registry entries.
Definition: registry.h:54
@ ReadWriteSubTree
No security checks when reading or writing subtree.
@ ReadSubTree
No security checks when reading subtree.
RegistryValueKind
Type of registry value.
Definition: registry.h:100
@ MultiString
Multiple strings.
@ ExpandString
Long string.
RegistryValueOptions
Registry value write mode.
Definition: registry.h:91
@ DoNotExpandEnvironmentNames
Without environment names expansion.
RegistryHive
Defines which registry root item to use as base on remote machine.
Definition: registry.h:35
@ LocalMachine
Use HKEY_LOCAL_MACHINE.
@ ClassesRoot
Use HKEY_CLASSES_ROOT.
@ DynData
Use HKEY_DYN_DATA.
@ CurrentConfig
Use HKEY_CURRENT_CONFIG.
@ PerformanceData
Use HKEY_PERFORMANCE_DATA.
@ CurrentUser
Use HKEY_CURRENT_USER.
Definition: registry.h:15
Windows system registry API. This is a static type with no instance services. You should never create...
Definition: registry.h:293
static const System::SharedPtr< RegistryKey > PerformanceData
HKEY_PERFORMANCE_DATA key.
Definition: registry.h:305
static const System::SharedPtr< RegistryKey > DynData
HKEY_DYN_DATA key.
Definition: registry.h:301
static System::SharedPtr< System::Object > GetValue(const System::String &keyName, const System::String &valueName, const System::SharedPtr< System::Object > &defaultValue)
Gets value of specified key. Not implemented.
static const System::SharedPtr< RegistryKey > CurrentUser
HKEY_CURRENT_USER key.
Definition: registry.h:299
static const System::SharedPtr< RegistryKey > CurrentConfig
HKEY_CURRENT_CONFIG key.
Definition: registry.h:297
static const System::SharedPtr< RegistryKey > ClassesRoot
HKEY_CLASSES_ROOT key.
Definition: registry.h:295
static const System::SharedPtr< RegistryKey > Users
HKEY_USERS key.
Definition: registry.h:307
static void SetValue(const System::String &keyName, const System::String &valueName, const System::SharedPtr< System::Object > &value, RegistryValueKind valueKind)
Sets value of specified key. Not implemented.
static const System::SharedPtr< RegistryKey > LocalMachine
HKEY_LOCAL_MACHINE key.
Definition: registry.h:303
static void SetValue(const System::String &keyName, const System::String &valueName, const System::SharedPtr< System::Object > &value)
Sets value of specified key. Not implemented.