ICLRDomainManager::SetAppDomainManagerType Method
Specifies the type, derived from the System.AppDomainManager class, of the application domain manager that will be used to initialize the default application domain.
HRESULT SetAppDomainManagerType(
[in] LPCWSTR wszAppDomainManagerAssembly,
[in] LPCWSTR wszAppDomainManagerType,
[in] EInitializeNewDomainFlags dwInitializeDomainFlags
);
This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.
HRESULT | Description |
|---|---|
S_OK | The method completed successfully. |
HOST_E_CLRNOTAVAILABLE | The common language runtime (CLR) has not been loaded into a process, or the CLR is in a state in which it cannot run managed code or process the call successfully. |
Currently, the only defined value for dwInitializeDomainFlags is eInitializeNewDomainFlags_NoSecurityChanges, which tells the common language runtime (CLR) that the application domain manager will not modify security settings during the execution of the AppDomainManager.InitializeNewDomain method. This allows the CLR to optimize the loading of assemblies that have the conditional AllowPartiallyTrustedCallersAttribute (APTCA) attribute. This can result in a significant improvement in startup time if the transitive closure of this set of assemblies is large.
Important |
|---|
If the host specifies eInitializeNewDomainFlags_NoSecurityChanges for the application domain manager, an InvalidOperationException is thrown if any attempt is made to modify the security of the application domain. |
Calling the ICLRControl::SetAppDomainManagerType method is equivalent to calling ICLRDomainManager::SetAppDomainManagerType with eInitializeNewDomainFlags_None.
Platforms: See .NET Framework System Requirements.
Header: MetaHost.h
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 4
Important