如何从.ocx文件动态实例化ActiveX控件? [英] How can I dynamically instantiate an ActiveX control from an .ocx file?
本文介绍了如何从.ocx文件动态实例化ActiveX控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个ActiveX控件的实例。给定C#中的.ocx文件和接口定义,我该怎么做?我不是指向项目添加引用的通常方式,因为我想避免在目标系统上全局注册控件的需要。
I would like to create an instance of an ActiveX control. Given the .ocx file and interface definitions in C#, how can I do this? I don't mean the usual way of adding a reference to the project because I want to avoid the need for registering the control globally on the target system.
推荐答案
看起来您应该查看免注册COM 。请注意,这在旧系统IIRC上无效。
This looks like you should check into Registration-free COM. Beware that this does not work on older systems IIRC.
有关详细信息/样品等,请参阅:
For some details/samples etc. see:
- http://msdn.microsoft.com/en- us / library / fh1h056h.aspx
- http://blogs.msdn.com/b/junfeng/archive/2006/04/20/579748.aspx
- < a href =http://apocryph.org/2010/05/23/getting-reg-free-com-activation-working-between-managed-and-unmanaged-dlls/ =nofollow> http:/ /apocryph.org/2010/05/23/getting-reg-free-com-activation-working-between-managed-and-unmanaged-dlls/
- http:// dotnetforum。 net / topic / 21006-manifest-resource-refference-in-c-net-application-com-reg-free-instantiation /
- http://www.codeproject.com/Articles/13391/Using-IFilter-in-C
- http://msdn.microsoft.com/en-us/library/fh1h056h.aspx
- http://blogs.msdn.com/b/junfeng/archive/2006/04/20/579748.aspx
- http://apocryph.org/2010/05/23/getting-reg-free-com-activation-working-between-managed-and-unmanaged-dlls/
- http://dotnetforum.net/topic/21006-manifest-resource-refference-in-c-net-application-com-reg-free-instantiation/
- http://www.codeproject.com/Articles/13391/Using-IFilter-in-C
这篇关于如何从.ocx文件动态实例化ActiveX控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文