Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book


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.

  • + Share This
  • 🔖 Save To Your Account