Convert assemblt to COM

  • Thread starter Thread starter bede
  • Start date Start date
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 ?
 
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.
 
Back
Top