Creating a .net com component
1) In your .net project, select project/properties/configuration properties
select the build tab and check the box "Register for COM Interoperability"
In the .NET class add the following attributes for VB.NET:
Declaration:
Imports System.Runtime.InteropServices
Above the class definition add the following attribute:
<comClass()>
Above each method call add the following attribute:
<comVisible(True)>
Build copmonent using RegAsm.exe:
RegAsm dllfilename.dll /codebase
1) Create a class library in VS choose whatever language you want either Vb.NEt or C#
2) Goto to Project Properties->ConfigurationProperties->build, check the Register for Com Interop checkbox. This creates the COM wrapper for your .NET assembly and hance need not use regasm.
3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.