GDI separation patch
Eric Pouech
eric.pouech at wanadoo.fr
Sun May 5 07:12:57 CDT 2002
> BTW, does anyone have an idea how to get rid of the remaining LOCAL_xxx()
> calls in gdiobj.c ?
> We need those because we do
> GDI_HeapSel = instance | 7;
> , so we directly use the GDI instance plus 7 as the heap selector
> for GDI objects (thus we can't do a standard LocalInit, as this would
> allocate a *new* selector for the new heap instead of using the implicit
> GDI module one, and thus we need to pass the GDI_HeapSel to LOCAL_Alloc instead)
I'd say: write a wrapper in gdi which
1/ sets DS to the GDI_HeapSel value
2/ calls LocalAlloc16 (for instance) (the call has to be a 16 bit
call),
so you need the relay to be generated for this 16 bit call
3/ restores old DS value (before 1)
this sounds hacky, but it was a standard way of using the LocalXXX on
several
64k buckets at the same time
you may also create a new type of 32 => 16 relay stub, which sets DS to
a
passed value... (that'd be IMO the cleanest way...)
A+
More information about the wine-devel
mailing list