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

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

问题描述

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

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

现在我想从我的 .NET DLL 调用 VB DLL 的方法.我应该怎么做?有什么想法吗?

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

推荐答案

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

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天全站免登陆