Patrik Stridvall <[EMAIL PROTECTED]> writes:
> It doesn't support non-NULL terminated
> in-strings yet. I found no example of
> functions that used it, except TextOut
> so I haven't bothered. Does anybody
> know any more function than TextOut
> that uses non-NULL terminated in-strings?
>
> Comments?
I don't think there is enough regularity in the Windows API to make
this glue worthwhile. If you really want to cover more than a small
minority of cases you'll need to invent a glue syntax that will be at
least as complex as the generated code... simply consider all the
possible behaviors WRT return values, invalid pointers, integer ids
instead of pointers, DBCS, etc.
It is true that there are many places where we do approximately always
the same thing today, but this is because there has been no attempt to
make this more efficient; improving the current situation will require
changes tuned to the peculiarities of every function, rather than a
generic conversion mechanism. For instance the clipboard functions
that you used in your example should really be based on atoms which
would avoid doing any conversion at all.
And BTW using alloca() is not recommended as most threads usually have
a limited stack space and we are already using too much of it.
--
Alexandre Julliard
[EMAIL PROTECTED]