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.
The method completed successfully.
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.
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.
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 4