An Unmanaged API to Access Assembly Metadata

Two methods to access the metadata with an assembly will be discussed. A third method, the Reflection API, is built on top of these two methods. Reflection will be covered in further detail in Chapter 17, “Reflection.”

Both of the APIs covered in this chapter do not require the .NET CLR. The first method only requires that the mscorwks.dll be installed correctly on your system. It is an unmanaged COM API, which is relatively easy to use. It is a lower level than the Reflection API, but after you understand the basics of how an assembly is laid out, the unmanaged API is not that hard to use.

Jim Miller of Microsoft termed the second method “heroic.” This method takes the assembly specification as submitted ...

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.