Adding References to COM Libraries

In some situations you might be required to use COM-type libraries in your .NET applications, a scenario also known as COM Interop. This should be rare, though, because .NET and COM are very different architectures, and they were not made to work together. However, Visual Studio 2015 enables you to add references to old libraries. To accomplish this, you need to select the COM tab in the Reference Manager dialog box. All the registered COM-type libraries are shown in the dialog box, and you can select the needed components (see Figure 3.5).

Image

FIGURE 3.5 Adding a reference to a COM component.

For example, say ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.