ddraw.h structure alignment

Markus Stockhausen markus.stockhausen at collogia.de
Sun Oct 11 07:42:26 CDT 2009


Am Sonntag, den 11.10.2009, 13:18 +0200 schrieb Markus Stockhausen:
> Then I'm somehow in trouble. How can one explain the following 
> error: Application calls IDirectDraw GetDeviceIdentifier of
> DDRAW7 but only reserves memory with sizeof(DDEVICEIDENTIFIER) 
> instead of sizeof(DDEVICEIDENTIFIER2) bytes. Wine returns the 
> required structure but with the contents of dwWHQLLevel  
> stack contents are overwritten.
> 
> Markus
> 

Source of error was found. DDEVICEIDENTIFIER2 is aligned to 8 bytes and
therefore 4 bytes too large (at least on my 64 bit Linux). Should a
patch include a pragma pack handling in the ddraw.h file itself or is
there any other location where one can fix that?

Best regards.

Markus




More information about the wine-devel mailing list