Code Snippet
Option
Strict On
Imports
Microsoft.Win32
Public
Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myArrayList As ArrayList
myArrayList = Get_Connections()
End Sub
Function Get_Connections() As ArrayList
Dim AR_Connections As New ArrayList
Dim regKey As RegistryKey
regKey = Registry.LocalMachine
regKey = regKey.OpenSubKey("SOFTWARE")
regKey = regKey.OpenSubKey("GOD Service")
Dim Str_TempConnStr As String = "n/a"
Dim Str_Columns As String = ""
Dim x As Int16 = 1
Do Until Str_TempConnStr = ""
Try
Str_TempConnStr = regKey.GetValue(
"Conn_" & x).ToString
Catch ex As Exception
Str_TempConnStr =
""
End Try
AR_Connections.Add(Str_TempConnStr).ToString()
x = Convert.ToInt16(x + 1)
Loop
Return AR_Connections
End Function
End
Class