Export (0) Print
Expand All

My.Computer.Registry.DynData Property 

Returns a RegistryKey type, which provides access to HKEY_DYNDATA.


' Usage
Dim value As Microsoft.Win32.RegistryKey = My.Computer.Registry.DynData
' Declaration
Public ReadOnly Property DynData As Microsoft.Win32.RegistryKey

RegistryKey

The My.Computer.Registry object offers methods and properties for working with registry keys. See My.Computer.Registry Object for more information.

HKEY_DYNDATA is used to store dynamic registry data, such as that used by Virtual Device Drivers and is supported only on Windows 95/98 systems. On non-Windows 95/98 systems, calling any methods of the key returned by Registry.DynData, such as CreateSubKey, DeleteSubKey, GetSubKeyCount, GetValueCount, etc., will throw a IOException.

The RegistryPermission class, which is in the System.Security.Permissions namespace, controls access to registry variables. Registry variables should not be stored in memory locations where code without RegistryPermission can access them. Similarly, when granting permissions, grant the fewest privileges necessary to get the job done.

Registry permission access values are defined by the RegistryPermissionAccess enumeration. The following table details its members.

Value Description

AllAccess

Create, read, and write access to registry variables.

Create

Create access to registry variables.

NoAccess

No access to registry variables.

Read

Read access to registry variables.

Write

Write access to registry variables.

The following table lists examples of tasks involving the My.Computer.Registry object.

This example deletes the subkey tree Software\MyCompany\Preferences.

My.Computer.Registry.DynData.DeleteSubKeyTree("Software\MyCompany\Preferences")

Namespace: Microsoft.VisualBasic.MyServices

Class: RegistryProxy (provides access to Registry)

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Availability by Project Type

Project type Available

Windows Application

Yes

Class Library

Yes

Console Application

Yes

Windows Control Library

Yes

Web Control Library

Yes

Windows Service

Yes

Web Site

Yes

No permissions are required.

Community Additions

ADD
Show:
© 2014 Microsoft