GetFileVersionInfoSizeA function

Determines whether the operating system can retrieve version information for a specified file. If version information is available, GetFileVersionInfoSize returns the size, in bytes, of that information.

Syntax

DWORD GetFileVersionInfoSizeA(
  LPCSTR  lptstrFilename,
  LPDWORD lpdwHandle
);

Parameters

lptstrFilename

Type: LPCTSTR

The name of the file of interest. The function uses the search sequence specified by the LoadLibrary function.

lpdwHandle

Type: LPDWORD

A pointer to a variable that the function sets to zero.

Return Value

Type: DWORD

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

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

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winver.h (include Windows.h)
Library Mincore.lib
DLL Api-ms-win-core-version-l1-1-0.dll

See Also

Conceptual

GetFileVersionInfo

Reference

VS_VERSIONINFO

VerQueryValue

Version Information