Apr
27
This is quite well documented across the web, but nevertheless here is a set of notes that I find useful and keep referring back to:
To expose a COM Interface from a .NET Type Library so it can be called from(e.g.) VB6 or a classic ASP page we need to:
- Ensure assembly GUID is assigned, e.g:
- Ensure COMVisible attribute is True:
- Check the project option “Register for COM interop”
- Put a GUID attribute on the class, e.g
- Ensure you have the namespace declaration:
- Register using Regasm.exe
- If using VB6 Application, reference .TLB
[assembly: Guid("dde7717b-2b75-4972-a4eb-b3d040c0a182")]
[assembly: ComVisible(true)]
[GuidAttribute("4df74b15-d531-4217-af7e-56972e393904")]
using System.Runtime.InteropServices;
See the following for more details:
http://bytes.com/groups/net-c/269199-calling-c-component-classic-asp
[...] component would have to expose a COM Interface and be registered using REGASM, which would requrie manual intervension in the shipping [...]