试一下这样定义: Public Declare Function ExecOP Lib "dzdll.dll" _ (ByRef nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _ As String, ByVal strRetData As String) As Integer或者Public Declare Function ExecOP Lib "dzdll.dll" _ (ByRef nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _ As String, ByRef strRetData As Byte) As Integer调用的时候将Byte数组中的第一个字节传递过去: nResult = ExecOP(nInt(0), nComlen, strData, (strRD(0)))
同意楼上,要还不行就要检查其它参数了,strRetData参数的使用肯定是对的。
楼上应该可以了,若还不行,看看第一个参数,改为声明:Public Declare Function ExecOP Lib "dzdll.dll" _ (Byval nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _ As String, ByRef strRetData As Byte) As Integer调用:nResult = ExecOP(nInt(0), nComlen, strData, (strRD(0)))
Public Declare Function ExecOP Lib "dzdll.dll" _
(ByRef nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _
As String, ByVal strRetData As String) As Integer或者Public Declare Function ExecOP Lib "dzdll.dll" _
(ByRef nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _
As String, ByRef strRetData As Byte) As Integer调用的时候将Byte数组中的第一个字节传递过去:
nResult = ExecOP(nInt(0), nComlen, strData, (strRD(0)))
(Byval nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _
As String, ByRef strRetData As Byte) As Integer调用:nResult = ExecOP(nInt(0), nComlen, strData, (strRD(0)))
楼上应该可以了,若还不行,看看第一个参数,改为声明:Public Declare Function ExecOP Lib "dzdll.dll" _
(Byval nCmd As Integer, ByVal nComlen As Integer, ByVal strCommand _
As String, ByRef strRetData As Byte) As Integer调用:nResult = ExecOP(nInt(0), nComlen, strData, (strRD(0)))
楼上应该可以了,若还不行:调用:nResult = ExecOP(nInt(0), nComlen, strData, strRD(0))
多谢三位!!!