.Net C#COM服务器实现 [英] .Net C# COM server implementation

查看:86
本文介绍了.Net C#COM服务器实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须创建一个COM(是,这是必须的),并想使用C#和.net来编写它.

I have to make a COM (yes, it's a must) and want to write it using C# and .net

我的第一个问题是如何实现某个类别(例如,因此它被OLEVIEW列在某个组件类别中)?

My first problem is how to implement a certain category (e.g. so it is listed in a certain Component Category by OLEVIEW) ?

使它成为控制台应用程序时需要考虑的任何特殊事项(后来作为Windows服务,但如果可能,暂时不提供)?

Anything special to consider for making this an console app (later on as a windows service, but not for now if possible) ?

推荐答案

COM和.Net本质上是不同的.两者使用的Type系统,对象生存期管理等完全不同.

COM and .Net are inherently different. The Type systems used, object lifetime management etc are completely different in both.

但是,如果要创建COM服务器并让.Net客户端与之交互,则可以使用.Net COM互操作性来实现相同目的.有很多相同的文档.其中一些是以下

However if you want to create a COM server and have the .Net clients to interact with them, you can use the .Net COM interoperability to achieve the same. There are a lot of documentation available for the same. Some of them are the following 

https://msdn.microsoft.com/zh-CN/library/ms973800.aspx

https://msdn.microsoft.com/en-us/library/ms973800.aspx

https://msdn.microsoft.com/zh-CN/library/office/bb610378.aspx

https://msdn.microsoft.com/en-us/library/office/bb610378.aspx


这篇关于.Net C#COM服务器实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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