473,670 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COM Servers

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
Nov 17 '05 #1
12 1652
> 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?

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.
Nov 17 '05 #2
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.c om> wrote in message
news:ua******** *****@TK2MSFTNG P09.phx.gbl...
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?

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.

Nov 17 '05 #3

"Jason" <ja***@nospam.c om> wrote in message
news:ua******** *****@TK2MSFTNG P09.phx.gbl...
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?

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# 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 ServicedCompone nt and can be
exposed to COM clients and .NET clients.
Check:
http://msdn.microsoft.com/library/de...ponents.aspfor details:Willy.

Nov 17 '05 #4
Yes it's true there is no direct support for building COM components, but
there is a rich interop layer in .NET which allows communication in both
directions between .NET and COM components (albeit with a few limitations
and perhaps performance overhead compared with pure COM).
Some links here covering basic principles:
http://msdn.microsoft.com/vstudio/us...p/default.aspx

There is also COM+/EnterpriseServi ces, which provides another attractive
alternative for integrating with COM (especially looking forward to
"Longhorn/Indigo").
Take a look at System.Enterpri seServices namespace in the .NET framework.

As for terminology - roughly speaking COM+MTS became COM+ which became
component-services/enterprise-services in today's terminology.

Nov 17 '05 #5

"glenn" <gh******@softe ksoftware.com> wrote in message
news:OF******** ******@TK2MSFTN GP12.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


Sure you can, .NET makes it easier than before to write COM components, see
my other reply.
And if you are looking for some real good readings consider these (in order
of my personal preferences):

http://www.amazon.com/exec/obidos/AS...344360-6822569

http://www.amazon.com/exec/obidos/tg...=UTF8&v=glance

http://www.amazon.com/exec/obidos/tg...=UTF8&v=glance

Willy.
Nov 17 '05 #6
Thank you very much. Jason had me a little worried for a second there...

glenn
"glenn" <gh******@softe ksoftware.com> wrote in message
news:eX******** ******@TK2MSFTN GP10.phx.gbl...
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

Nov 17 '05 #7
How much of a performance hit? I am use to writing my COM servers in
Borland Delphi. Are my components written in C# going to be drastically
slower?

Thanks,

glenn
"richlm" <ri****@nospam. nospam> wrote in message
news:ej******** ******@TK2MSFTN GP09.phx.gbl...
Yes it's true there is no direct support for building COM components, but
there is a rich interop layer in .NET which allows communication in both
directions between .NET and COM components (albeit with a few limitations
and perhaps performance overhead compared with pure COM).
Some links here covering basic principles:
http://msdn.microsoft.com/vstudio/us...p/default.aspx

There is also COM+/EnterpriseServi ces, which provides another attractive
alternative for integrating with COM (especially looking forward to
"Longhorn/Indigo").
Take a look at System.Enterpri seServices namespace in the .NET framework.

As for terminology - roughly speaking COM+MTS became COM+ which became
component-services/enterprise-services in today's terminology.

Nov 17 '05 #8
> How much of a performance hit? I am use to writing my COM servers in
Borland Delphi. Are my components written in C# going to be drastically
slower?


Here are my thoughts:
1 - You could continue using Delphi to write your COMs
2 - C# + COM => Interop call. This can be very expensive if there are
many many calls!

--

----------------------------------------------

http://michael.moreno.free.fr/

Nov 17 '05 #9
Problem is I would eventually like to get to a single programming language
for this project. I don't want to have to continue to program in 2
languages and as it stands its starting to look like Delphi might be the
best choice. It seems to generate much faster code, has a much better IDE
with lots more components, manages code a lot better, and the data access
elements of the language are far better designed and thought out than it
appears have been done in VS2003. One reason I'm holding off is I want to
see if any of these items have been addressed in VS2005 but I have no idea
how long that wait is going to be.

And it also sounds like the COM elements of it are going to be the same
which means any interfaces I write that I need to share with other companies
are going to run much slower than if written in Delphi.

This is very disappointing.. .

glenn
"Michael Moreno" <ab*@abc.abc> wrote in message
news:mn******** *************** @abc.abc...
How much of a performance hit? I am use to writing my COM servers in
Borland Delphi. Are my components written in C# going to be drastically
slower?


Here are my thoughts:
1 - You could continue using Delphi to write your COMs
2 - C# + COM => Interop call. This can be very expensive if there are
many many calls!

--

----------------------------------------------

http://michael.moreno.free.fr/

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6217
by: Meghna | last post by:
Hi, I was wondering if some one would be able to help me with this. I am trying to share a session across two servers and I seem to be experiencing some problems. I was wondering if anybody has already tried something like this before and hence be able to provide some guidance in this regard. Any suggestions, pointers or redirections to useful links is welcome. Thanks in advance for your help,
10
2271
by: Captain Ranger McCoy | last post by:
Hello! Suppose I have ten servers at ten ips: x.x.x.1 x.x.x.2 x.x.x.3 x.x.x.4 and so on Each server hosts 100+ photo galleries, all under a single domain name,
2
2890
by: D Barry | last post by:
Greetings: I am trying to conceive what risks might be created by running multiple SQL servers within a domain under a single domain account, as opposed to 1) running under the local service account or 2) multiple domain service accounts. In this case, all the SQL servers are SQL2000 running on Win2003. The service account is assigned only to the "Domain Users" group.
5
5467
by: Oliver Braun | last post by:
I know this is a very common issue and I found a lot of hints on this topic in www but I did not find a very good solution for this task. Most of the solutions use SQLDMO to list all sql servers in the network like this C# code: public static string GetAvailableSQLServers() { // declare arraylist to hold results ArrayList servers = new ArrayList();
3
3983
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked to set it up on multiple servers. The problem is that when someone uploads a file, how do I distribute it to all of the servers? Should I use php to send it to all of the servers once
1
11129
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes, Reservations, Exclusions, Options and so forth. Since the dll...
0
12351
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes, Reservations, Exclusions, Options and so forth. Since the dll that is used was written several years ago by Microsoft, you cannot manage things on the DNS tab when looking at a reservation and few things such as that however it gives you main things you...
13
8660
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need a login to show data. I want the user to login only once when he visits any of my domains.
1
1117
vvsvinu
by: vvsvinu | last post by:
Iam a sys admin in a firm and iam asked to give a configuration list of a server profile. As there are a lot of new servers now a days and also from the net i got some information still iam confused with it. About my organization iam having 200 systems connected on lan network of which 50 systems use internet connection. Most of the systems use Linux as we recommend them to be used. Currently we are using a centerlized concept with 2 ISPs...
2
1432
vvsvinu
by: vvsvinu | last post by:
Iam a sys admin in a firm and iam asked to give a configuration list of a server profile. As there are a lot of new servers now a days and also from the net i got some information still iam confused with it. About my organization iam having 200 systems connected on lan network of which 50 systems use internet connection. Most of the systems use Linux as we recommend them to be used. Currently we are using a centerlized concept with 2 ISPs...
0
8471
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7421
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4393
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2802
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1795
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.