GetFileVersionInfoSize

3.1

  #include <ver.h>    

  DWORD GetFileVersionInfoSize(lpszFileName, lpdwHandle)    
  LPCSTR lpszFileName; /* address of buffer for filename */
  DWORD FAR *lpdwHandle; /* address of handle for info */

The GetFileVersionInfoSize function determines whether it can obtain version information from the specified file. If version information is available, GetFileVersionInfoSize returns the size of the buffer required to hold the version information. It also returns a handle that can be used in a subsequent call to the GetFileVersionInfo function.

Parameters

lpszFileName

Points to the buffer that contains the name of the file.

lpdwHandle

Points to a 32-bit value that the GetFileVersionInfoSize function fills with the handle to the file-version information. The GetFileVersionInfo function can use this handle.

Return Value

The return value is the buffer size, in bytes, required to hold the version information if the function is successful. The return value is NULL if the function could not find the file, could not find the version information, or produced an MS-DOS error. The GetFileVersionInfoSize function returns no information about the type of error that occurred.

Comments

The file version information is organized in a VERSIONINFO statement.

See Also

GetFileVersionInfo