Hello Eros,

The old registry bug has appeared again ???, Registry_GetAllKeys seems stuck in a loop.

I am using Version 1.9.15.0

Uses "UI","COMM","REGISTRY"
' -- ID numbers of controls


Global sComPorts(200)   As String


Function TBMain()


 GetComports(10)


End Function
 
Function GetComPorts(CBHNDL As DWord)
  Local N,M    As DWord
  Local nIdx   As DWord
  Local sBuffer As String
  Local sPorts() As String
  
  If Registry_PathExists("HKEYLM", "hardware\devicemap\serialcomm") Then
    sBuffer = Registry_GetAllKeys("HKEYLM", "hardware\devicemap\serialcomm")   '<<<<< Stuck in loop (again) ???
    Split(Buffer,$CRLF,Ports)
    If UBound(sPorts) <> UBound(sComPorts) Then
        ReDim sComPorts(UBound(sPorts))
        For n = 1 To UBound(sPorts)
          sComPorts(n) = Remain$(sPorts(n),"=")
        Next
    EndIf
  EndIf
End Function