DMT.bas
资源名称:test.rar [点击查看]
上传用户:wuxg88
上传日期:2022-05-28
资源大小:814k
文件大小:2k
源码类别:
通讯编程
开发平台:
C++ Builder
- Attribute VB_Name = "DMT"
- '**********************************************************
- ' Function
- ' DMT.bas module for Visual Basic 6.0
- '
- ' Description:
- ' DMT Library VB application declare function module
- '
- ' History:
- ' Date Author Comment
- ' 5/01/2009 Anderson/Taoyuan I Version 2.0
- ' 10/01/2007 Anderson/Taoyuan I Version 1.1
- ' 8/01/2007 Anderson/Taoyuan I Version 1.0
- '**********************************************************
- ' DMT main function
- Declare Function OpenModbusSerial Lib "DMT.dll" (ByVal conn_num As Long, ByVal baud_rate As Long, ByVal data_len As Long, ByVal parity As Byte, ByVal stop_bits As Long, ByVal modbus_mode As Long) As Long
- Declare Sub CloseSerial Lib "DMT.dll" (ByVal conn_num As Long)
- Declare Function OpenModbusTCPSocket Lib "DMT.dll" (ByVal conn_num As Long, ByVal ipaddr As Long) As Long
- Declare Sub CloseSocket Lib "DMT.dll" (ByVal conn_num As Long)
- Declare Function RequestData Lib "DMT.dll" (ByVal comm_type As Long, ByVal conn_num As Long, ByVal slave_addr As Long, ByVal func_code As Long, ByRef buf As Byte, ByVal DataLen As Long) As Long
- Declare Function ResponseData Lib "DMT.dll" (ByVal comm_type As Long, ByVal conn_num As Long, ByRef slave_addr As Long, ByRef func_code As Long, ByRef buf As Byte) As Long
- Declare Function ReadSelect Lib "DMT.dll" (ByVal conn_num As Long, ByVal time_msec As Long) As Long
- Declare Function GetLastSerialErr Lib "DMT.dll" () As Long
- Declare Sub ResetSerialErr Lib "DMT.dll" ()
- Declare Function GetLastSocketErr Lib "DMT.dll" () As Long
- Declare Sub ResetSocketErr Lib "DMT.dll" ()