GetFileVersionInfoEx function
Retrieves version information for the specified file.
Syntax
BOOL WINAPI GetFileVersionInfoEx( _In_ DWORD dwFlags, _In_ LPCTSTR lptstrFilename, _Reserved_ DWORD dwHandle, _In_ DWORD dwLen, _Out_ LPVOID lpData );
Parameters
- 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.
- lptstrFilename [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.
- dwHandle
-
Type: DWORD
This parameter is ignored.
- 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.
- 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.
Return value
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.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
GetFileVersionInfoExW (Unicode) and GetFileVersionInfoExA (ANSI) |
See also
- Reference
- GetFileVersionInfo
- GetFileVersionInfoSizeEx
- VerQueryValue
- VS_VERSIONINFO
- Conceptual
- Version Information