ICLRRuntimeInfo::BindAsLegacyV2Runtime Method

Binds the current runtime for all legacy common language runtime (CLR) version 2 activation policy decisions.

Syntax

HRESULT BindAsLegacyV2Runtime ();  

Return Value

This method returns the following specific HRESULTs:

HRESULT Description
S_OK Either binding succeeded, or this runtime was already bound as the legacy CLR version 2 activation policy runtime.
CLR_E_SHIM_LEGACYRUNTIMEALREADYBOUND A different runtime was already bound to the legacy CLR version 2 activation policy.

Remarks

If the current runtime is already bound for all legacy CLR version 2 activation policy decisions (for example, by using the useLegacyV2RuntimeActivationPolicy attribute on the <startup> element in the configuration file), this method does not return an error result; instead, the result is S_OK, just as it would be if the method had successfully bound legacy activation policy.

Requirements

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

See also