Using a C# component from within VB6 (none .net)

D

Dirk B

I would like to know if the following is possible:

create a component using C# or VB.NET -> component will use the
..netframework v2
create a VB (NONE .net) COM object that uses the above created component

And if this is possible are their any pitfalls that we should be aware off?



Dirk.
 
B

Ben Voigt [C++ MVP]

Dirk B said:
I would like to know if the following is possible:

create a component using C# or VB.NET -> component will use the
.netframework v2
create a VB (NONE .net) COM object that uses the above created
component

It is possible, .NET objects can be used from COM.
And if this is possible are their any pitfalls that we should be aware
off?

The first such component loaded into the process will determine the .NET
runtime version used for all subsequent components.
 
D

Dirk B

Thanks for the answer.
Can this .NET component also be used from within a VB6 application/service
(instead of from a COM written in VB6)?



dirk.
 
B

Ben Voigt [C++ MVP]

Dirk B said:
Thanks for the answer.
Can this .NET component also be used from within a VB6 application/service
(instead of from a COM written in VB6)?

Should work, same concern if mixing components from different versions of
..NET

VB6 uses COM natively, not just for COM servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top