GetFileVersionInfo
A version of this page is also available for
4/8/2010
This function returns version information about a specified file.
Syntax
BOOL GetFileVersionInfo(
LPTSTR lptstrFilename,
DWORD dwHandle,
DWORD dwLen,
LPVOID lpData
);
Parameters
- lptstrFilename
[in] Pointer to a null-terminated string that contains the name of the file specified.
- dwHandle
Ignored.
dwLen
[in] The size, in bytes, of the buffer pointed to by the lpData parameter.Call the GetFileVersionInfoSize function first to determine the size, in bytes, of file 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 version information to the size of the buffer.
lpData
[out] Pointer to a buffer that receives the file-version information.Use this value in a subsequent call to the VerQueryValue function to obtain data from the buffer.
The file version information is always in Unicode format.
Return Value
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
The version information functions are only compatible with 32-bit Windows file images. They are not compatible with 16-bit Windows file images.
Call the GetFileVersionInfoSize function before calling this function.
Requirements
Header | winbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
File I/O Functions
GetFileVersionInfoSize