Creating Interface definitions in type libraries
Sometimes, an interface has to be distributed across a large number of development environments. We all know how distributing the pure source code may be less of an option, so compiling the interface into a type library could prove a good solution. In this article, I will show you how.
Author: Jens G. Balchen

Before you start

In the previous two how-to's, I've discussed the importance of creating interface, and how you can take advantage of them in development. In this how-to, I will show you how you can distribute your interfaces to other developers without having to distribute source code. If you haven't already read the other how-to's, this is a great time to do so.

How to create Type Libraries

There is no "Create type library" command in Visual Basic, and at first glance, there is no way of telling VB to compile it at all. However, if you go to Project properties -- Components, you will see a checkbox titled "Remote Server Files". If this box is checked, Visual Basic will create a type library file when you compile your component.

The type library file will be placed in the same folder as the executable or DLL, and will be named .tlb. In the Project -- References dialogue, you can Browse to this file and add it to your project like any other reference.