Handle Types: Big flaw in wine

Daniel Santos javatroubadour at yahoo.com
Fri May 22 09:43:39 CDT 2009

As I've been working with user32, adding tests & such, I've noticed that gdi32 also suffers from the same drawbacks: it appears to have no mechanism to track object types with handles.  Thus, the functions (that I've examined thus far) simply assume that the caller responsibly passed a handle to the correct object type and proceeds with that assumption.  This is the cause of at least one bug that I know of (18371).

Right now, I'm trying to determine the best way to implement a solution and I'm still green to wine's architecture.  My initial thought was a handle type table in user32 that would just contain a handle's type as a byte (or possibly two types packed in one byte since there are less than 16) using a huge ugly 64k table that directly mapped handle to entry (ugly but correct) and something more efficient later.  But I'm wondering if it wouldn't be more appropriate to put something like that in kernel32's global arena table.

Input appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090522/efe67715/attachment.htm>

More information about the wine-devel mailing list