[RFC v2] widl: Add option to generate classfactory
Jacek Caban
jacek at codeweavers.com
Wed Nov 14 12:09:58 CST 2018
Hi Fabian,
On 10/11/2018 23:57, Fabian Maurer wrote:
> Since the com simplification with the macros is probably not feasible,
> here an approach that reuses an old idea - using widl to generate
> a classfactory.
Since the code that you generate seems very similar to what you sent in
header, comments that I sent you to that patch apply here as well.
Other than that, you introduce wine/debug.h dependency in widl generated
sources, which makes it usable only for Wine internals. Introducing
something only for Wine internals in widl could be fine if justified,
but I'm not sure that's the case.
This implementation does not allow DLLs to mix custom class factories
and generated ones in the same DLL. Some class factories need for
example additional interfaces. Those will have to be implemented from
scratch, which is fine. But if other class factories from the same DLL
could use generic implementation, they can't because of how
DllGetClassObject is generated.
On the first look I liked the idea of using widl for class factories.
But after having closer look, I'm no longer convinced it's the right
tool. Class factories are really simple things, and having widl
extension might be more complexity than it's worth. A simple header with
default implementation and a single macro just for vtbl (not for the
actual code) is all that's really needed.
Thanks,
Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181114/def63744/attachment.html>
More information about the wine-devel
mailing list