AxInterop和互操作之间的区别是什么?区别、操作、AxInterop

2023-09-04 02:34:18 作者:十里红妆梦

我添加了一个.OCX到VS.工具箱 创建两个.dll文件的:Interop.NNN.dll,AxInterop.NNN.dll

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?

推荐答案

该AxFoo.dll组件包含从该System.Windows.Forms.AxHost控制派生的自动生成的类。这是pretty的简单,它有方法,属性和事件,同那些你可以在.OCX,即只需拨打Foo.dll互操作库。

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.