![ADVANTEST R3755 Series Operation Manual Download Page 31](http://html.mh-extra.com/html/advantest/r3755-series/r3755-series_operation-manual_2858773031.webp)
3.5.3
BisGetlpStr
3-13
For Visual Basic 2008
Public Class BisGetIpStr
Public Declare Function BisGetIpStr Lib "bis.dll" _
(ByVal strCmpName As String, ByRef strIpAddr As String) _
As Integer
Public Declare Function BisOpenPacket Lib "bis.dll" _
(ByVal strIP As String, ByVal strBD As String, _
ByRef lngID As Integer) As Integer
Public Declare Function BisSystPres Lib "bis.dll" _
(ByVal lngPID As Integer) As Integer
Public Declare Function BisClosePacket Lib "bis.dll" _
(ByVal lngID As Integer) As Integer
Dim lngPID As Integer
Private Sub cmdOpen_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles cmdOpen.Click
Dim lngErr As Integer
Dim strIpAddr As String = "
"
lngErr = BisGetIpStr("ZeroOne", strIpAddr)
lngErr = BisOpenPacket(strIpAddr, "", lngPID)
' Confirmation of successful connection
If (lngErr <> 0) Then
MsgBox("Invalid open the Communication Port.(" & Str(lngErr) & _
")", vbOKOnly)
Else
lngErr = BisSystPres(lngPID)
End If
End Sub
Private Sub BisGetIpStr_FormClosed(ByVal sender As Object, _
ByVal e As System.Windows.Forms.FormClosedEventArgs) _
Handles Me.FormClosed
Dim lngErr As Integer
If lngPID Then lngErr = BisClosePacket(lngPID)
End Sub
End Class