[ros-dev] Problem with out current NtGdiExtGetObjectW implementation
ionucu at videotron.ca
Mon Apr 30 19:23:09 CEST 2007
The NtGdi function in NT, according to my tests, only copies whatever can
fit in the union. I suggest we keep this behaviour.
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
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.
Ros-dev mailing list
Ros-dev at reactos.org
More information about the Ros-dev