473,231 Members | 1,586 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,231 software developers and data experts.

What replace COM object in .NET?

Hi,
What is the substitute for COM objects in .NET?
How can I create something similar to com in .net?
Is it still possible?
Thank you

Jul 31 '05 #1
9 3074
WJ

"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
What is the substitute for COM objects in .NET?
..Net managed Classes
How can I create something similar to com in .net?
Click here to learn more:
http://msdn.microsoft.com/library/de...nunmancode.asp
Is it still possible?


Yes, just tells your .Net assembly it is OK to call unmanaged codes.

John

Jul 31 '05 #2
It's not really what replaces COM in .NET. .NET is a replacement for COM.
When you make a class in .NET, you have just made a .NET object.
"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
What is the substitute for COM objects in .NET?
How can I create something similar to com in .net?
Is it still possible?
Thank you

Jul 31 '05 #3
You can also make COM objects in .NET.

"Scott M." <s-***@nospam.nospam> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
It's not really what replaces COM in .NET. .NET is a replacement for COM.
When you make a class in .NET, you have just made a .NET object.
"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
What is the substitute for COM objects in .NET?
How can I create something similar to com in .net?
Is it still possible?
Thank you


Jul 31 '05 #4
Well no, not really. This discussion/debate has raged on for some time now,
but I fall down on the side of: You can not make COM objects in .NET. You
can create a wrapper class (COM Callable Wrapper) that wraps the actual .NET
component up and provides COM based interfaces to the .NET object, but the
object still runs within the context of the CLR.

Similarly, you can't make .NET objects from, say VB 6.0. What you can do is
create another type of wrapper class (a Runtime Callable Wrapper or RCW),
that exposes the COM object to the CLR with .NET interfaces. The COM object
still runs within the context of its own runtime (in VB 6.0's case,
MSVBVM60.dll).


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:u1**************@TK2MSFTNGP15.phx.gbl...
You can also make COM objects in .NET.

"Scott M." <s-***@nospam.nospam> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
It's not really what replaces COM in .NET. .NET is a replacement for
COM.
When you make a class in .NET, you have just made a .NET object.
"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hi,
> What is the substitute for COM objects in .NET?
> How can I create something similar to com in .net?
>
>
> Is it still possible?
>
>
> Thank you
>



Aug 1 '05 #5
Just to follow up on that:

Objects created in .NET, run within the context of the .NET Framework and
the CLR (Common Language Runtime). These objects are said to be "Managed
Assemblies" because the CLR is responsible for their memory
allocation/de-allocation, the exception throwing and handling of the object,
etc. The CLR is managing the object.

COM objects are said to be "Unmanaged Assemblies" because they are not
managed by the CLR under any circumstances. Their memory
allocation/de-allocation and the handling of throwing and catching
exceptions as well as the normal processing of their code is NOT managed by
the CLR.

Regardless of whether you use a COM object in .NET or a .NET object in COM,
the object will remain managed or unmanaged depending on what architecture
it was created in.

"Scott M." <s-***@nospam.nospam> wrote in message
news:ek***************@TK2MSFTNGP09.phx.gbl...
Well no, not really. This discussion/debate has raged on for some time
now, but I fall down on the side of: You can not make COM objects in
.NET. You can create a wrapper class (COM Callable Wrapper) that wraps
the actual .NET component up and provides COM based interfaces to the .NET
object, but the object still runs within the context of the CLR.

Similarly, you can't make .NET objects from, say VB 6.0. What you can do
is create another type of wrapper class (a Runtime Callable Wrapper or
RCW), that exposes the COM object to the CLR with .NET interfaces. The
COM object still runs within the context of its own runtime (in VB 6.0's
case, MSVBVM60.dll).


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:u1**************@TK2MSFTNGP15.phx.gbl...
You can also make COM objects in .NET.

"Scott M." <s-***@nospam.nospam> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
It's not really what replaces COM in .NET. .NET is a replacement for
COM.
When you make a class in .NET, you have just made a .NET object.
"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hi,
> What is the substitute for COM objects in .NET?
> How can I create something similar to com in .net?
>
>
> Is it still possible?
>
>
> Thank you
>



