Share via


IMetaDataImport2::GetVersionString Method

Gets the version number of the runtime that was used to build the assembly.

HRESULT GetVersionString (
    LPWSTR      pwzBuf,
    DWORD       ccBufSize,
    DWORD       *pccBufSize
);

Parameters

Parameter Description

pwzBuf

[out] An array to store the string that specifies the version.

ccBufSize

[in] The size, in wide characters, of the pwzBuf array.

pccBufSize

[out] The number of wide characters, including a null terminator, returned in the pwzBuf array.

Remarks

The GetVersionString method gets the built-for version of the current metadata scope. If the scope has never been saved, it will not have a built-for version, and an empty string will be returned.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Used as a resource in Mscoree.dll

.NET Framework Version: 2.0

See Also

Reference

IMetaDataImport2 Interface
IMetaDataImport Interface