注册com dll供vba使用 [英] Register com dll for use by vba

查看:475
本文介绍了注册com dll供vba使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常基本的问题。我开发了一个要从Access vba使用的comdll。在我的开发机上工作得很好。在测试机器上我得到

I have a very basic question. I have developed a com dll to be used from Access vba. Works great on my development machine. On a test machine I get the

"error -2147024894 (80070002) Automation Error
System can't find the specified file"

msg。

在设计视图中,dll被引用,所有对象和属性都显示在vba ide中。

When in design view the dll is referenced and all the objects and properties show up in the vba ide.

我想知道如果我使用错误regasm注册dll?我使用VS 2010在64位机器上开发。

I am wondering if I am using the wrong regasm to register the dll? I develop on a 64 bit machine using VS 2010.

我编译dll以在Framework 3.5中的x86上运行。我应该使用框架v2。 o.50727或Framework\v4.0.30319注册dll。不清楚我的区别是什么。是使用的版本决定的开发版本的VS还是编译的.NET版本?一个用于32位,另一个用于64位?

I compile the dll to run on x86 in Framework 3.5. Should I use the framework v2. o.50727 or Framework\v4.0.30319 to register the dll. Not clear to me what the difference is. Is the version used determined by the development version of VS or the .NET version you compile in? Is one used for 32 bit and the other for 64 bit?

我一直在争取这2天,并取得了一些进展,但不能得到的访问例程实际上设置的dll的运行时的实例。

I have been fighting this for 2 days and have made some headway but can't get the Access routines to actually set an instance of the dll in runtime.

感谢您提供任何协助。

推荐答案

.5,你应该使用那个regasm。但是,我认为您可能需要添加/ tlb和/ codebase开关,以生成您可以在vba应用程序中使用的类型库。然后你可以引用.tlb文件,你应该是金色的。

If you are compiling under v3.5, you should use that regasm. However, I think you might need to add the /tlb and /codebase switches to generate the type library that you can use in vba apps. You can then ref the .tlb file and you should be golden.

这篇关于注册com dll供vba使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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