GetFileVersionInfoSizeA API violation
Florian Schirmer
jolt at tuxbox.org
Tue Mar 11 15:40:17 CST 2003
Hi,
GetFileVersionInfoSizeA does not behave as described in my API
documentation. It is supposed to set the second param (handle) to zero.
Current wine implementation does not - it even sets a non zero value futher
down sometimes. So i suggest to apply the following patch. (If setting
handle to offset has some [undocumented] meaning the second part of the
patch should be ommited.)
Thanks! Comments?
Bye,
Florian
--- wine-20030219/dlls/version/info.c-old Wed Aug 14 23:04:54 2002
+++ wine-20030219/dlls/version/info.c Sun Mar 9 17:51:14 2003
@@ -438,6 +438,8 @@ DWORD WINAPI GetFileVersionInfoSizeA( LP
TRACE("(%s,%p)\n", debugstr_a(filename), handle );
+ if ( handle ) *handle = 0;
+
len = VERSION_GetFileVersionInfo_PE(filename, handle, 0, NULL);
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
if(len == 0xFFFFFFFF)
@@ -467,8 +469,6 @@ DWORD WINAPI GetFileVersionInfoSizeA( LP
offset, sizeof( buf ), buf );
if (!ret) return 0;
- if ( handle ) *handle = offset;
-
if ( VersionInfoIs16( buf ) )
vffi = (VS_FIXEDFILEINFO *)VersionInfo16_Value(
(VS_VERSION_INFO_STRUCT16 *)buf );
else
More information about the wine-devel
mailing list