Binds the current runtime for all legacy common language runtime (CLR) version 2 activation policy decisions.
HRESULT BindAsLegacyV2Runtime ();
This method returns the following specific HRESULTs:
|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.|
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.
Platforms: See System Requirements.
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: Available since 4