COM服务器 [英] COM Servers

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

问题描述

如何在C#VS 2003中编写COM服务器?我不敢相信,但我不能在b服务器的VS帮助中找到单词COM。是吗?
Microsoft再次重命名它还是VS C#无法处理任务?为什么有

我无法阅读?


谢谢,


glenn

How do you write a COM server in C# VS 2003? I can''t believe it but I can''t
even find the words COM in the help for VS related to COM servers. Did
Microsoft Rename it again or can VS C# not handle the task? Why is there
nothing available for me to read?

Thanks,

glenn

推荐答案

>你如何在C#VS 2003中编写COM服务器?我不能相信,但我不能
> How do you write a COM server in C# VS 2003? I can''t believe it but I can''t
甚至在VS的帮助中找到与COM服务器相关的单词COM。是吗?微软再次重命名,还是VS C#无法处理任务?为什么没有什么可供我阅读?
even find the words COM in the help for VS related to COM servers. Did
Microsoft Rename it again or can VS C# not handle the task? Why is there
nothing available for me to read?



因为C#是一个.NET语言,所以没有直接支持构建

COM服务器,你应该考虑.NET程序集。如果你不是坚持使用.NET,那么VS C ++仍然包含ATL框架,这可能是最全面的COM服务器组合方式。


Because C# is a .NET langauge, there isn''t direct support for building
COM servers, you should be thinking .NET assemblies. If you aren''t
going to stick to .NET, VS C++ still includes the ATL framework, which
is probably the most comprehensive way to put together COM servers.


所以要做到这一点。如果我想编写一个允许用另一种语言编写另一个程序的COM服务器,那么我不能使用C#?男孩

这会改变我对.NET的看法而非常显着....


谢谢,


glenn

Jason < JA *** @ nospam.com>在消息中写道

news:ua ************* @ TK2MSFTNGP09.phx.gbl ...
So to get this straight. If I want to write a COM server that would allow
someone writing another program in another language, I can not use C#? Boy
does this change my opinion of .NET rather dramatically....

Thanks,

glenn
"Jason" <ja***@nospam.com> wrote in message
news:ua*************@TK2MSFTNGP09.phx.gbl...
如何在C#VS 2003中编写COM服务器?我不敢相信,但是我的b $ b甚至在与COM服务器相关的VS的帮助中找不到单词COM。是吗?微软再次重命名,还是VS C#无法处理任务?为什么
没有什么可供我阅读?
How do you write a COM server in C# VS 2003? I can''t believe it but I can''t even find the words COM in the help for VS related to COM servers. Did
Microsoft Rename it again or can VS C# not handle the task? Why is there nothing available for me to read?


因为C#是.NET语言,所以没有直接支持构建COM服务器,你应该考虑.NET程序集。如果你不坚持使用.NET,VS C ++仍然包含ATL框架,这可能是整合COM服务器最全面的方式。


Because C# is a .NET langauge, there isn''t direct support for building
COM servers, you should be thinking .NET assemblies. If you aren''t
going to stick to .NET, VS C++ still includes the ATL framework, which
is probably the most comprehensive way to put together COM servers.





" Jason" < JA *** @ nospam.com>在消息中写道

news:ua ************* @ TK2MSFTNGP09.phx.gbl ...

"Jason" <ja***@nospam.com> wrote in message
news:ua*************@TK2MSFTNGP09.phx.gbl...
如何在C#VS 2003中编写COM服务器?我不敢相信,但我甚至不能在VS的帮助中找到与COM服务器相关的单词COM。是吗?微软再次重命名,还是VS C#无法处理任务?为什么没有什么可供我阅读?
How do you write a COM server in C# VS 2003? I can''t believe it but I
can''t
even find the words COM in the help for VS related to COM servers. Did
Microsoft Rename it again or can VS C# not handle the task? Why is there
nothing available for me to read?


因为C#是一个.NET语言,没有直接支持构建COM
服务器,你应该思考.NET程序集。如果你不打算坚持使用.NET,VS C ++仍然包含ATL框架,这可能是整合COM服务器最全面的方式。


Because C# is a .NET langauge, there isn''t direct support for building COM
servers, you should be thinking .NET assemblies. If you aren''t going to
stick to .NET, VS C++ still includes the ATL framework, which is probably
the most comprehensive way to put together COM servers.




C#是一种编程语言,因此不直接支持COM(也不是
做C ++),但这是由Framework和CLR处理的。这意味着

基本上每个托管类都可以作为COM类公开,确保你在暴露给本机COM客户端时必须遵守一些设计指南,但它''' s

完全可能并且完全支持并被框架广泛使用

和VS.


要OP,请检查MSDN库 -
http://msdn.microsoft.com/library/de...tcomserver.asp


和此:
http:// msdn .microsoft.com / library / de ... tcomserver.asp

和这个:

http://msdn.microsoft.com/library/de...tcomserver.asp


可以实现COM服务器通过从ServicedComponent派生而来,可以是暴露给COM客户端和.NET客户端的


检查:
http://msdn.microsoft.com/library/de ... ponents.aspfor 详细信息:Willy。



C# is a programming language, and as such doesn''t support COM directly (nor
does C++), but this is handled by the Framework and the CLR. That means that
basically each managed class can be exposed as a COM class, sure you have to
respect some design guidelines when exposing to native COM clients, but it''s
perfectly possible and fully supported and used extensively by the framework
and VS.

To OP, check the MSDN library -
http://msdn.microsoft.com/library/de...tcomserver.asp

and this:
http://msdn.microsoft.com/library/de...tcomserver.asp
and this:

http://msdn.microsoft.com/library/de...tcomserver.asp

COM servers can be implemented by deriving from ServicedComponent and can be
exposed to COM clients and .NET clients.
Check:
http://msdn.microsoft.com/library/de...ponents.aspfor details:Willy.


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

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