This documentation is archived and is not being maintained.

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.

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


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


[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.

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




The method completed successfully and returned a runtime that was bound to legacy activation policy.


The method completed successfully, but a legacy runtime has not yet been bound.


The method found a runtime that was bound to legacy activation policy, but riid is not supported by that runtime.

Platforms: See .NET Framework System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 4