From: "Rémi Bernon" Subject: Re: [PATCH 06/11] windows.media.speech: Move speechsynthesis into a seperate file. Message-Id: Date: Wed, 19 Jan 2022 19:34:58 +0100 In-Reply-To: <20220119132819.18340-7-besentv@gmail.com> References: <20220119132819.18340-1-besentv@gmail.com> <20220119132819.18340-7-besentv@gmail.com> On 1/19/22 14:28, Bernhard Kölbl wrote: > + > +struct activation_factory > +{ > + /* Factories */ > + IActivationFactory IActivationFactory_iface; > + /* Static interfaces */ > + IInstalledVoicesStatic IInstalledVoicesStatic_iface; > + /* Variables */ > + HRESULT (*create_instance)(IInspectable **instance); > + LONG ref; > +}; Not really going into the details but this looks weird and wrong, I expect each class to have their own unique activation factory, and each of the factory to implement all the "static" interfaces that are declared for their class, but not for a factory to have the "static" interfaces that are declared on a different class. Like for instance, the SpeechRecognizer activation factory should only implement the IActivationFactory, ISpeechRecognizerStatics and ISpeechRecognizerStatics2 interfaces, not IInstalledVoicesStatic or IInstalledVoicesStatic2. And the SpeechSynthesizer activation factory should only implement the IActivationFactory, IInstalledVoicesStatic and IInstalledVoicesStatic2 interfaces. So the factories may still be declared statically, and in separate files, but probably shouldn't share the same structure. Could be all dispatched with some get__factory functions implemented in separate files and returning the IActivationFactory iface pointer. Of course, tests could and should tell if this is really how it all works. -- Rémi Bernon