Share via


GetFileVersionInfo (Windows CE 5.0)

Send Feedback

This function returns version information about a specified file.

BOOL GetFileVersionInfo(LPTSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);

Parameters

  • lptstrFilename
    [in] Pointer to a null-terminated string that contains the name of the file specified.

  • dwHandle
    This parameter is ignored.

  • dwLen
    [in] The size, in bytes, of the buffer pointed to by the lpData parameter.

    Call the GetFileVersionInfoSize function first to determine the size, in bytes, of a file's version information. The dwLen parameter should be equal to or greater than that value.

    If the buffer pointed to by lpData is not large enough, the function truncates the file's version information to the size of the buffer.

  • lpData
    [out] Pointer to a buffer that receives the file-version information.

    You can use this value in a subsequent call to the VerQueryValue function to retrieve data from the buffer.

    The file version information is always in Unicode format.

Return Values

If the function succeeds, the return value is nonzero.

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

Remarks

The version information functions are only compatible with 32-bit Windows file images. They are not compatible with 16-bit Windows file images.

Call the GetFileVersionInfoSize function before calling the GetFileVersionInfo function. The file-version information has the format indicated by the VS_VERSIONINFO structure.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

See Also

GetFileVersionInfoSize | VerQueryValue | VS_VERSIONINFO

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.