# ICLRRuntimeInfo::GetVersionString Method

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

This method supersedes the following functions:

## Syntax

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


## Parameters

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

Note

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.

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

## Return Value

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

HRESULT Description
S_OK The method completed successfully.
E_POINTER pwzBuffer or pchBuffer is null.

## Requirements

Platforms: See System Requirements.