【问题标题】:Read a vb.net dll array into my main project将 vb.net dll 数组读入我的主项目
【发布时间】:2020-01-04 00:30:24
【问题描述】:

我写了一个 vb.net DLL。 DLL 工作正常并在数组中创建一组变量

如何从调用dll的主项目中读取数组?

Example
   Tmp0(1) = Dg(5)   'Urb
   Tmp0(2) = Dg(6)   'Line 1
   Tmp0(3) = Dg(7)   'Line 2
   Tmp0(4) = Dg(100) 'Type of unit

  ''This is calling the DLL
   Dim direccion As New DirStd.DirScr(Tmp0)
   direccion.ShowDialog() 

  'The Tmp0 array goes fine to the DLL

  'but when I read it 
   Tmp0(9) = direccion.getDir()

我没有收到新值,只有我发送的值

请帮忙

爱丽儿

【问题讨论】:

    标签: vb.net dll


    【解决方案1】:

    我明白了。

       Dim direccion As New DirStd.DirScr(Tmp0)
       direccion.ShowDialog() 
    
       direccion.getDir(Tmp0)
       b = Tmp0(1)
       b1 = Tmp0(2)
       b2 = Tmp0(3)
       b3 = Tmp0(4)
    
    

    在 DLL 中

        Public Function getDir(ntmp())
            For i As Integer = 1 To 9 : ntmp(i) = dirV(i) : Next
            Return ntmp(9)
        End Function
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多