Allows the host to determine which version of the common language runtime (CLR) will be used within the process before explicitly initializing the CLR.
This function has been deprecated in the .NET Framework 4.
[in] The function to be called by the CLR upon initialization.
[in] The function to be called by the host to inform the CLR that initialization is starting.
[in] The function to be called by the host to inform the CLR that initialization is complete.
This method returns standard COM error codes, as defined in WinError.h, in addition to the following values.
The method completed successfully.
One or more of the arguments is null.
The host calls LockClrVersion before initializing the CLR. LockClrVersion takes three parameters, all of which are callbacks of type FLockClrVersionCallback. This type is defined as follows.
typedef HRESULT ( __stdcall *FLockClrVersionCallback ) ();
The following steps occur upon initialization of the runtime:
The host calls CorBindToRuntimeEx or one of the other runtime initialization functions. Alternatively, the host could initialize the runtime using COM object activation.
The runtime calls the function specified by the hostCallback parameter.
The function specified by hostCallback then makes the following sequence of calls:
All the calls from pBeginHostSetup to pEndHostSetup must occur on a single thread or fiber, with the same logical stack. This thread can be different from the thread upon which hostCallback is called.
Platforms: See .NET Framework System Requirements.
.NET Framework Versions: Available since 2.0