Chapter 7. Modifying Interop Assemblies

In This Chapter

How to Change an Assembly’s Contents

IL Assembler Syntax

Changing Data Types

Exposing Success HRESULTs

Arrays

Custom Attributes

Adding Methods to Modules

We’ve seen in previous chapters that an Interop Assembly produced by the type library importer might not always be appropriate for the COM component you wish to use. This chapter describes a relatively easy way to modify the metadata inside an Interop Assembly to suit your needs. You’ll see examples of the types of changes that can be made, and the types of changes that typically need to be made. Such changes are desirable or even necessary for a variety of reasons, which fall into three main categories:

• Limitations ...

Get .NET and COM: The Complete Interoperability Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.