473,410 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Creating COM objects

Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks
Nov 16 '05 #1
9 1594
yes. use the regsvcs to package your .dot net component with a COM wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks

Nov 16 '05 #2
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as Visual
C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM wrapper.
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks


Nov 16 '05 #3
That's the whole point of building a COM component, isn't it?

Have a look at http://tinyurl.com/2w6o8 for further details.

Niki

"Relaxin" <me@yourhouse.com> wrote in
news:Ou**************@tk2msftngp13.phx.gbl...
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as Visual C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM

wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks



Nov 16 '05 #4
Yes. Im pretty new to COM/COM+ (you might see a post or two of a few COM+
problems I am having) so Im probably not the best person to go into great
detail with you.

However there are various rules youll need to follow such as signing your
assembly with a strong name (use sn to generate key pairs). There are also
several attributes and namespaces you will need to use -such as
System.EnterpriseServices, System.Runtime.InteropServices (ns) and
ClassInterface (attr) etc.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Ou**************@tk2msftngp13.phx.gbl...
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as Visual C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM

wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks



Nov 16 '05 #5
> That's the whole point of building a COM component, isn't it?
I'm new to .NET, but not to C++.

It's still unclear to what all the fuss about .NET is all about.

It seems to be moe complicated than it needs to be, with theses assembly
files and config files, etc.

I guess (I hope) it will become clear as I get more into .NET and C#.

But to answer your question, I don't know what the point is and I'm sorry if
my questions seem lame to you.
For all I know, if a COM object is written in .NET it can only be used by
..NET.
So those are the reasons why I asked my question.
"Niki Estner" <ni*********@cube.net> wrote in message
news:u4**************@TK2MSFTNGP11.phx.gbl...
That's the whole point of building a COM component, isn't it?

Have a look at http://tinyurl.com/2w6o8 for further details.

Niki

"Relaxin" <me@yourhouse.com> wrote in
news:Ou**************@tk2msftngp13.phx.gbl...
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as

Visual
C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM

wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
> Is it possible to CREATE (not use) COM objects with C#?
>
> If so, can you point in the right direction?
>
> Thanks
>
>



Nov 16 '05 #6
Your question wasnt lame Relaxin, Ive been doin .net now for about a year
and will hopefully be mcad v soon *but* still feel like a relative beginner
cos with .net there is just so much stuff to learn.

You mention that you are not sure of the point of .net, well I can
understand that. Its only when you start doing stuff (or more to the point
looking at other peoples code samples) that you think sh*t this is so easy
now. I can do stuff in dot net (c#) that would have taken me donkeys years
to learn in vb/com.
In other words I think one of the biggest benefits of dot net is
a. The massive class libraries
b. The common cross language interface to consume those libraries.

Today for instance I saw how easy it is (in win2000, xp, 2003) to send an
smtp email with only a few lines of code (and no third party bits or
pieces).

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
That's the whole point of building a COM component, isn't it?

I'm new to .NET, but not to C++.

It's still unclear to what all the fuss about .NET is all about.

It seems to be moe complicated than it needs to be, with theses assembly
files and config files, etc.

I guess (I hope) it will become clear as I get more into .NET and C#.

But to answer your question, I don't know what the point is and I'm sorry

if my questions seem lame to you.
For all I know, if a COM object is written in .NET it can only be used by
.NET.
So those are the reasons why I asked my question.
"Niki Estner" <ni*********@cube.net> wrote in message
news:u4**************@TK2MSFTNGP11.phx.gbl...
That's the whole point of building a COM component, isn't it?

Have a look at http://tinyurl.com/2w6o8 for further details.

Niki

"Relaxin" <me@yourhouse.com> wrote in
news:Ou**************@tk2msftngp13.phx.gbl...
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as

Visual
C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
> yes. use the regsvcs to package your .dot net component with a COM
wrapper.
>
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
> "Relaxin" <me@yourhouse.com> wrote in message
> news:Oy****************@TK2MSFTNGP12.phx.gbl...
> > Is it possible to CREATE (not use) COM objects with C#?
> >
> > If so, can you point in the right direction?
> >
> > Thanks
> >
> >
>
>



Nov 16 '05 #7
This is wrong, you need to register your classes with regasm.exe.
Regsvc is used to register a ComponentServices derived class as a COM+
component.

Willy.
"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM
wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks


Nov 16 '05 #8
Take a look at the msdn docs "COM interop Part1 C# Client tutorial" and
"Part2 C# Server tutorial".

Willy.
,
"Relaxin" <me@yourhouse.com> wrote in message
news:Ou**************@tk2msftngp13.phx.gbl...
So all you need to do is create a .net component and then wrap it with
regsvcs to create a COM object?
Can this COM object be used by other COM compliant languages, such as
Visual
C++?

Thanks

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM

wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
> Is it possible to CREATE (not use) COM objects with C#?
>
> If so, can you point in the right direction?
>
> Thanks
>
>



Nov 16 '05 #9
ooops sorry! Im going to throw this damn book in the bin :)

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...
This is wrong, you need to register your classes with regasm.exe.
Regsvc is used to register a ComponentServices derived class as a COM+
component.

Willy.
"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...
yes. use the regsvcs to package your .dot net component with a COM
wrapper.

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Relaxin" <me@yourhouse.com> wrote in message
news:Oy****************@TK2MSFTNGP12.phx.gbl...
Is it possible to CREATE (not use) COM objects with C#?

If so, can you point in the right direction?

Thanks



Nov 16 '05 #10

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

Similar topics

0
by: vande | last post by:
Hi, I am trying to create com objects in asp.net. The objects are getting created but the context in the object created is null. If I create the same object in asp the object is ok and the...
8
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
2
by: JJ L. | last post by:
Hello. I have a project that consists of nine different objects, each serving their own purpose. In the past I have just created a form for each one, and then whenever you call, say,...
5
by: Chris | last post by:
Hi, to create an array of 2 objects (e.g. of type '__gc class Airplane') I need to do : Airplane * arrAirplanes __gc = new Airplane* __gc; arrAirplanes = new Airplane("N12344"); arrAirplanes...
3
by: Ken Varn | last post by:
I am just starting the process of creating ASP.NET server controls. I have created controls for .NET applications, but have just started with ASP.NET. I am a little confused about some areas that...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
1
by: chris | last post by:
I know I've asked this before, but I didn't really get an answer and I bet it's because I didn't explain myself very well. Here goes again. I have this code: Dim arrData(intNoOfRows,...
5
by: fireball | last post by:
please help newbie I need to create a lot of objects the same type (let's say: schemas) I wish to use paramerized block in loop to do so. - how to put names of my objects to such control-flow? ...
31
by: JoeC | last post by:
I have read books and have ideas on how to create objects. I often create my own projects and programs. They end up getting pretty complex and long. I often use objects in my programs they are...
13
by: jkimbler | last post by:
As part of our QA of hardware and firmware for the company I work for, we need to automate some testing of devices and firmware. Since not everybody here knows C#, I'm looking to create a new...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.