Skip to content

Latest commit

 

History

History
190 lines (129 loc) · 6.71 KB

nf-winver-getfileversioninfoexw.md

File metadata and controls

190 lines (129 loc) · 6.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winver.GetFileVersionInfoExW
GetFileVersionInfoExW function (winver.h)
Retrieves version information for the specified file. (GetFileVersionInfoExW)
FILE_VER_GET_LOCALISED
FILE_VER_GET_NEUTRAL
FILE_VER_GET_PREFETCHED
GetFileVersionInfoEx
GetFileVersionInfoEx function [Menus and Other Resources]
GetFileVersionInfoExW
_win32_GetFileVersionInfoEx
_win32_getfileversioninfoex_cpp
menurc.getfileversioninfoex
winui._win32_getfileversioninfoex
winver/GetFileVersionInfoEx
winver/GetFileVersionInfoExW
menurc\getfileversioninfoex.htm
menurc
VS|winui|~\winui\windowsuserinterface\resources\versioninformation\versioninformationreference\versioninformationfunctions\getfileversioninfoex.htm
12/05/2018
FILE_VER_GET_LOCALISED, FILE_VER_GET_NEUTRAL, FILE_VER_GET_PREFETCHED, GetFileVersionInfoEx, GetFileVersionInfoEx function [Menus and Other Resources], GetFileVersionInfoExA, GetFileVersionInfoExW, _win32_GetFileVersionInfoEx, _win32_getfileversioninfoex_cpp, menurc.getfileversioninfoex, winui._win32_getfileversioninfoex, winver/GetFileVersionInfoEx, winver/GetFileVersionInfoExA, winver/GetFileVersionInfoExW
winver.h
Windows.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
GetFileVersionInfoExW (Unicode) and GetFileVersionInfoExA (ANSI)
Version.lib
Api-ms-win-core-version-l1-1-0.dll
Windows
19H1
GetFileVersionInfoExW
winver/GetFileVersionInfoExW
c++
APIRef
kbSyntax
DllExport
api-ms-win-core-version-l1-1-0.dll
API-MS-Win-Core-version-l1-1-0.dll
KernelBase.dll
API-MS-Win-Core-versionansi-l1-1-0.dll
API-MS-Win-DownLevel-version-l1-1-0.dll
API-MS-Win-Core-Versionansi-L1-1-1.dll
API-MS-Win-Core-Version-L1-1-1.dll
version.dll
GetFileVersionInfoEx
GetFileVersionInfoExA
GetFileVersionInfoExW

GetFileVersionInfoExW function

-description

Retrieves version information for the specified file.

-parameters

-param dwFlags [in]

Type: DWORD

Controls the MUI DLLs (if any) from which the version resource is extracted. The value of this flag must match the flags passed to the corresponding GetFileVersionInfoSizeEx call, which was used to determine the buffer size that is passed in the dwLen parameter. Zero or more of the following flags.

Value Meaning
FILE_VER_GET_LOCALISED
0x01
Loads the entire version resource (both strings and binary version information) from the corresponding MUI file, if available.
FILE_VER_GET_NEUTRAL
0x02
Loads the version resource strings from the corresponding MUI file, if available, and loads the binary version information (VS_FIXEDFILEINFO) from the corresponding language-neutral file, if available.
FILE_VER_GET_PREFETCHED
0x04
Indicates a preference for version.dll to attempt to preload the image outside of the loader lock to avoid contention. This flag does not change the behavior or semantics of the function.

-param lpwstrFilename [in]

Type: LPCTSTR

The name of the file. If a full path is not specified, the function uses the search sequence specified by the LoadLibrary function.

-param dwHandle

Type: DWORD

This parameter is ignored.

-param dwLen [in]

Type: DWORD

The size, in bytes, of the buffer pointed to by the lpData parameter.

Call the GetFileVersionInfoSizeEx function first to determine the size, in bytes, of a file's version information. The dwLen parameter should be equal to or greater than that value.

If the buffer pointed to by lpData is not large enough, the function truncates the file's version information to the size of the buffer.

-param lpData [out]

Type: LPVOID

When this function returns, contains a pointer to a buffer that contains the file-version information.

You can use this value in a subsequent call to the VerQueryValue function to retrieve data from the buffer.

-returns

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

-remarks

Call the GetFileVersionInfoSizeEx function before calling the GetFileVersionInfoEx function. To retrieve information from the file-version information buffer, use the VerQueryValue function.

Note

The winver.h header defines GetFileVersionInfoEx as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

Conceptual

GetFileVersionInfo

GetFileVersionInfoSizeEx

Reference

VS_VERSIONINFO

VerQueryValue

Version Information