Share via


VSRegistry.RegistryRoot Method

Definition

Overloads

RegistryRoot(__VsLocalRegistryType)

Returns a read-only RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

RegistryRoot(__VsLocalRegistryType, Boolean)

Returns a RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

RegistryRoot(IServiceProvider, __VsLocalRegistryType, Boolean)

Returns a RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

RegistryRoot(__VsLocalRegistryType)

Returns a read-only RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

public:
 static Microsoft::Win32::RegistryKey ^ RegistryRoot(Microsoft::VisualStudio::Shell::Interop::__VsLocalRegistryType registryType);

Parameters

registryType
__VsLocalRegistryType

The type of registry storage to open.

Returns

Returns RegistryKey.

Exceptions

Remarks

This method is safe to call from any thread.

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022

RegistryRoot(__VsLocalRegistryType, Boolean)

Returns a RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

public:
 static Microsoft::Win32::RegistryKey ^ RegistryRoot(Microsoft::VisualStudio::Shell::Interop::__VsLocalRegistryType registryType, bool writable);

Parameters

registryType
__VsLocalRegistryType

The type of registry storage to open.

writable
Boolean

Flag to indicate is the key should be writable.

Returns

Returns RegistryKey.

Exceptions

Remarks

This method is safe to access from any thread.

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022

RegistryRoot(IServiceProvider, __VsLocalRegistryType, Boolean)

Returns a RegistryKey object for the root of a given storage type. It is up to the caller to dispose the returned object.

public:
 static Microsoft::Win32::RegistryKey ^ RegistryRoot(IServiceProvider ^ provider, Microsoft::VisualStudio::Shell::Interop::__VsLocalRegistryType registryType, bool writable);

Parameters

provider
IServiceProvider

The service provider to use to access the Visual Studio's services.

registryType
__VsLocalRegistryType

The type of registry storage to open.

writable
Boolean

Flag to indicate is the key should be writable.

Returns

Returns RegistryKey.

Exceptions

provider is null.

Remarks

This method is safe to access from any thread.

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022