Private Sub Command1_Click()
    
    f8000 = Space(100)
    
    SendTo8000 = Space(100)
    ReceiveFrom8000 = Space(100)
    
    If COMOpen = 0 Or ConfigChange > 0 Then
        OpenCom
    End If
      
    'Debug.Print "------------------------------------"
    'Debug.Print "Port=" & Str(Port)
      
      
    w8000(0) = comCombo.ListIndex + 1 ' COM Port
    
    w8000(1) = Val("&H" & addressText.Text) ' Module Address
    Select Case typeCombo.ListIndex   ' Module ID
       Case 0
           w8000(2) = &H7017
       Case 1
           w8000(2) = &H7018
       Case 2
           w8000(2) = &H8017
       Case 3
           w8000(2) = &H8018
    End Select
    
    If chksumOption(0).Value Then
        w8000(3) = 1       '  EnableCheckSum
    Else
        w8000(3) = 0
    End If
    
    w8000(4) = 100     ' TimeOut = 0.1 second
 
    w8000(5) = Val(channelText.Text)   ' channel no
    w8000(6) = 1       ' string debug
    
    Ret = AnalogIn(w8000(0), f8000, SendTo8000, ReceiveFrom8000)  ***
    
    If Ret <> 0 Then
           Beep
           A$ = "The Error Code:" + Str$(Ret)
           MsgBox A$, 0, "_AnalogIn() error !!!"
           
           End
    End If
     
    If w8000(6) = 1 Then
       
        Label8.Caption = ReceiveFrom8000
    End If
    
    Text1.Text = f8000
    
    'Timer1.Enabled = True
  
End Sub
这是用VB6写的一段程序 带***号的部分是调用的外部DLL 原型如下:
Declare Function AnalogIn Lib "Remo8000.dll" (wBuf As Integer, ByVal fBuf As String, _
                ByVal szSend As String, ByVal szReceive As String) As Integer
想请教转换成Delphi后的语句怎么写??