从.NET DLL调用VB6方法 [英] Calling a VB6 method from a .NET DLL

查看:150
本文介绍了从.NET DLL调用VB6方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用VB 6编写的DLL,另一个用Visual Studio 2005(VB.NET)编写的DLL。



现在我想调用VB的方法DLL从我的.NET DLL。我该怎么办?
任何想法?

解决方案

由于VB6创建COM DLL,Visual Studio应该没有问题为您生成一个interop存根。只需通过在Visual Studio中选择添加引用并在COM选项卡下查找DLL,从.NET项目中添加对VB6 DLL的引用。在此之前,请确保VB6 DLL 已在您的计算机上注册


I have a DLL written in VB 6 and another DLL written in Visual Studio 2005 (VB.NET).

Now I want to invoke the method of the VB DLL from my .NET DLL. What should I do for this? Any thoughts?

解决方案

As VB6 creates COM DLLs, Visual Studio should have no problems generating an interop stub for you. Simply add a reference to the VB6 DLL from your .NET project by selecting Add Reference in Visual Studio and finding your DLL under the COM tab. Make sure the VB6 DLL is registered on your machine before you do this.

这篇关于从.NET DLL调用VB6方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