Aug 1 '05 #6
Interesting perspective. What is a COM object then? What is the difference
between creating COM object in VB6 or C++ and creating a wrapper in .NET?
The COM specification does not discuss implementation but rather then
interface for accessing the methods of some code library. It just accesses
the actual binary code through the use of fucntion tables, right?
"Scott M." <s-***@nospam.nospam> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl...
Well no, not really. This discussion/debate has raged on for some time now, but I fall down on the side of: You can not make COM objects in .NET. You can create a wrapper class (COM Callable Wrapper) that wraps the actual ..NET component up and provides COM based interfaces to the .NET object, but the
object still runs within the context of the CLR.

Similarly, you can't make .NET objects from, say VB 6.0. What you can do is create another type of wrapper class (a Runtime Callable Wrapper or RCW),
that exposes the COM object to the CLR with .NET interfaces. The COM object still runs within the context of its own runtime (in VB 6.0's case,
MSVBVM60.dll).


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:u1**************@TK2MSFTNGP15.phx.gbl...
You can also make COM objects in .NET.

"Scott M." <s-***@nospam.nospam> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
It's not really what replaces COM in .NET. .NET is a replacement for
COM.
When you make a class in .NET, you have just made a .NET object.
"gulu man" <gu*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hi,
> What is the substitute for COM objects in .NET?
> How can I create something similar to com in .net?
>
>
> Is it still possible?
>
>
> Thank you
>



Aug 1 '05 #7
This is why I said this topic has been discussed/debated for some time.

Because COM objects come with so much of their own "baggage" and rules and
..NET components do not come with that same "baggage" and rules and because
COM objects use a different runtime to process their code than .NET objects
do, I would say that a COM object is an object that *natively* exposes the
interfaces specified by the COM architecture. .NET objects do not NATIVELY
expose these interfaces.

Even when you create InterOp wrappers (either a CCW or an RCW), the *actual*
assembly does not change. All you've done is create a new assembly that
wraps the .NET assembly but places COM interfaces around the .NET object(s).
So, the .NET object(s) do not change in any way.


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
Interesting perspective. What is a COM object then? What is the
difference
between creating COM object in VB6 or C++ and creating a wrapper in .NET?
The COM specification does not discuss implementation but rather then
interface for accessing the methods of some code library. It just
accesses
the actual binary code through the use of fucntion tables, right?
"Scott M." <s-***@nospam.nospam> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl...
Well no, not really. This discussion/debate has raged on for some time

now,
but I fall down on the side of: You can not make COM objects in .NET.

You
can create a wrapper class (COM Callable Wrapper) that wraps the actual

.NET
component up and provides COM based interfaces to the .NET object, but
the
object still runs within the context of the CLR.

Similarly, you can't make .NET objects from, say VB 6.0. What you can do

is
create another type of wrapper class (a Runtime Callable Wrapper or RCW),
that exposes the COM object to the CLR with .NET interfaces. The COM

object
still runs within the context of its own runtime (in VB 6.0's case,
MSVBVM60.dll).


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:u1**************@TK2MSFTNGP15.phx.gbl...
> You can also make COM objects in .NET.
>
> "Scott M." <s-***@nospam.nospam> wrote in message
> news:et**************@TK2MSFTNGP12.phx.gbl...
>> It's not really what replaces COM in .NET. .NET is a replacement for
>> COM.
>> When you make a class in .NET, you have just made a .NET object.
>>
>>
>> "gulu man" <gu*****@gmail.com> wrote in message
>> news:11**********************@g43g2000cwa.googlegr oups.com...
>> > Hi,
>> > What is the substitute for COM objects in .NET?
>> > How can I create something similar to com in .net?
>> >
>> >
>> > Is it still possible?
>> >
>> >
>> > Thank you
>> >
>>
>>
>
>



Aug 1 '05 #8
Pretty interesting. I think following scenario will explain that nothing in
..NET can replace COM.

I needed to write a outlook add-in which will internally invoke few
webservices. I was preferring to write it as .NET component (as it is
webservices client) but it must implement COM interface IDTExtensibility2.

Now as I understand .NET component can not implement COM interface. So I'll
have to use something like VBA, VB or VC++/ATL, which might invoke .NET
compoenent to access WebServices. Eventually, to keep it simple, I decided
to use VC++/ATL com which itself will invoke WebServices.

