RegAsm的真正作用是什么?文件在哪里复制? [英] What does RegAsm really do? Where are files copied?

查看:154
本文介绍了RegAsm的真正作用是什么?文件在哪里复制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个基于spicIE的IE插件,目的是连接到一些外部设备.

We have a plugin for IE based on spicIE, the purpose is to connect to some external devices.

为连接到这些外部设备,另一家公司开发了其令牌& DLL.我们需要一些ActiveX和DLL来通过令牌进行身份验证.

To connect to those external devices, another company developed their token & DLLs. We need to have some ActiveX's and DLL's to do authentication by token.

问题在于,我们为IE开发的插件最后有一个install.bat文件,该文件运行RegAsm并注册DLL,然后在IE中可以看到该插件(或其更改).

The problem is that the plugin we developed for IE, in final part have a install.bat file, that runs a RegAsm and registers the DLL and after that plugin (or its changes) is viewable in IE.

从IE运行插件时,我们的代码找不到身份验证所需的DLL(将其命名为x.dll). 注册的DLL在哪里复制?真的复制了吗?我需要在插件DLL所在的文件夹中有x.dll.

When running the plugin from IE, our code can not find some DLL, required for authentication (name it x.dll). Where is registered DLL copied? Is it really copied? I need to have x.dll in the folder where my plugin's DLL exists.

推荐答案

总而言之,RegAsm将您的.NET程序集注册为COM可见的.从MSDN:注册一个类后,任何COM客户端都可以使用该类,就好像该类是COM类一样.安装程序集后,该类仅注册一次.程序集内的类的实例只有在实际注册后才能从COM创建.

In a nutshell, RegAsm registers your .NET assembly to be COM-viewable. From MSDN: Once a class is registered, any COM client can use it as though the class were a COM class. The class is registered only once, when the assembly is installed. Instances of classes within the assembly cannot be created from COM until they are actually registered.

如果看不到ActiveX中的代码,如果我理解正确的话,您的ActiveX依赖于某些COM DLL,这就是为什么要针对.NET DLL运行RegAsm的原因.

Without seeing your code in ActiveX, if I understand you correctly, your ActiveX is dependent on some COM DLLs, which is why you are running RegAsm against a .NET DLL.

运行 RegDllView 来查找注册内容的详细信息,然后检查您是否确实实例化了实际上已注册的对象.

Run RegDllView to find the details of what is registered and then check if you are indeed instantiating that object which was in fact registered.

此外,如果仍然有问题,请尝试在VB6/Visual Studio 2010等中实例化该对象或在早期绑定中进行等效操作,以查看是否有任何问题.检查实例化错误.

Also, if you still have problems, try instantiating the object in VB6/Visual Studio 2010 etc. or equivalent in early binding to see if you have any problems. Examine the error on instantiation.

这篇关于RegAsm的真正作用是什么?文件在哪里复制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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