Gets the version number of the common language runtime (CLR) that is associated with the specified process handle.
HRESULT GetVersionFromProcess ( [in] HANDLE hProcess, [out] LPWSTR pVersion, [in] DWORD cchBuffer, [out] DWORD *dwLength );
This method returns standard Component Object Model (COM) error codes, as defined in WinError.h, in addition to the following values.
The method completed successfully.
pVersion is null and cchBuffer is not null, or vice versa.
hProcess is not a valid handle to a process.
The CLR is not loaded.
cchBuffer is null or less than the length of the version string.
This method is not available on the Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition operating system.
Platforms: See .NET Framework System Requirements.
.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0