COMClass example

COMClass example

Anonymous
Not applicable
749 Views
5 Replies
Message 1 of 6

COMClass example

Anonymous
Not applicable
I am trying to write a .NET dll that I can call from my AutoCAD 2007 VBA
code.
I understand I need a special class to expose the .NET dll to COM. This
class is apparently a COMClass.
I have been unable to find "good" examples of this.
Is this a class named "COMClass"?

I also read that there are some other issues to deal with like exposing
properties, methods and events to COM.

Does anyone have an example they would share?

=Mark
0 Likes
750 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Ok, let me re-phrase that.

What should I have read before I asked such a lame question?
0 Likes
Message 3 of 6

Anonymous
Not applicable
Try this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Dan
0 Likes
Message 4 of 6

Anonymous
Not applicable
http://msdn.microsoft.com/netframework/programming/classlibraries/understandinginteroperability/

"Mark Johnston" wrote in message
news:[email protected]...
I am trying to write a .NET dll that I can call from my AutoCAD 2007 VBA
code.
I understand I need a special class to expose the .NET dll to COM. This
class is apparently a COMClass.
I have been unable to find "good" examples of this.
Is this a class named "COMClass"?

I also read that there are some other issues to deal with like exposing
properties, methods and events to COM.

Does anyone have an example they would share?

=Mark
0 Likes
Message 5 of 6

Anonymous
Not applicable
Dan,
That article is
Calling COM Components from .NET Clients
which is the opposite of what I want to do. I'm trying to call a .NET
component from a COM client.

=Mark
wrote in message news:[email protected]...
Try this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Dan
0 Likes
Message 6 of 6

jbooth
Advocate
Advocate
Most of the information I used to learn COM interop was through the Visual Studio local help documentation.

This should help though: http://www.codeproject.com/vb/net/MusaExposingCOM.asp
0 Likes