Microsoft has a responsibility to not abandon existing clients when shifting technologies. Supporting the new and the old often requires Microsoft to ship a huge volume of binaries with operating systems and tools like Windows and Visual Studio .NET. New competitors often aren't saddled with the need to support old clients , and these new competitors are quick to point out how much of a computer's resources Microsoft's tools seem to take. It is ironic that Microsoft's continued support of old and new technologies is used against the corporation in the media.
Recently my company switched ISPs. The new vendor didn't know how to adequately configure the Netopia router it provides for "free" with the service to work with my configuration, which included an Internet Security and Acceleration (ISA) server playing the role of firewall. I called Microsoft support to ensure that I had ISA configured correctly for Exchange, Internet Information Services, and the new router. (I understand that Netopia's router has a built-in firewall and Dynamic Host Configuration Protocol, or DHCP, server, to which I may switch at a later date.) Microsoft worked with me to double-check my ISA and Exchange configuration as well as troubleshoot problems with the Netopia router configuration. It turned out that I had missed a few settings on ISA and the router was configured incorrectly. Acting as advocate, Microsoft contacted the ISP and Netopia until we were able to find someone who really knew the Netopia router. The problem was eventually resolved; Microsoft hung in there for the duration when others gave up. The total cost of the service call was $241, which is slightly less than I paid the ISP to set up the router incorrectly. This kind of commitment to customer service makes Microsoft head and shoulders above many companies in many industries. (I work with a lot of vendors ”phone companies, cable providers, shippers, retailers, and many more ”and I find Microsoft's service to be second to none.)
Why did I take a paragraph to tell you all this? Because I want you to know that Microsoft's commitment to its customers includes that level of commitment to us, its developer customers.
Microsoft understands that there is a tremendous amount of money, time, and effort already invested in the Common Object Model (COM) technologies and that we need some continued support. The wheel has turned and a better overall solution has been engineered, but Microsoft hasn't forced us to abandon all our efforts. With COM Interop, .NET supports incorporating older COM code into newer .NET applications and even retrofitting new .NET code into COM-based applications. This means you can use your VB6 COM libraries in .NET, and if you want, you can incorporate .NET into VB6.
In this chapter I demonstrate how COM Interop supports using COM-based technologies with .NET and vice versa. From among the many issues related to this topic, I have selected to show you how to use COM in .NET and use .NET with COM, to explain how error handling is managed, and to talk about debugging and deploying mixed-mode applications.