COM Interop (Visual Basic)

The Component Object Model (COM) allows an object to expose its functionality to other components and to host applications. Most of today's software includes COM objects. Although .NET assemblies are the best choice for new applications, you may at times need to employ COM objects. This section covers some of the issues associated with creating and using COM objects with Visual Basic.

In This Section

Introduction to COM Interop
Provides an overview of COM interoperability.

How to: Reference COM Objects from Visual Basic
Covers how to add references to COM objects that have type libraries.

How to: Work with ActiveX Controls
Demonstrates how to use existing ActiveX controls to add features to the Visual Studio Toolbox.

Walkthrough: Calling Windows APIs
Steps you through the process of calling the APIs that are part of the Windows operating system.

How to: Call Windows APIs
Demonstrates how to define and call the MessageBox function in User32.dll.

How to: Call a Windows Function that Takes Unsigned Types
Demonstrates how to call a Windows function that has a parameter of an unsigned type.

Walkthrough: Creating COM Objects with Visual Basic
Steps you through the process of creating COM objects with and without the COM class template.

Troubleshooting Interoperability
Covers some of the problems you may encounter when using COM.

COM Interoperability in .NET Framework Applications
Provides an overview of how to use COM objects and .NET Framework objects in the same application.

Walkthrough: Implementing Inheritance with COM Objects
Describes using existing COM objects as the basis for new objects.

Interoperating with Unmanaged Code
Describes interoperability services provided by the common language runtime.

Exposing COM Components to the .NET Framework
Describes the process of calling COM types through COM interop.

Exposing .NET Framework Components to COM
Describes the preparation and use of managed types from COM.

Applying Interop Attributes
Covers attributes you can use when working with unmanaged code.