Patches for "RegGetValue" and "SetDIBits"

Mathias Kosch info at mkosch.de
Tue Jul 15 22:56:38 CDT 2008


Dear Sirs and Madams,

while configuration "The Bat!" for wine I had to fix some issues with
Wine (version 1.1.1). I am now sending you the patches, because I was
told so in Bugzilla. I hope, they can be applied to the next version
of Wine so I don't need to recompile myself.

The first problem relates to the functions "RegGetValueW" and
"RegGetValueA" in "advapi32".
In case dwFlags contains the Bits (RRF_RT_REG_EXPAND_SZ |
RRF_RT_REG_SZ) and not the bit RRF_NOEXPAND the function will return
ERROR_INVALID_PARAMETER. This is wrong behaviour, because expansion
will transform a result of type RRF_RT_REG_EXPAND_SZ into
RRF_RT_REG_SZ which satisfies the request.
This will especially make the use of the flag "RRF_RT_ANY" impossible.
The patch can be found in the attached file "registry.c.patch".

The second problems relates to the function "X11DRV_SetDIBits" in
"winex11.drv". It causes "The Bat!" to display white squares instead
of colored icons.
The mistake is inside the recently added optimization code for the
case "where the input bits are in exactly the same format as the
internal representation".
The assignment
> dbits = (LPBYTE)bits + (dstwidthb * (lines-1));
obviously needs to be changed to:
> dbits = (LPBYTE)dbits + (dstwidthb * (lines-1));
The patch can be found in the attached file "dib.c.patch".

Yours sincerely
-- 
Mathias Kosch <info at mkosch.de> | http://www.mkosch.de/
RSA Public Key: http://www.mkosch.de/pubkey

IT-Nachrichten auf heise online: http://www.heise.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: registry.c.patch
Type: application/octet-stream
Size: 1280 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080716/297c69d0/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dib.c.patch
Type: application/octet-stream
Size: 471 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080716/297c69d0/attachment-0001.obj 


More information about the wine-patches mailing list