Unmanaged hosts use ICorRuntimeHost as the starting point for hosting the runtime. The initial pointer to this interface is obtained either by calling CoCreateInstance or by calling through the version-aware shim. To start a specific version of the Runtime, the host must go through the shim.
When calling CoCreateInstance, use a clsid of CLSID_CorRuntimeHost and an IID of IID_ICorRuntimeHost.
When calling through the shim, call CorBindToRuntime with an IID or IID_ICorRuntimeHost. See http://comrtime/specs/sbs/Startup%20Shim.doc for details.
ICorRuntimeHost is then used to configure and start the runtime and to create AppDomains in which to run code.
Managed hosts can create AppDomains directly.
The following picture shows the relationship between Win32 processes, AppDomains, Assemblies, and ICorRuntimeHost.
The process boundary in the picture is somewhat arbitrary. The unmanaged host could be in the same process with the managed hosting objects. The process boundary was included to emphasize the fact that a single process may contain multiple AppDomains