SlinkX.NumDevices

int NumDevices

Remarks

This property is an integer which tells you how many devices you have laoded on the server. It is wise to check this value before using a method like GetDeviceName which references a device number to prevent errors.

Example (Visual Basic)

Dim nDevices As Long
Dim nCodes As Long
Dim DeviceName As String
Dim CodeName As String

nDevices = Slinkx.NumDevices
If (nDevices > 0) Then
    DeviceName = Slinkx.GetDeviceName(1)
    nCodes = Slinkx.GetNumCodes(DeviceName)
    If (nCodes > 6) Then
        CodeName = Slinkx.GetCodeName(DeviceName, 6)
        MsgBox ("Code number 6 in Device " + DeviceName + " is " + CodeName)
    End If
End If

See Also

SlinkX.GetDeviceName