Visual Basic 6
Visual Basic is a third-generation event-driven programming language and Integrated Development Environment (IDE) from Microsoft for its COM programming model. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions for those components and writing additional lines of code for more functionality.
It's mainly for thick client applications.
The application is targeted towards Windows registries, not assemblies.
.Net
A Microsoft operating system platform that incorporates applications, a suite of tools and services and a change in the infrastructure of the company's Web strategy. The .NET Framework supports building and running of the next gen of applications and XML Web services.
It will support both thick and thin client applications.
The applications are targeted towards assembly.
Use .Net components to VB6 applications
.Net COM enables component
Build the component as a COM visible one.

Code part
- [ComVisible(true),
- GuidAttribute("137AD71F-4657-4362-B9E4-C6D734F1F530")]
- [InterfaceType(ComInterfaceType.InterfaceIsDual)]
- public interface IGetMyString
- {
- string GetMyString();
- }
- [ComVisible(true),
- GuidAttribute("89BB4535-5A89-43a0-89C5-19A4697E5C5C")] [ClassInterface(ClassInterfaceType.None)]
- public class Class1 : IGetMyString
- {
- string GetMyString()
- {
- }
- }

Build
Now build the component.
In the Bin folder you will get a .dll, a .tlb and a .pdb file.
If suppose the tlb is not available then use the following command line in your Visual Studio command prompt.
- tlbexp myTest.dll /out: myTest.tlb
Run with the default command line. Regasm does the following two main things to register an assembly:
- It creates COM registration entries that register the Class Guids. These are the entries in HKCR\CLSID\{Your Guid} that allow COM client programs to find your classes and your assembly, either by ProgId or by your Class Guid.
- It creates type library information from the assembly's metadata and registers that type library information. These registry entries are in HKCR\Interface\{Your interface Guid}.
Refer the .tlb file in the VB6 developer tool as the reference.
Create the instance in the VB6 file. Now you can access the features.

Ian BrookePosted Jul 13, 2020, 12:28 PM
This would be really useful for something I need to do. Unfortunately the images are much too small to read and if I save and expand them they are too blurred.
Tom MohanPosted May 2, 2015, 11:40 AM
useful
NitinPosted May 1, 2015, 3:27 AM
nice
Santhakumar MunuswamyPosted Apr 30, 2015, 4:10 PM
Thanks for nice article
Sam HobbsPosted Apr 30, 2015, 3:39 PM
Thank you Thavaselvan for making this so easy for everyone. Note that it is not actually Regasm that creates COM registration entries and type library information, Regasm just executes a function in the DLL that does all that. It is the DLL itself that does the work.