COM Component

  • Thread starter Thread starter Plantex
  • Start date Start date
P

Plantex

Hello,

I have a DLL, created by VS .Net and written in C#.
I would like to create a COM component from this dll, 'cause I'd like
to call this component from a MSMQ Trigger...

How could I create create this COM component from the DLL?

Thank you

Plantex
 
Plantex said:
I have a DLL, created by VS .Net and written in C#.
I would like to create a COM component from this dll, 'cause I'd like
to call this component from a MSMQ Trigger...
How could I create create this COM component from the DLL?

Hi!
All classes defined as public in .NET are visible to COM by default. You may
change this
using ComVisibleAttribute.
To make the component visible by the COM clients you have to register it
using regasm tool.
This adds some entries to the windows registry and makes your component
visible as a COM.
To have an ability to use the component from non managed code (e.g. C++),
you need to create
a type library from your class library using tlbexp tool.
Then after importing the type library to unmanaged code usign the #import
directive you may
freely use the library as it is a COM library.

hope this helps
 
Back
Top