Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between AxInterop and Interop?

Tags:

I've added an .ocx to the toolbox in VS. Two .dll's were created: Interop.NNN.dll, AxInterop.NNN.dll.

What is each one? Are they both required?

like image 411
Yaron Naveh Avatar asked Feb 18 '10 10:02

Yaron Naveh


2 Answers

Interop.xxx.dll and AxInterop.xxx.dll are runtime callable wrappers (RCW) for a referenced COM and an ActiveX dll respectively.

interop.xxx.dll is purely an automation (a COM dll) wrapper, enabling you to manipulate the object within the namespace of your application. AxInterop.xxx.dll is a control wrapper for a ActiveX control, which can be dragged onto the form.

like image 67
Adriaan Stander Avatar answered Oct 16 '22 05:10

Adriaan Stander


The AxFoo.dll assembly contains an automatically generated class that's derived from the System.Windows.Forms.AxHost control. It is pretty simple, it has methods, properties and events, the same ones you have available in the .ocx, that simply call the Foo.dll interop library.

So, yes, you definitely need to deploy both assemblies.

like image 27
Hans Passant Avatar answered Oct 16 '22 04:10

Hans Passant