vb 问题,我有两个dll同名不同版(里面的一个函数名不同),我想根据需要来调用其中的一个,怎么实现?
问题描述:
dll是注册后直接调用的
Private Sub Form_Load()
Me.Show
Dim myt As New remote.Class1 '声明
Dim a, b, c As Double
a = 3: b = 7
c = myt.test(a, b) '另一个dll中的函数名为test1()
Print c
End Sub
本的新手求大神帮帮!
答
CallByName(对象, "字符串形式的函数名", 参数, ... )
你的问题也可以直接if判断,如果知道函数名只有test test1两种的话。