Do you agree with this decision?

"Scott M." <s-***@nospam.nospam> wrote in message
news:eP**************@TK2MSFTNGP12.phx.gbl...
This is why I said this topic has been discussed/debated for some time.

Because COM objects come with so much of their own "baggage" and rules and
.NET components do not come with that same "baggage" and rules and because
COM objects use a different runtime to process their code than .NET objects do, I would say that a COM object is an object that *natively* exposes the
interfaces specified by the COM architecture. .NET objects do not NATIVELY expose these interfaces.

Even when you create InterOp wrappers (either a CCW or an RCW), the *actual* assembly does not change. All you've done is create a new assembly that
wraps the .NET assembly but places COM interfaces around the .NET object(s). So, the .NET object(s) do not change in any way.


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
Interesting perspective. What is a COM object then? What is the
difference
between creating COM object in VB6 or C++ and creating a wrapper in ..NET? The COM specification does not discuss implementation but rather then
interface for accessing the methods of some code library. It just
accesses
the actual binary code through the use of fucntion tables, right?
"Scott M." <s-***@nospam.nospam> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl...
Well no, not really. This discussion/debate has raged on for some time

now,
but I fall down on the side of: You can not make COM objects in .NET.

You
can create a wrapper class (COM Callable Wrapper) that wraps the actual

.NET
component up and provides COM based interfaces to the .NET object, but
the
object still runs within the context of the CLR.

Similarly, you can't make .NET objects from, say VB 6.0. What you can do
is
create another type of wrapper class (a Runtime Callable Wrapper or

RCW), that exposes the COM object to the CLR with .NET interfaces. The COM

object
still runs within the context of its own runtime (in VB 6.0's case,
MSVBVM60.dll).


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:u1**************@TK2MSFTNGP15.phx.gbl...
> You can also make COM objects in .NET.
>
> "Scott M." <s-***@nospam.nospam> wrote in message
> news:et**************@TK2MSFTNGP12.phx.gbl...
>> It's not really what replaces COM in .NET. .NET is a replacement for >> COM.
>> When you make a class in .NET, you have just made a .NET object.
>>
>>
>> "gulu man" <gu*****@gmail.com> wrote in message
>> news:11**********************@g43g2000cwa.googlegr oups.com...
>> > Hi,
>> > What is the substitute for COM objects in .NET?
>> > How can I create something similar to com in .net?
>> >
>> >
>> > Is it still possible?
>> >
>> >
>> > Thank you
>> >
>>
>>
>
>



