Attribute VB_Name = "ecat_io" Public Declare Function EC_Open Lib ".\ecat_io.dll" (ByVal card As Integer, ByVal param As Integer) As Integer Public Declare Function EC_Close Lib ".\ecat_io.dll" (ByVal card As Integer) As Integer Public Declare Function EC_LoadEni Lib ".\ecat_io.dll" (ByVal path As String, ByVal card As Integer) As Integer Public Declare Function EC_DisconnectECAT Lib ".\ecat_io.dll" (ByVal card As Integer) As Integer Public Declare Function EC_ConnectECAT Lib ".\ecat_io.dll" (ByVal opt As Integer, ByVal card As Integer) As Integer Public Declare Function EC_Set_Digital_Chn_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByVal value As Integer, Optional ByVal card As Integer) As Integer Public Declare Function EC_Set_Digital_Port_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal chnBegin As Integer, ByVal lValue As Long, ByVal lMask As Long, ByVal card As Integer) As Integer Public Declare Function EC_Get_Digital_Chn_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByRef value As Integer, ByVal card As Integer) As Integer Public Declare Function EC_Get_Digital_Port_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal chnBegin As Integer, ByRef lValue As Long, ByVal card As Integer) As Integer Public Declare Function EC_Get_Digital_Chn_In Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByRef value As Integer, ByVal card As Integer) As Integer Public Declare Function EC_Get_Digital_Port_In Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal chnBegin As Integer, ByRef lValue As Long, ByVal card As Integer) As Integer Public Declare Function EC_Get_Analog_Chn_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByRef pValue As Long, ByVal count As Integer, ByVal card As Integer) As Integer Public Declare Function EC_Get_Analog_Chn_In Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByRef pValue As Long, ByVal count As Integer, ByVal card As Integer) As Integer Public Declare Function EC_Set_Analog_Chn_Out Lib ".\ecat_io.dll" (ByVal slaveNo As Integer, ByVal channel As Integer, ByRef pValue As Long, ByVal count As Integer, ByVal card As Integer) As Integer