ICLRRuntimeInfo::GetInterface メソッドICLRRuntimeInfo::GetInterface Method
現在のプロセスに CLR を読み込み、 ICLRRuntimeHost、 ICLRStrongName、 IMetaDataDispenserExなどのランタイムインターフェイスポインターを返します。Loads the CLR into the current process and returns runtime interface pointers, such as ICLRRuntimeHost, ICLRStrongName, and IMetaDataDispenserEx.
このメソッドは、 CorBindTo
「 非推奨の CLR ホスト関数 」セクションのすべての * 関数を置き換えます。This method supersedes all the CorBindTo
* functions in the Deprecated CLR Hosting Functions section.
構文Syntax
HRESULT GetInterface(
[in] REFCLSID rclsid,
[in] REFIID riid,
[out, iid_is(riid), retval] LPVOID *ppUnk);
パラメーターParameters
rclsid
からコクラスの CLSID インターフェイス。[in] The CLSID interface for the coclass.
riid
から要求されたインターフェイスの IID rclsid
。[in] The IID of the requested rclsid
interface.
ppUnk
入出力クエリされたインターフェイスへのポインター。[out] A pointer to the queried interface.
戻り値Return Value
このメソッドは、次の特定の HRESULT と、メソッドの失敗を示す HRESULT エラーも返します。This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.
HRESULTHRESULT | 説明Description |
---|---|
S_OKS_OK | メソッドは正常に完了しました。The method completed successfully. |
E_POINTERE_POINTER | ppUnk が null です。ppUnk is null. |
E_OUTOFMEMORYE_OUTOFMEMORY | 要求を処理するのに十分なメモリがありません。Not enough memory is available to handle the request. |
CLR_E_SHIM_LEGACYRUNTIMEALREADYBOUNDCLR_E_SHIM_LEGACYRUNTIMEALREADYBOUND | 以前の CLR バージョン2のアクティブ化ポリシーに、別のランタイムが既にバインドされています。A different runtime was already bound to the legacy CLR version 2 activation policy. |
注釈Remarks
このメソッドを使用すると、CLR が読み込まれますが、初期化されません。This method causes the CLR to be loaded but not initialized.
次の表は、とでサポートされている組み合わせを示して rclsid
riid
います。The following table shows the supported combinations for rclsid
and riid
.
rclsid |
riid |
---|---|
CLSID_CorMetaDataDispenserCLSID_CorMetaDataDispenser | IID_IMetaDataDispenser、IID_IMetaDataDispenserExIID_IMetaDataDispenser, IID_IMetaDataDispenserEx |
CLSID_CorMetaDataDispenserRuntimeCLSID_CorMetaDataDispenserRuntime | IID_IMetaDataDispenser、IID_IMetaDataDispenserExIID_IMetaDataDispenser, IID_IMetaDataDispenserEx |
CLSID_CorRuntimeHostCLSID_CorRuntimeHost | IID_ICorRuntimeHostIID_ICorRuntimeHost |
CLSID_CLRRuntimeHostCLSID_CLRRuntimeHost | IID_ICLRRuntimeHostIID_ICLRRuntimeHost |
CLSID_TypeNameFactoryCLSID_TypeNameFactory | IID_ITypeNameFactoryIID_ITypeNameFactory |
CLSID_CLRDebuggingLegacyCLSID_CLRDebuggingLegacy | IID_ICorDebugIID_ICorDebug |
CLSID_CLRStrongNameCLSID_CLRStrongName | IID_ICLRStrongNameIID_ICLRStrongName |
要件Requirements
:「システム要件」を参照してください。Platforms: See System Requirements.
ヘッダー: メタホスト .hHeader: MetaHost.h
ライブラリ: MSCorEE.dll にリソースとして含まれていますLibrary: Included as a resource in MSCorEE.dll
.NET Framework のバージョン:4 以降で使用可能Available since 4.NET Framework Versions: 4 以降で使用可能Available since 4