From 324acd5f1e30b6bbe4f02fe7f9230469b2aa0f95 Mon Sep 17 00:00:00 2001 From: Austin English Date: Thu, 21 May 2015 18:32:17 -0700 Subject: [PATCH] version: Move GetFileVersionInfo(A/W) implementation to GetFileVersionInfoEx(A/W). --- dlls/version/version.c | 55 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/dlls/version/version.c b/dlls/version/version.c index bcc6d018dae..e1295a03e6b 100644 --- a/dlls/version/version.c +++ b/dlls/version/version.c @@ -722,10 +722,9 @@ DWORD WINAPI GetFileVersionInfoSizeExA( DWORD flags, LPCSTR filename, LPDWORD ha } /*********************************************************************** - * GetFileVersionInfoW [VERSION.@] + * GetFileVersionInfoExW [VERSION.@] */ -BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle, - DWORD datasize, LPVOID data ) +BOOL WINAPI GetFileVersionInfoExW( DWORD flags, LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data ) { static const char signature[4] = "FE2X"; DWORD len, offset, magic = 1; @@ -734,6 +733,13 @@ BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle, HMODULE hModule; VS_VERSION_INFO_STRUCT32* vvis = data; + if (flags) + { + FIXME("stub: %x %s %u %u %p\n", flags, wine_dbgstr_w(filename), handle, datasize, data); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; + } + TRACE("(%s,%d,size=%d,data=%p)\n", debugstr_w(filename), handle, datasize, data ); @@ -797,10 +803,9 @@ BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle, } /*********************************************************************** - * GetFileVersionInfoA [VERSION.@] + * GetFileVersionInfoExA [VERSION.@] */ -BOOL WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle, - DWORD datasize, LPVOID data ) +BOOL WINAPI GetFileVersionInfoExA( DWORD flags, LPCSTR filename, DWORD handle, DWORD datasize, LPVOID data ) { UNICODE_STRING filenameW; BOOL retval; @@ -813,13 +818,29 @@ BOOL WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle, else filenameW.Buffer = NULL; - retval = GetFileVersionInfoW(filenameW.Buffer, handle, datasize, data); + retval = GetFileVersionInfoExW(flags, filenameW.Buffer, handle, datasize, data); RtlFreeUnicodeString(&filenameW); return retval; } +/*********************************************************************** + * GetFileVersionInfoW [VERSION.@] + */ +BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data ) +{ + return GetFileVersionInfoExW(0, filename, handle, datasize, data); +} + +/*********************************************************************** + * GetFileVersionInfoA [VERSION.@] + */ +BOOL WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle, DWORD datasize, LPVOID data ) +{ + return GetFileVersionInfoExA(0, filename, handle, datasize, data); +} + /*********************************************************************** * VersionInfo16_FindChild [internal] */ @@ -1636,23 +1657,3 @@ DWORD WINAPI VerInstallFileW( HeapFree( GetProcessHeap(), 0, wcurd ); return ret; } - -/****************************************************************************** - * GetFileVersionInfoExA [VERSION.@] - */ -BOOL WINAPI GetFileVersionInfoExA(DWORD flags, LPCSTR filename, DWORD handle, DWORD len, LPVOID data) -{ - FIXME("stub: %u %s %u %u %p\n", flags, wine_dbgstr_a(filename), handle, len, data); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - -/****************************************************************************** - * GetFileVersionInfoExW [VERSION.@] - */ -BOOL WINAPI GetFileVersionInfoExW(DWORD flags, LPCWSTR filename, DWORD handle, DWORD len, LPVOID data) -{ - FIXME("stub: %u %s %u %u %p\n", flags, wine_dbgstr_w(filename), handle, len, data); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -}