Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Resources
Version Information
Functions
 GetFileVersionInfoSize Function

  Switch on low bandwidth view
GetFileVersionInfoSize 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 GetFileVersionInfoSize(      
    LPCTSTR lptstrFilename,     LPDWORD lpdwHandle );

Parameters

lptstrFilename
[in] Pointer to a null-terminated string that specifies the name of the file of interest. The function uses the search sequence specified by the LoadLibrary function.

Windows 95/98/Me: The short path form of the specified file name must be less than 126 characters.

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

Return Value

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

Windows NT 3.51 and earlier: The version information functions do not work with 16-bit Windows file images.

Windows 95/98/Me, Windows NT 4.0 and Windows 2000: These functions work on both 16- and 32-bit file images.

Windows XP: These functions work on 16-, 32-, and 64-bit 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.

Windows 95/98/Me: GetFileVersionInfoSizeW is supported by the Microsoft Layer for Unicode. To use this version, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.

Function Information

Minimum DLL Versionversion.dll
HeaderDeclared in Winver.h, include Windows.h
Import libraryVersion.lib
Minimum operating systems Windows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker