.NET

Reply
*Mark Johnston
Message 1 of 6 (93 Views)

COMClass example

93 Views, 5 Replies
07-15-2006 04:03 PM
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
*Mark Johnston
Message 2 of 6 (93 Views)

Re: COMClass example

07-18-2006 08:40 AM in reply to: *Mark Johnston
Ok, let me re-phrase that.

What should I have read before I asked such a lame question?
Distinguished Contributor
dmarcotte4
Posts: 195
Registered: ‎04-02-2005
Message 3 of 6 (93 Views)

Re: COMClass example

07-18-2006 07:42 PM in reply to: *Mark Johnston
Try this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Dan
*Paul Richardson
Message 4 of 6 (93 Views)

Re: COMClass example

07-18-2006 08:09 PM in reply to: *Mark Johnston
http://msdn.microsoft.com/netframework/programming/classlibraries/understandinginteroperability/

"Mark Johnston" wrote in message
news:5238322@discussion.autodesk.com...
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
*Mark Johnston
Message 5 of 6 (93 Views)

Re: COMClass example

07-19-2006 09:46 AM in reply to: *Mark Johnston
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:5241033@discussion.autodesk.com...
Try this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Dan
Distinguished Contributor
jbooth
Posts: 223
Registered: ‎02-17-2006
Message 6 of 6 (93 Views)

Re: COMClass example

07-19-2006 10:45 AM in reply to: *Mark Johnston
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.