Convert assemblt to COM

B

bede

Hi All

I'm a bit confused by all this.
I am writing an api which needs to be a COM type so it can be accessed
with non managed code. I am not really sure how to progress.

Basically I have a solution which contains 2 projects. The first
project (P1) contains most of the meat with a large number of
namespaces while the other (P2) contains a single class which I want
to make the public interface. This project references the other.

How do I progress with this ?
I realise I have to use the regasm.exe to create a type library for
(P2) but what about the reference to the P1 ? What happens to this
dll ?

Can anyone point me in the right direction ?
 
F

Family Tree Mike

bede said:
Hi All

I'm a bit confused by all this.
I am writing an api which needs to be a COM type so it can be accessed
with non managed code. I am not really sure how to progress.

Basically I have a solution which contains 2 projects. The first
project (P1) contains most of the meat with a large number of
namespaces while the other (P2) contains a single class which I want
to make the public interface. This project references the other.

How do I progress with this ?
I realise I have to use the regasm.exe to create a type library for
(P2) but what about the reference to the P1 ? What happens to this
dll ?

Can anyone point me in the right direction ?

Both P1 and P2 will be running in .Net, so exposing P2 via COM is just
providing the interface so that COM can use your class. You will need to use
regasm as you said, but only with P2. P2 should use the "Register for COM
Interop" option on the build tab for the project properties, by the way. P1
just needs to be found following normal .net search rules.
 

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