ICLRControl::SetAppDomainManagerType 方法ICLRControl::SetAppDomainManagerType Method

設定衍生自 AppDomainManager 的類型,做為應用程式域管理員的類型。Sets a type derived from AppDomainManager as the type for application domain managers.


HRESULT SetAppDomainManagerType (  
    [in] LPCWSTR pwzAppDomainManagerAssembly,  
    [in] LPCWSTR pwzAppDomainManagerType  


在實作為衍生自 AppDomainManager 之要求類型的元件名稱。[in] The name of the assembly in which the requested type derived from AppDomainManager is implemented.

在在執行 AppDomainManager之功能的 pwzAppDomainManagerAssembly 參數中實作為類型的名稱。[in] The name of the type implemented in the pwzAppDomainManagerAssembly parameter that implements the capabilities of AppDomainManager.

傳回值Return Value

S_OKS_OK 已成功傳回方法。The method returned successfully.
HOST_E_CLRNOTAVAILABLEHOST_E_CLRNOTAVAILABLE Common language runtime (CLR)尚未載入進程中,或 CLR 處於無法執行 managed 程式碼或成功處理呼叫的狀態。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.
HOST_E_TIMEOUTHOST_E_TIMEOUT 呼叫超時。The call timed out.
HOST_E_NOT_OWNERHOST_E_NOT_OWNER 呼叫端沒有擁有鎖定。The caller does not own the lock.
HOST_E_ABANDONEDHOST_E_ABANDONED 已封鎖的執行緒或光纖在等候時取消了事件。An event was canceled while a blocked thread or fiber was waiting on it.
E_FAILE_FAIL 發生不明的嚴重失敗。An unknown catastrophic failure occurred. 在方法傳回 E_FAIL 之後,CLR 就無法在進程內使用。After a method returns E_FAIL, the CLR is no longer usable within the process. 對裝載方法的後續呼叫會傳回 HOST_E_CLRNOTAVAILABLE。Subsequent calls to hosting methods return HOST_E_CLRNOTAVAILABLE.


平台: 請參閱系統需求Platforms: See System Requirements.

標頭: Mscoree.dll. hHeader: MSCorEE.h

連結庫: 包含為 Mscoree.dll 中的資源Library: Included as a resource in MSCorEE.dll

.NET framework 版本: 自 2.0 起可用Available since 2.0.NET Framework Versions: 自 2.0 起可用Available since 2.0

請參閱See also