Vb6调用C#生成的dll
2021-06-08 08:04
标签:vb6 ssl net img interface rar .com image uri 参考:https://blog.csdn.net/hrex/article/details/6936201 Vb6调用C#生成的dll 标签:vb6 ssl net img interface rar .com image uri 原文地址:https://www.cnblogs.com/edwardorchis/p/10703440.html
namespace ClassLibrary1
{
[ClassInterface(ClassInterfaceType.AutoDispatch)]?????//注意这行,这行是关键
??? public class Class1
{
public int add(int a, int b)
{
return (a + b);
}
}
}
Option Explicit
Private Sub Command1_Click()
Dim obj As Object
Set obj = CreateObject("ClassLibrary1.Class1")
Dim iRnt As Integer
iRnt = obj.Add(2, 3)
MsgBox iRnt
End Sub
上一篇:windows之电脑开机出现 this product is covered by one or more of the following prtents
下一篇:Win10安装和配置JDK