The Runtime Callable Wrapper

As has already been shown in earlier chapters, information about methods and properties, metadata, is stored in assemblies. With COM, the type library provides information to the caller about interfaces, properties, and methods. To call a COM method from .NET, a bridge needs to be formed to translate between the information contained in the type library and the metadata information required in a .NET application. This bridge in the case of .NET calling a COM component is the Runtime Callable Wrapper (RCW for short). Figure 8.1 shows how a .NET application interacts with a COM component through the RCW. For reference, this figure also shows how a “traditional” unmanaged application calls into a COM component.

Figure ...

Get .NET Common Language Runtime Unleashed 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.