使用.NET COM在VB6 [英] Use .NET COM in vb6

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

问题描述

在VB6中使用.NET COM林遇到了麻烦,它编译确定,我使用regasm注册,添加对它的引用在VB6的项目,它甚至有智能感知。但是,当我试图让做一个实例它给了我一个自动化错误。任何一个可以帮助?

Im having trouble using a .NET COM in vb6, It compiles ok and I use regasm to register it, add a reference to it in the vb6 project, it even has intellisense. But when I try to make make an instance it gives me an 'Automation Error'. Any one can help?

在此先感谢。

推荐答案

您可能需要确保您的.NET程序集是在VB6应用程序的目录,或者如果调试VB6的IDE,他们是在VB6.EXE目录

You probably need to make sure your .NET assemblies are in the VB6 application's directory, or if debugging in the VB6 IDE that they are in the VB6.exe's directory.

有可能使COM互操作与.NET程序集的工作更像是COM的DLL(见的 regasm ),但在默认情况下,.NET程序集搜索以通常的方式 - 即在GAC或应用程序目录 - 通过COM互操作使用时也是如此。

It is possible to make COM interop with .NET assemblies work more like COM dlls (see the codebase option of regasm) but by default, .NET assemblies are searched for in the usual way - ie in the GAC or application directory - even when used via COM interop.

有一个非常简单的方式来获得了解自己的组件应该是使用Sysinternals公司的 Filemon的工具。

A really simple way to get insight into where your assembly should be is by using sysinternals filemon utility.

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

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