That's what we are using.
And in fact it seems that Windows supports a maximum of 16 styles for extpens and that will fit in our union.
Yay! ;-)

Jerry schrieb:
What about a stack buffer that can hold most of all cases?

On 4/30/07, Alex Ionescu <ionucu@videotron.ca> wrote:
  
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@reactos.org [mailto:ros-dev-bounces@reactos.org] On
Behalf Of Timo Kreuzer
Sent: April-30-07 9:38 AM
To: ros-dev@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@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

    
_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev