1.Create Classlibrary project in .Net, Add “Com Class”, ensure the project-level Register for COM Interop property is set to true, Sign the project, then build the project.
2. On deploy machine, regasm /tlb:TaxEngineWrapper.tlb TaxEngineWrapper.dll /codebase.
/codebase is optional, you can use gacutil /i c:\assemblyname.dll to install this DLL to GAC
REGASM /u MyAssembly.dll /tlb:MyAssembly.tlb
if you used the /tlb option to register a type library, you need to make sure you include the /tlb option when unregistering. If you don't, only the COM object is unregistered, but the type library is still registered. And you can't unregister the type library by itself.
Register in Code
Assembly asm = Assembly.LoadFile (@"c:\temp\ImageConverter.dll");
RegistrationServices reg = new RegistrationServices ();
reg.RegisterAssembly (asm, AssemblyRegistrationFlags.SetCodeBase);
3.You probably get error “Unable to generate a temporary class (result=1).”, then give the ASP.NET account access to the folder specified in error (C:\WINNT\Temp )
This error only happens when web page calling a DLL consume webservice.
Unable to generate a temporary class
more discussion
4. Call from VB6
Dim net As Object
Set obj = CreateObject("TaxEngineWrapper_TaxEngine")
or
Dim net As new TaxEngineWrapper_TaxEngine