在.NET中使用VB6 DLL [英] Using a VB6 dll in .NET

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

问题描述

我有一个用VB6.0构建的dll



当我尝试在.NET中使用时,我收到的错误是CLSID(带有类ID值)发现。

我在我的机器上重新创建了dll。它工作。



问题是当我将我的应用程序移动到另一台机器时,错误被重现。如果我在该机器上重新创建dll,然后引用新创建的dll,它就可以了。再一次,我无法将代码带回到以前的机器上。



使用VB6 dll的理想方法是什么?它还会在引用时创建一个Interop dll。

I have a dll built in VB6.0

When I tried using in .NET, I was getting error as CLSID(with a class id value) not found.
I recreated the dll on my machine. It worked.

THe problem is when I move my application to another machine, the error is reproduced. If I recreate the dll on that machine and then refer th newly created dll, it works. Again, I cannot bring back the code to previous machine.

What is the ideal way to use a VB6 dll? It also creates an Interop dll while referring.

推荐答案

尝试在客户端计算机上注册VB dll,然后再试一次。

To注册,使用dos提示符下的RegSvr32命令。
Try to register the VB dll on the client machine and then try again.
To register, use the RegSvr32 command from the dos prompt.


嗨亲爱的,



1.你可以参考VB6 dll在.net中,但是有些时候由于VB6 Dll中使用了一些额外的普通函数而无法正常工作。

为此你可以在COM组件中转换该dll并且可以在.NET中使用。 />


2.请注意,如果dll直接引用.net,那么有时你必须在运行/构建程序之前使用regsvr32.exe注册该dll
hi dear,

1. you can give reference of VB6 dll in .net, but some time it is not working because of some extra ordinary funciton used in VB6 Dll.
For that you can convert that dll in COM component and you can use in .NET.

2. please note that if dll directly referenced into .net then sometimes you have have to registered that dll before run/build program by using regsvr32.exe


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

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