[1/2] user32: Fixed bug in loading .cur files

JIM CAMERON jim_24601 at btinternet.com
Wed Aug 27 07:27:42 CDT 2008

The existing code to load a cursor from an icon file
slurps the file into memory and calls
CreateIconFromResourceEx() to create the cursor
proper. However, CreateIconFromResourceEx() expects
the hotspot to immediately precede the bitmap
definition in memory when called to create a cursor,
which is not the case in an icon file, since the
hotspot already exists in the icon info. This causes
the process to fail.

The attached patch extracts the guts from
CreateIconFromResourceEx() into a separate function
taking a bitmap and a hotspot, and makes
CreateIconFromResourceEx() and
CURSORICON_LoadFromFile() call it after extracting the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fixed-bug-in-loading-.cur-files.patch
Type: application/octet-stream
Size: 4586 bytes
Desc: 2301670516-0003-Fixed-bug-in-loading-.cur-files.patch
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080827/3c35e666/attachment.obj 

More information about the wine-patches mailing list