|
CorBindToRuntimeEx and ICLRRuntimeHostThe primary unmanaged function you'll use is CorBindToRuntimeEx. This function is used to initialize the CLR into a process and is therefore the first of the hosting APIs you're likely to call. One of the return parameters from CorBindToRuntimeEx is a pointer to an interface named ICLRRuntimeHostthe initial COM interface in the hosting API. I say "initial" because ICLRRuntimeHost is the first interface you'll use when hosting the CLR. Given an interface pointer of type ICLRRuntimeHost, you gain access to all the other hosting functionality provided by the API. Figure 2-1 provides a sampling of the breadth of functionality a CLR host can access given a pointer to the ICLRRuntimeHost interface. Figure 2-1. The CLR hosting interfaces as the gateway to the managed environment
Because of its role as the initial interface that hosts use to customize the CLR, ICLRRuntimeHost plays a part in every CLR host you'll write. As such, this interface will show up in one way or another in almost every chapter in this book. Table 2-1 provides an overview of the capabilities of ICLRRuntimeHost by briefly describing each method. The table also describes where in the book to look for more detail about each method.
|
|