This documentation is archived and is not being maintained.

ICLRRuntimeInfo::GetVersionString Method

Gets common language runtime (CLR) version information associated with a given ICLRRuntimeInfo interface.

This method supersedes the following functions:

HRESULT GetVersionString(
    [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,
    [in, out]  DWORD *pcchBuffer);


[out] The .NET Framework compilation version in the format "vA.B[.X]". A, B, and X are decimal numbers that correspond to the major version, the minor version, and the build number. X is optional. If X is not present, there is no trailing period.


This parameter must match the directory name for the .NET Framework version, as it appears under C:\Windows\Microsoft.NET\Framework.

Example values are "v1.0.3705", "v1.1.4322", "v2.0.50727", and "v4.0.x", where x depends on the build number installed. Note that the "v" prefix is mandatory.


[in, out] Specifies the size of pwzBuffer to avoid buffer overruns. If pwzBuffer is null, pchBuffer returns the required size of pwzBuffer to allow preallocation.

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




The method completed successfully.


pwzBuffer or pchBuffer is null.

Platforms: See .NET Framework System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 4