What does RegAsm really do? Where are files copied?

落爺英雄遲暮 提交于 2019-12-22 05:01:11

问题


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

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.

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.

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.


回答1:


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.

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.

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.

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.



来源:https://stackoverflow.com/questions/10188067/what-does-regasm-really-do-where-are-files-copied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!