Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 GetVersionFromProcess Function

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework General Reference
GetVersionFromProcess Function

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
);
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 code

Description

S_OK

The method completed successfully.

E_INVALIDARG

pVersion 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_BUFFER

cchBuffer is null or less than the length of the version string.

E_NOTIMPL

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.

Header: MSCorEE.idl

Library: MSCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker