我是目的是传给DLL一个空间(ExecOP中的第四个参数),DLL会放一些值在这个空间内,我要能够读取这个值!!

解决方案 »

  1.   

    试一下这样定义:
    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)))
      

  2.   

    同意楼上,要还不行就要检查其它参数了,strRetData参数的使用肯定是对的。
      

  3.   

    楼上应该可以了,若还不行,看看第一个参数,改为声明: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)))
      

  4.   

    回复人: load(不是东西) (  ) 信誉:100  2002-04-09 14:19:00  得分: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)) 
      

  5.   

    问题解决,采用是technofantasy(www.applevb.com) 的第二种方法!
    多谢三位!!!