使用C#重新创建接口 [英] recreating interface using c#

查看:165
本文介绍了使用C#重新创建接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我得到了.c.h文件,其中包含COM对象的接口信息.该文件是从ATL模板生成的,然后我想将其转换为.net环境用法的托管代码.
任何人都可以给我一些指导或示例,或者可以分享的相关链接,以获取一些意见和评论.如果您拥有该COM对象的可执行文件,那么您真正要做的就是在项目中为其添加引用",VS会注意产生一个COM互操作包装器.

希望有帮助.

干杯,

曼弗雷德(Manfred)


Hello all,

I''m given the .c and .h file which was contained information of interfaces of COM object. The file was generated from the ATL template, Then i suppose to convert it into managed code for .net environment usage.
Anyone could give me some guidance or example or related link those can be shared, Just to get some opinion and comment. Thanks

解决方案

If you have the executable for that COM object all you really have to do is add a "Reference" to it in your project and VS will take care to produce a COM interop wrapper.

Hope that helps.

Cheers,

Manfred


这篇关于使用C#重新创建接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