GetVersionFromProcess Function

 

Gets the version number of the common language runtime (CLR) that is associated with the specified process handle.

This function has been deprecated in the .NET Framework 4.

HRESULT GetVersionFromProcess (  
    [in]  HANDLE  hProcess,   
    [out] LPWSTR  pVersion,   
    [in]  DWORD   cchBuffer,   
    [out] DWORD  *dwLength  
);  

Parameters

hProcess
[in] A handle to a process.

pVersion
[out] A buffer that contains the version number string upon successful completion of the method.

cchBuffer
[in] The length of the version buffer.

pdwLength
[out] A pointer to the length of the version number string.

This method returns standard Component Object Model (COM) error codes, as defined in WinError.h, in addition to the following values.

Return codeDescription
S_OKThe method completed successfully.
E_INVALIDARGpVersion is null and cchBuffer is not null, or vice versa.

-or-

 hProcess is not a valid handle to a process.

-or-

The CLR is not loaded.
ERROR_INSUFFICIENT_BUFFERcchBuffer is null or less than the length of the version string.
E_NOTIMPLThis method is not available on the Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition operating system.

Platforms: See System Requirements.

Header: MSCorEE.h

Library: MSCorEE.dll

.NET Framework Versions: Available since 2.0

GetRequestedRuntimeInfo Function
GetRequestedRuntimeVersion Function
Deprecated CLR Hosting Functions

Show: