ICLRMetaHost Interface
Provides methods that return a specific version of the common language runtime (CLR) based on its version number, list all installed CLRs, list all runtimes that are loaded in a specified process, discover the CLR version used to compile an assembly, exit a process with a clean runtime shutdown, and query legacy API binding.
Methods
Method |
Description |
---|---|
Returns an enumeration that contains a valid ICLRRuntimeInfo interface pointer for each CLR version that is installed on a computer. |
|
Returns an enumeration that contains a valid ICLRRuntimeInfo interface pointer for each CLR that is loaded in a given process. This method supersedes GetVersionFromProcess. |
|
Attempts to shut down all loaded runtimes gracefully and then terminates the process. Supersedes the CorExitProcess function. |
|
Gets the ICLRRuntimeInfo interface that corresponds to a particular CLR version. This method supersedes the CorBindToRuntimeEx function used with the STARTUP_LOADER_SAFEMODE flag. |
|
Gets the assembly's original .NET Framework compilation version (stored in the metadata), given its file path. This method supersedes GetFileVersion. |
|
Returns an interface that represents a runtime to which legacy activation policy has been bound, for example by using the useLegacyV2RuntimeActivationPolicy attribute on the <startup> Element configuration file entry, by direct use of the legacy activation APIs, or by calling the ICLRRuntimeInfo::BindAsLegacyV2Runtime method. |
|
Guarantees a callback to the specified function pointer when a CLR version is first loaded, but not yet started. This method supersedes LockClrVersion |
Remarks
The only way to get an instance of this interface is by calling the CLRCreateInstance function as follows:
ICLRMetaHost *pMetaHost = NULL;
HRESULT hr = CLRCreateInstance(CLSID_CLRMetaHost,
IID_ICLRMetaHost, (LPVOID*)&pMetaHost);
Requirements
Platforms: See .NET Framework System Requirements.
Header: MetaHost.h
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 4