codice:
Declare Function hllapi_RUMBA% Lib "EHLAPI32.DLL" Alias "hllapi" 
(Func%, ByVal Dati$, DataLen%, rc%)

Function callapi(Func As Integer, strn As String, STRNLEN As Integer, rc As Integer) As Integer
   
   x% = DoEvents()

'                    Attesa per Sys-Available
   On Error GoTo ERRORE
   
    If HLLADLL$ = "DEFAULT" Then
        HLLADLL$ = "IBM"
    End If
    Select Case HLLADLL$
    
        Case Is = "IBM"
            dummy% = hllapi_IBM%(Func%, strn$, STRNLEN%, rc%)
        Case Is = "RUMBA"
            dummy% = hllapi_RUMBA%(Func%, strn$, STRNLEN%, rc%)

    End Select
  
   
   On Error GoTo 0
   Exit Function
ERRORE:
    MsgBox Err.Number & Err.Description
    Resume
End Function