Interop.xxx.dll和AxInterop.xxx.dll区别

在.Net中引用一个com组件的dll的时候,会生成一个Interop开头和AxInterop开头的的dll文件,这两个文件是怎么回事呢,有什么差别?

stackover上的解释如下:

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.

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.

参考资料:https://stackoverflow.com/questions/2287839/what-is-the-difference-between-axinterop-and-interop

猜你喜欢

转载自blog.csdn.net/ennaymonkey/article/details/80522002