Attribute VB_Name = "mod_vbDP5_MultiUSB" Option Explicit Public isWinUsbDppFound As Boolean Public isNetFinderReady As Boolean Public strNetFinder As String Public Const MAX_DISPLAY_ENTRIES = 5 Public Sub LoadDeviceSettings() Dim idxMUSB As Long Dim lNumberUnits As Long Dim strFilename As String strFilename = App.Path & "\" & App.EXEName & ".ini" 'max index is 4 for five devices 0-4 MUSB_MAX_INDEX = 4 'last index is read fron vbDP5_MultiUSB.ini file lNumberUnits = GetFromIni(strFilename, IniSectionApp, "Number_MUSB_Units", 0) MUSB_LAST_INDEX = lNumberUnits - 1 If (MUSB_LAST_INDEX > MUSB_MAX_INDEX) Then MUSB_LAST_INDEX = MUSB_MAX_INDEX lNumberUnits = MUSB_MAX_INDEX + 1 End If If (lNumberUnits > 0) Then 'multiusb serial numbers read from file (1 to five units connected) For idxMUSB = 0 To MUSB_LAST_INDEX MUSB_SN(idxMUSB) = CLng(Val(GetFromIni(strFilename, IniSectionApp, "MUSB_SN" & CStr(idxMUSB), 0))) Next End If End Sub