Option Strict Off
Option Explicit On
Imports System.Runtime.InteropServices
'Module basCallBackEventProc
Friend Class CallBackEvent
    Inherits System.Windows.Forms.Form

    'ポートオープン関数(crwOpenPort)
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwOpenPort( _
        ByVal iPortNo As Short, _
        ByVal lBaudRate As Integer, _
        ByVal lpDataBit As String, _
        ByVal lpParity As String) As Short
    End Function

    'ポートクローズ関数(crwClosePort)
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwClosePort( _
        ByVal iPortNo As Short) As Short
    End Function

    ' レスポンス受信イベントハンドラ登録関数
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwSetResponseEventProc( _
        ByVal iPortNo As Short, _
        ByVal iRecMode As Short, _
        ByVal lTimeOut As Integer, _
        ByVal pResponseEventProc As ResponseEventDelegate, _
        ByVal pParam As Integer, _
        ByVal lEvent As Integer) As Short
    End Function

    ' バイナリデータ受信イベントハンドラ登録関数
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwSetReceiveBinaryEventProc( _
        ByVal iPortNo As Short, _
        ByVal lTimeOut As Integer, _
        ByVal pReceiveBinaryEventProc As BinaryEventDelegate, _
        ByVal pParam As Integer, _
        ByVal lEvent As Integer) As Short
    End Function

    ' 電文データ受信イベントハンドラ登録関数
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwSetReceiveDataBCCEventProc( _
        ByVal iPortNo As Short, _
        ByVal iACKResponse As Short, _
        ByVal lTimeOut As Integer, _
        ByVal pReceiveBCCEventProc As ReceiveDataBCCEventDelegate, _
        ByVal pParam As Integer, _
        ByVal lEvent As Integer) As Short
    End Function

    ' 通信イベントハンドラ登録関数
    <DllImport("PCardRW32.dll")> _
    Private Shared Function crwSetCommEventProc( _
        ByVal iPortNo As Short, _
        ByVal pCommEventProc As CommEventDelegate, _
        ByVal pParam As Integer, _
        ByVal lEvent As Integer) As Short
    End Function


    'End Module
End Class
