[ros-dev] Problem with out current NtGdiExtGetObjectW implementation
Alex Ionescu
ionucu at videotron.ca
Mon Apr 30 19:23:09 CEST 2007
Hi,
The NtGdi function in NT, according to my tests, only copies whatever can
fit in the union. I suggest we keep this behaviour.
Best regards,
Alex Ionescu
-----Original Message-----
From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org] On
Behalf Of Timo Kreuzer
Sent: April-30-07 9:38 AM
To: ros-dev at reactos.org
Subject: [ros-dev] Problem with out current NtGdiExtGetObjectW
implementation
Hi,
although I like the way NtGdiExtGetObjectW is using the union, we will
get a problem with it.
We don't know how many styles an extpen has, so we cannot statically
allocate a kmode buffer that is big enough.
I can currently think of 3 possible solutions:
1. Add a big additional hack for GDI_OBJECT_TYPE_EXTPEN in
NtGdiExtGetObjectW, that will copy the styles, wich seems to be a bad idea.
2. Use the old method of first calling IntGdiExtGetObjectW to get the
needed buffer size then allocate a kernelmode buffer then call
IntGdiExtGetObjectW again to tranfer the data then copy to usermode.
This is slower and needs extra memory.
3. Move the copying to usermode to the XXX_GetObject functions. This
would remove the need for an extra kernelmode buffer and we wouldn't
really need IntGdiExtGetObjectW anymore. But it doesn't match the rest
of our call chain design.
Comments appreciated.
Timo
_______________________________________________
Ros-dev mailing list
Ros-dev at reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
More information about the Ros-dev
mailing list