Using .NET Objects Within COM Projects

Now you are going to reverse the communication flow by using managed objects within a COM project. Although there are some differences expected, the process of using .NET Framework objects in COM is similar to the process you just completed in the last project. This time, you will be creating a type library based on the information contained within the .NET assembly of your managed application.

Rather than start from scratch, you are going to start with the project named ManagedInterfaces, which you created in Hour 17, “Managed Interfaces.” If you do not have that project, you can download the code for the book on the book's Web site.

Open the ManagedInterfaces project in Visual Studio .NET. Next, create ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours 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.