|
-
Feb 17th, 2008, 03:04 PM
#1
Thread Starter
Lively Member
[SOLVED][2005] Reg_multi_sz
After an extensive search trough our worlwide encyclopedia I have to bother you all, my apologies, but here goes;
I'm trying to read an REG_MULTI_SZ registry key, I already know how to write it, but it flakes on the reading part, here is how far I got:
Code:
Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SYSTEM\Program\Attr\")
If key IsNot Nothing Then
Dim strNotes() As String
strNotes = CType(key.GetValue("Notes"), String())
If strNotes IsNot Nothing Then
For X = 0 To UBound(strNotes)
strInfo = strInfo & vbCrLf & strNotes(X)
Next
End If
I get this error:
"Unable to cast object of type 'System.String' to type 'System.String[]'
But I'm sure the regvalue is a array, so I'm a bit confused.
Could you help me with some suggestions?
Kind Regards, Starf0x
Last edited by Starf0x; Feb 18th, 2008 at 10:00 AM.
Reason: Solved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|