Hi Erel,
Sorry to get back to you again on this issue.
The code below throws an
"Specified argument was out of the range of valid values." error.
The values in "Path" contain strings such as: "\SD Card\RBS Taiyoukei\taiyokei.exe". All entries are plain text and are present.
Now, the code runs without optimization on PPC 2003 and WM6.
It runs optimized under WM6.
It does NOT run optimized under PPC 2003.
It is reasonable to assume that the old compiler and WM6 are more
tolerant to something I haven't figured out yet.
Any thoughts you can share with me ?
Thanks
Robert
Code:
Sub mnuSearchAlfcen_Click
Dim ex
ErrorLabel(alfcen)
lbS.Clear 'ListBox
alSort.Clear 'Arraylist
Reg.RootKey(Reg.rtCurrentUser)
subKeys()=Reg.GetSubKeyNames("Software\RBSoft")
For i = 0 To ArrayLen(SubKeys())-1
ex=Reg.GetString("Software\RBSoft\" & SubKeys(i),"File")
If IsNull(ex) = false AND ex <> "" Then
lbS.Add(ex & " (" & Reg.GetString("Software\RBSoft\" & subKeys(i),"FriendlyName") & ")")
alSort.Add(Reg.GetString("Software\RBSoft\" & subKeys(i),"Path")) 'ERROR IS THROWN HERE. No error if I REM this line
End If
Next
Return
alfcen:
Msgbox("Not all entries could be read!"," alfcen Software",cMsgBoxNone, cMsgBoxAsterisk)
End Sub