Uwe Bonnes wrote:
The present code corrupts the heap in some situation, causing trouble and crashes hard to correlate to this function for most users. In the other cases it doesn't work, resulting is garbage displayed.
All those bitmap things are area where I have few knowledge, so I am not the one to fix it (also I tried some approaches...).
Do you have sample code/applications that experience corruption on CopyImage()? This looks like it is related to a problem in which VB6 apps that use the toolbar control display a garbled transparency on Wine (such as MP3GainGUI http://mp3gain.sourceforge.net/). The ideal sample would be one with source code that directly calls CopyImage() and gets its memory corrupted as a result.
Alex Villacís Lasso