Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GetFileVersionInfoSizeEx function

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

Syntax


DWORD WINAPI GetFileVersionInfoSizeEx(
  _In_   DWORD dwFlags,
  _In_   LPCTSTR lptstrFilename,
  _Out_  LPDWORD lpdwHandle
);

Parameters

dwFlags [in]

Type: DWORD

Controls which MUI DLLs (if any) from which the version resource is extracted. Zero or more of the following flags.

ValueMeaning
FILE_VER_GET_LOCALISED
0x01

Loads the entire version resource (both strings and binary version information) from the corresponding MUI file, if available.

FILE_VER_GET_NEUTRAL
0x002

Loads the version resource strings from the corresponding MUI file, if available, and loads the binary version information (VS_FIXEDFILEINFO) from the corresponding language-neutral file, if available.

 

lptstrFilename [in]

Type: LPCTSTR

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

lpdwHandle [out]

Type: LPDWORD

When this function returns, contains a pointer to a variable that is set to zero because this function sets it to zero. This parameter exists for historical reasons.

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 GetFileVersionInfoSizeEx function before calling the GetFileVersionInfoEx function. The size returned by GetFileVersionInfoSizeEx indicates the buffer size required for the version information returned by GetFileVersionInfoEx.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Winver.h (include Windows.h)

Library

Version.lib

DLL

Version.dll

Unicode and ANSI names

GetFileVersionInfoSizeExW (Unicode) and GetFileVersionInfoSizeExA (ANSI)

See also

Reference
GetFileVersionInfoSize
GetFileVersionInfoEx
VS_VERSIONINFO
VerQueryValue
Conceptual
Version Information

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.