Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does RegAsm really do? Where are files copied?

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.

like image 882
ahmad molaie Avatar asked Apr 17 '12 08:04

ahmad molaie


1 Answers

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.

like image 194
AshesToAshes Avatar answered Nov 08 '22 21:11

AshesToAshes