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.
A version of this page is also available for
4/8/2010

This function checks whether the OS can obtain version information about a specified file. If version information is available, this function returns the size, in bytes.

Syntax

DWORD GetFileVersionInfoSize(
  LPTSTR 
lptstrFilename,
  LPDWORD 
lpdwHandle
);

Parameters

lptstrFilename

[in] Pointer to a null-terminated string that specifies the name of the file.

lpdwHandle

[out] Pointer to a variable that the function sets to zero.

Return Value

The size, in bytes, of the file version 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 this function before calling the GetFileVersionInfofunction. The size returned by this function indicates the buffer size required for the version information returned by GetFileVersionInfo.

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