ICorRuntimeHost 接口ICorRuntimeHost Interface

提供一些方法,这些方法使宿主可以显式启动和停止公共语言运行时 (CLR) ,以创建和配置应用程序域、访问默认域以及枚举在进程中运行的所有域。Provides methods that enable the host to start and stop the common language runtime (CLR) explicitly, to create and configure application domains, to access the default domain, and to enumerate all domains running in the process.

在 .NET Framework 版本2.0 中,此接口由 ICLRRuntimeHost取代。In the .NET Framework version 2.0, this interface is superceded by ICLRRuntimeHost.

方法Methods

方法Method 说明Description
CloseEnum 方法CloseEnum Method 将域枚举器重置回域列表的开头。Resets a domain enumerator back to the beginning of the domain list.
CreateDomain 方法CreateDomain Method 创建应用程序域。Creates an application domain. 调用方接收类型为的实例的接口指针 _AppDomain System.AppDomainThe caller receives an interface pointer of type _AppDomain to an instance of type System.AppDomain.
CreateDomainEx 方法CreateDomainEx Method 创建应用程序域。Creates an application domain. 此方法允许调用方传递 IAppDomainSetup 实例,以配置返回的实例的附加功能 _AppDomainThis method allows the caller to pass an IAppDomainSetup instance to configure additional features of the returned _AppDomain instance.
CreateDomainSetup 方法CreateDomainSetup Method 获取实例的类型的接口指针 IAppDomainSetup AppDomainSetupGets an interface pointer of type IAppDomainSetup to an AppDomainSetup instance. IAppDomainSetup 提供用于配置应用程序域在创建之前的各个方面的方法。IAppDomainSetup provides methods to configure aspects of an application domain before it is created.
CreateEvidence 方法CreateEvidence Method 获取类型的接口指针 IIdentity ,该指针允许主机创建要传递给 CreateDomainCreateDomainEx的安全证据。Gets an interface pointer of type IIdentity, which allows the host to create security evidence to pass to CreateDomain or CreateDomainEx.
CreateLogicalThreadState 方法CreateLogicalThreadState Method 请勿使用。Do not use.
CurrentDomain 方法CurrentDomain Method 获取类型的接口指针 _AppDomain ,该指针表示当前线程上加载的域。Gets an interface pointer of type _AppDomain that represents the domain loaded on the current thread.
DeleteLogicalThreadState 方法DeleteLogicalThreadState Method 请勿使用。Do not use.
EnumDomains 方法EnumDomains Method 获取当前进程中的域的枚举数。Gets an enumerator for the domains in the current process.
GetConfiguration 方法GetConfiguration Method 获取一个对象,该对象允许宿主指定 CLR 的回调配置。Gets an object that allows the host to specify the callback configuration of the CLR.
GetDefaultDomain 方法GetDefaultDomain Method 获取类型的接口指针 _AppDomain ,该指针表示当前进程的默认域。Gets an interface pointer of type _AppDomain that represents the default domain for the current process.
LocksHeldByLogicalThread 方法LocksHeldByLogicalThread Method 请勿使用。Do not use.
MapFile 方法MapFile Method 将指定的文件映射到内存。Maps the specified file into memory. 此方法已过时。This method is obsolete.
NextDomain 方法NextDomain Method 获取一个接口指针,该指针指向枚举中的下一个域。Gets an interface pointer to the next domain in the enumeration.
Start 方法Start Method 启动 CLR。Starts the CLR.
Stop 方法Stop Method 停止执行当前进程的运行时中的代码。Stops the execution of code in the runtime for the current process.
SwitchInLogicalThreadState 方法SwitchInLogicalThreadState Method 请勿使用。Do not use.
SwitchOutLogicalThreadState 方法SwitchOutLogicalThreadState Method 请勿使用。Do not use.
UnloadDomain 方法UnloadDomain Method 从当前进程中卸载指定的应用程序域。Unloads the specified application domain from the current process.

要求Requirements

平台: 请参阅系统要求Platforms: See System Requirements.

标头: Mscoree.dllHeader: MSCorEE.h

库: 作为中的资源包含 MSCorEE.dllLibrary: Included as a resource in MSCorEE.dll

.NET Framework 版本: 1.0、1。1.NET Framework Versions: 1.0, 1.1

请参阅See also