提供返回有关特定公共语言运行时(CLR)的信息的方法,包括版本、目录和加载状态。 此接口还提供特定于运行时的功能,而无需初始化运行时。 它包括运行时相对 LoadLibrary 方法、特定于运行时模块的 GetProcAddress 方法和通过 GetInterface 方法提供的运行时提供的接口。
Methods
| Method | Description | 
|---|---|
| BindAsLegacyV2Runtime Method | 为所有旧版 CLR 版本 2 激活策略决策绑定此运行时。 | 
| GetDefaultStartupFlags Method | 获取 CLR 启动标志和主机配置文件。 | 
| GetInterface Method | 将 CLR 加载到当前进程中,并返回运行时接口指针,例如 ICLRRuntimeHost、 ICLRStrongName 和 IMetaDataDispenser。 此方法取代了所有 CorBindTo*函数。 | 
| GetProcAddress Method | 获取从与此接口关联的 CLR 导出的指定函数的地址。 此方法取代 GetRealProcAddress 方法。 | 
| GetRuntimeDirectory Method | 获取与此接口关联的 CLR 的安装目录。 此方法取代 GetCORSystemDirectory 方法。 | 
| GetVersionString Method | 获取与给定 ICLRRuntimeInfo 接口关联的公共语言运行时 (CLR) 版本信息。 此方法取代 GetRequestedRuntimeInfo 和 GetRequestedRuntimeVersion 方法。 | 
| IsLoadable Method | 指示是否可以将与此接口关联的运行时加载到当前进程中,同时考虑可能已加载到进程中的其他运行时。 | 
| IsLoaded Method | 指示是否将与 ICLRRuntimeInfo 接口关联的 CLR 加载到进程中。 | 
| IsStarted Method | 指示是否已启动与 ICLRRuntimeInfo 接口关联的 CLR。 | 
| LoadErrorString Method | 将 HRESULT 值转换为指定区域性的相应错误消息。 此方法取代 LoadStringRC 和 LoadStringRCEx 方法。 | 
| LoadLibrary Method | 从 ICLRRuntimeInfo 接口表示的 CLR 的框架目录中加载库。 此方法取代 LoadLibraryShim 方法。 | 
| SetDefaultStartupFlags Method | 设置 CLR 启动标志和主机配置文件。 | 
Requirements
平台:请参阅系统要求。
Header: MetaHost.h
图书馆: 作为资源包含在 MSCorEE.dll
.NET Framework 版本: 自 4 起可用