Re[1] user32/tests: Check effect of magic font height value 0x7fff in dialog template (try 2)

Koro webmaster at korosoft.net
Tue Mar 24 06:55:10 CDT 2009


> Why don't you add this to the resource file?

Because this dialog template does not declare the weight, italic, 
charset and fontname members, due to the font size being 0x7fff and 
therefore interpreted "specially". AFAIK, wrc probably wouldn't be able 
to generate such a template, the MS RC compiler sure can't.

Therefore the need to specify the exact raw binary data, which is quite 
the point of this testcase anyway, to prove Wine handles it wrong.

> This is wrong. It shouldn't be todo_wine. If you properly put template into
> resources you can use CreateDialogIndirectParamA

There is a reason I use CreateDialogIndirectParamW. The dialog template, 
when passed to CreateDialogIndirectParamA on Windows 98 or ME, just 
crashes deep into USER.EXE.

So I use the W-call here for a very specific reason, to get it to fail 
on Win9x, since W-calls aren't implemented there­. So the only cases 
when this might return NULL are:

- Running on Win9x (unimplemented)
- Running on Wine (Wine does not properly parse the template because of 
the 0x7fff, tries to read weight, italic, charset and fontname and is 
totally wrongly offset for the rest of the template, causing it to fail 
creation of the control, therefore aborting dialog creation and 
returning NULL)

So, in order to cover these two cases, I use todo_wine win_skip. 
win_skip by itself registers as a skip on Windows, an error on Wine, but 
the todo_wine changes it to a mere todo. (My patch to fix it will come 
after this one has been accepted.)

Hope this clears that up.
- Koro





More information about the wine-devel mailing list