ver: Use the 16-bit resource function in GetFileVersionInfo16().

The 32-bit functions no longer support LZ compression.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48557
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-02-24 19:15:40 +01:00
parent 1e5522ab78
commit f4ebe20b2b
1 changed files with 10 additions and 8 deletions

View File

@ -30,6 +30,7 @@
#include "windef.h" #include "windef.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "winternl.h" #include "winternl.h"
#include "winuser.h"
#include "winver.h" #include "winver.h"
#include "lzexpand.h" #include "lzexpand.h"
#include "wine/debug.h" #include "wine/debug.h"
@ -461,22 +462,23 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType,
/************************************************************************* /*************************************************************************
* GetFileVersionInfoSize [VER.6] * GetFileVersionInfoSize [VER.6]
*/ */
DWORD WINAPI GetFileVersionInfoSize16( LPCSTR lpszFileName, LPDWORD lpdwHandle ) DWORD WINAPI GetFileVersionInfoSize16( LPCSTR filename, LPDWORD handle )
{ {
TRACE("(%s, %p)\n", debugstr_a(lpszFileName), lpdwHandle ); DWORD offset;
return GetFileVersionInfoSizeA( lpszFileName, lpdwHandle );
TRACE("(%s, %p)\n", debugstr_a(filename), handle );
return GetFileResourceSize16( filename, (LPCSTR)RT_VERSION, (LPCSTR)VS_VERSION_INFO, &offset );
} }
/************************************************************************* /*************************************************************************
* GetFileVersionInfo [VER.7] * GetFileVersionInfo [VER.7]
*/ */
DWORD WINAPI GetFileVersionInfo16( LPCSTR lpszFileName, DWORD handle, DWORD WINAPI GetFileVersionInfo16( LPCSTR filename, DWORD handle, DWORD datasize, LPVOID data )
DWORD cbBuf, LPVOID lpvData )
{ {
TRACE("(%s, %08x, %d, %p)\n", TRACE("(%s, %08x, %d, %p)\n", debugstr_a(filename), handle, datasize, data );
debugstr_a(lpszFileName), handle, cbBuf, lpvData );
return GetFileVersionInfoA( lpszFileName, handle, cbBuf, lpvData ); return GetFileResource16( filename, (LPCSTR)RT_VERSION, (LPCSTR)VS_VERSION_INFO, 0, datasize, data );
} }
/************************************************************************* /*************************************************************************