VB调用C++编写的dll,当函数参数为数组时该如何调用?

2025-04-28 04:40:15
推荐回答(1个)
回答1:

Private Declare Function c_Test Lib "c:\collision.dll" (ByRef a As Single, ByRef a_0 As Single) As Long
Private Sub Command1_Click()
Dim b(7) As Single
Dim b_0(7) As Single
For i = 0 To 7
b(i) = 1
b_0(i) = 1
Next i
Label1.Caption = c_Test(b(0), b_0(0))
End Sub