ICLRMetaHost::QueryLegacyV2RuntimeBinding Method

Returns an interface that represents a runtime to which legacy activation policy has been bound, for example, by using the useLegacyV2RuntimeActivationPolicy attribute on the <startup> element configuration file entry, by direct use of the legacy activation APIs, or by calling the ICLRRuntimeInfo::BindAsLegacyV2Runtime method.

Syntax

HRESULT QueryLegacyV2RuntimeBinding (  
    [in] REFIID riid,  
    [out, iid_is(riid), retval] LPVOID *ppUnk);  

Parameters

riid
[in] Required.Currently the only valid value for this parameter is IID_ICLRRuntimeInfo.

ppUnk
[out] Required. When this method returns, contains a pointer to the ICLRRuntimeInfo interface that represents a runtime that has been bound to legacy activation policy.

Return Value

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT Description
S_OK The method completed successfully and returned a runtime that was bound to legacy activation policy.
S_FALSE The method completed successfully, but a legacy runtime has not yet been bound.
E_NOINTERFACE The method found a runtime that was bound to legacy activation policy, but riid is not supported by that runtime.

Remarks

Requirements

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

See Also

ICLRMetaHost Interface
Hosting