- Referencing a COM Component in Visual Studio .NET
- Referencing a COM Component Using Only the .NET Framework SDK
- Example: A Spoken Hello, World Using the Microsoft Speech API
- The Type Library Importer
- Using COM Objects in ASP.NET Pages
- An Introduction to Interop Marshaling
- Common Interactions with COM Objects
- Using ActiveX Controls in .NET Applications
- Deploying a .NET Application That Uses COM
- Example: Using Microsoft Word to Check Spelling
This chapter discussed a bunch of topics that are essential for using COM components in .NET applications. In this chapter, you've seen how to reference COM components via Interop Assemblies generated by the type library importer. Primary Interop Assemblies were also introduced, so you should understand why they should be used whenever possible instead of generating your own Interop Assemblies.
You've also seen the main ways to create a COM object:
|With metadata:||new or Type.GetType + Activator.CreateInstance|
|Without metadata:||Type.GetTypeFromProgID or Type.GetTypeFromCLSID + Activator.CreateInstance|
You've also seen how to invoke a COM object's methods via its v-table, or by late binding. The next chapter examines Interop Assemblies in detail so you can gain a better understanding on what to expect when using any COM objects in managed code, and how it differs from using them in COM-based languages.