Gets the ICLRRuntimeInfo interface that corresponds to a particular version of the common language runtime (CLR). This method supersedes the CorBindToRuntimeEx function used with the STARTUP_LOADER_SAFEMODE flag.
HRESULT GetRuntime (
[in] LPCWSTR pwzVersion,
[in, REFIID riid,
[out,iid_is(riid), retval] LPVOID *ppRuntime
);
This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.
|
HRESULT |
Description |
|---|---|
|
S_OK |
The method completed successfully. |
|
E_POINTER |
pwzVersion or ppRuntime is null. |
This method interacts consistently with legacy interfaces such as the ICorRuntimeHost interface and legacy functions such as the deprecated CorBindTo* functions (see .NET Framework 1.1 and 2.0 Hosting Global Static Functions in the .NET Framework 2.0 hosting API). That is, runtimes that are loaded with the legacy API are visible to the new API, and runtimes that are loaded with the new API are visible to the legacy API. .
Platforms: See .NET Framework System Requirements.
Header: MetaHost.h
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 4
Note