8

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.

ahmad molaie
  • 1,408
  • 1
  • 21
  • 36

1 Answers1

8

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.

bluish
  • 23,093
  • 23
  • 110
  • 171
AshesToAshes
  • 876
  • 3
  • 14
  • 29
  • the situation is reverse, we need to instantiate the com/active x components in our managed code, our managed code can not find the com/active x components – ahmad molaie Apr 17 '12 at 09:08
  • 1
    Ahh ok. If these are classic COM components, then you should just be doing regsvr32 on them. After that, you should be able to add a reference in your VS .NET project, under the COM tab and instantiate. VS does all the hard work for you in the background in terms of type mapping etc. – AshesToAshes Apr 17 '12 at 09:28
  • 1
    Also just to add to that, there is good information here: http://stackoverflow.com/questions/635839/best-way-to-access-com-objects-from-c-sharp which should help you get started too. Again, try to instantiate it and examine the HRESULT/catch that comes out as you go along. – AshesToAshes Apr 17 '12 at 09:31