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

本文解释了在.NET中使用COM组件时生成的Interop.xxx.dll和AxInterop.xxx.dll的区别。Interop.xxx.dll为纯COM库封装,允许在应用程序命名空间内操作对象;而AxInterop.xxx.dll则是ActiveX控件的封装,可以直接拖放到窗体上使用。
摘要由CSDN通过智能技术生成

在.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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值