Aug 5 '05 #9
No, I don't think you've quite got it. .NET components CAN, in fact, expose
themselves to COM via COM Callable Wrappers (CCW's). In VS .NET, go to the
project's properties and look at the "Build" category of choices. If you
check off "Register for COM InterOp", then when you compile the project, VS
..NET will generate a Type Library file (.tlb) for your .NET component. This
..tlb file is what you will need to make a project reference to from Outlook.

What we've been discussing here is whether the process I've just described
means that .NET can create COM objects. I say, "no", because that .tlb file
is nothing but a wrapper for the native .NET object that will still run
within the context of the CLR (oh yeah, you will need to have your target
machine loaded with the .NET Framework so the .NET component can run).

So, although .NET components can be *exposed* to COM via wrappers, they
remain .NET components because of where their actual code is processed (the
CLR and the .NET Framework).


"Vipul Taneja" <Vi*********@Hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Pretty interesting. I think following scenario will explain that nothing
in
.NET can replace COM.

I needed to write a outlook add-in which will internally invoke few
webservices. I was preferring to write it as .NET component (as it is
webservices client) but it must implement COM interface IDTExtensibility2.

Now as I understand .NET component can not implement COM interface. So
I'll
have to use something like VBA, VB or VC++/ATL, which might invoke .NET
compoenent to access WebServices. Eventually, to keep it simple, I decided
to use VC++/ATL com which itself will invoke WebServices.

Do you agree with this decision?

"Scott M." <s-***@nospam.nospam> wrote in message
news:eP**************@TK2MSFTNGP12.phx.gbl...
This is why I said this topic has been discussed/debated for some time.

Because COM objects come with so much of their own "baggage" and rules
and
.NET components do not come with that same "baggage" and rules and
because
COM objects use a different runtime to process their code than .NET

objects
do, I would say that a COM object is an object that *natively* exposes
the
interfaces specified by the COM architecture. .NET objects do not

NATIVELY
expose these interfaces.

Even when you create InterOp wrappers (either a CCW or an RCW), the

*actual*
assembly does not change. All you've done is create a new assembly that
wraps the .NET assembly but places COM interfaces around the .NET

object(s).
So, the .NET object(s) do not change in any way.


"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
> Interesting perspective. What is a COM object then? What is the
> difference
> between creating COM object in VB6 or C++ and creating a wrapper in .NET? > The COM specification does not discuss implementation but rather then
> interface for accessing the methods of some code library. It just
> accesses
> the actual binary code through the use of fucntion tables, right?
>
>
> "Scott M." <s-***@nospam.nospam> wrote in message
> news:ek*************@TK2MSFTNGP09.phx.gbl...
>> Well no, not really. This discussion/debate has raged on for some
>> time
> now,
>> but I fall down on the side of: You can not make COM objects in .NET.
> You
>> can create a wrapper class (COM Callable Wrapper) that wraps the
>> actual
> .NET
>> component up and provides COM based interfaces to the .NET object, but
>> the
>> object still runs within the context of the CLR.
>>
>> Similarly, you can't make .NET objects from, say VB 6.0. What you can do > is
>> create another type of wrapper class (a Runtime Callable Wrapper or RCW), >> that exposes the COM object to the CLR with .NET interfaces. The COM
> object
>> still runs within the context of its own runtime (in VB 6.0's case,
>> MSVBVM60.dll).
>>
>>
>>
>>
>> "Peter Rilling" <pe***@nospam.rilling.net> wrote in message
>> news:u1**************@TK2MSFTNGP15.phx.gbl...
>> > You can also make COM objects in .NET.
>> >
>> > "Scott M." <s-***@nospam.nospam> wrote in message
>> > news:et**************@TK2MSFTNGP12.phx.gbl...
>> >> It's not really what replaces COM in .NET. .NET is a replacement for >> >> COM.
>> >> When you make a class in .NET, you have just made a .NET object.
>> >>
>> >>
>> >> "gulu man" <gu*****@gmail.com> wrote in message
>> >> news:11**********************@g43g2000cwa.googlegr oups.com...
>> >> > Hi,
>> >> > What is the substitute for COM objects in .NET?
>> >> > How can I create something similar to com in .net?
>> >> >
>> >> >
>> >> > Is it still possible?
>> >> >
>> >> >
>> >> > Thank you
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Aug 6 '05 #10

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

Similar topics

1
by: Thomas | last post by:
It looks like the String.replace doesn't work in IE6.1. Anyone else has the same problem. I am using newest service package of IE and Win2K. Thanks
12
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. ...
4
by: Hardy Wang | last post by:
Hi: I have a XML like <?xml version="1.0" ?> <object> <comments>www.site.com/page.aspx?param1=value1&param2=value2</comments> </object> Since "&" is invalid in XML, I need to replace all "&"...
9
by: Crirus | last post by:
dim pp as string pp="{X=356, Y=256}{X=356, Y=311.2285}{X=311.2285, Y=356}{X=256, Y=356}{X=200.7715, Y=356}{X=156, Y=311.2285}{X=156, Y=256}{X=156, Y=200.7715}{X=200.7715, Y=156}{X=256,...
9
by: gulu man | last post by:
Hi, What is the substitute for COM objects in .NET? How can I create something similar to com in .net? Is it still possible? Thank you
12
by: Michael | last post by:
In PHP there is a function called str_replace (http://php.net/str_replace). Basically you can freed in two strings and a "subject" string. Then it goes through the subject string searching for...
1
by: fiaolle | last post by:
Hi The first set of source code is the class for a combobox in a grid, hopefully. In the second set of code we try to use the combobox class, but the grid is empty. I don't understand how this...
3
by: John Nagle | last post by:
I have XML replies in a DOM which contain entity escapes, like "&amp;". What's the proper way to replace them with the ordinary characters? Preferably something that will work in most browsers? I...
4
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.