SgDotNet
Singapore Professional .NET User Group -For Cool Developers

creating COM component using vb.net

rated by 0 users
This post has 2 Replies | 2 Followers

Top 500 Contributor
Posts 2
beckbapegeneral Posted: 05-09-2006 11:40 PM

hi, anyone here knows how to create COM component using vb.net instead of c#?

Top 10 Contributor
Posts 2,284
It is essentially the same way as you would with a C# project. Assuming you are using VS.NET, reference to COM library in the (VB.NET) project. Import the COM namespace and instantiate its RCW as usual.

Imports COM.Library.Namespace

Dim myComObject As New COMType(what, ever, parameters)

The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

Top 10 Contributor
Posts 1,626

You need to do 2 things.

1. Sign your assembly with a strong name.

2. Inherit your class from System.EnterpriseServices.ServicedComponent.

When you execute your code in XP, your components should be self registered. In Windows 2000, you may need to register it yourself.

For in-depth information, read here.

Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Page 1 of 1 (3 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems