GetFileVersionInfoSize

This function determines whether the operating system can obtain version information about a specified file. If version information is available, GetFileVersionInfoSize returns the size, in bytes, of that information.

DWORD GetFileVersionInfoSize(
LPTSTR lptstrFilename,
LPDWORD lpdwHandle);

Parameters

  • lptstrFilename
    [in] Pointer to a null-terminated string that specifies the name of the file of interest.
  • lpdwHandle
    [out] Pointer to a variable that the function sets to zero.

Return Values

If the function succeeds, the return value is the size, in bytes, of the file's version information.

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

Remarks

The version information functions work only with Win32 file images. They do not work with 16-bit Windows file images.

Call the GetFileVersionInfoSize function before calling the GetFileVersionInfo function. The size returned by GetFileVersionInfoSize indicates the buffer size required for the version information returned by GetFileVersionInfo.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later Winbase.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetFileVersionInfo, GetLastError

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.