ISDBRegistry::OpenKey
From MMWiki
CoClass SDBRegistry, Interface ISDBRegistry
Function OpenKey(Key As String, CanCreate As Boolean) As Boolean
[edit]
Parameters
| Name | Type | Description |
|---|---|---|
| Key | String | Key to be openned. |
| CanCreate | Boolean | Whether the key can be created in case it doesn't exist. |
[edit]
Method description
Opens a key so that it can be subsequently used to get/set its values.
Key can either contain a full path starting with '\' (e.g. \Software\Microsoft\Windows\) or only part of path (e.g. 'My Value'). In the second case \Software\Songs-DB\Scripts\ is used as a base key.
[edit]
Example code
Set Regs = SDB.Registry If Regs.OpenKey( "Some key", False) Then MyValue = Regs.StringValue("Some value") Regs.CloseKey End If
