Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 lpDataparameter.
Call the GetFileVersionInfoSizefunction first to determine the size, in bytes, of file version information. The dwLenparameter should be equal to or greater than that value.
If the buffer pointed to by lpDatais 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 VerQueryValuefunction 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 GetFileVersionInfoSizefunction 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 |