On 3/6/22 18:30, Bernhard Kölbl wrote:
- HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out) { FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out);
@@ -580,7 +38,5 @@ HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **fac return CLASS_E_CLASSNOTAVAILABLE; }
- *factory = &windows_media_speech.IActivationFactory_iface;
- IUnknown_AddRef(*factory);
- return S_OK;
- return IActivationFactory_QueryInterface(synthesizer_factory, &IID_IActivationFactory, (void**)factory); }
As discussed elsewhere, this should return the HRESULT on success only, and handle the error case differently to return the appropriate error.
Note that if you reorder your patches to rewrite DllGetClassObject first, as you're then requesting the HSTRING buffer pointer, you could then drop the debugstr_hstring helper.
It's alright to keep it if you need it for something else later (though maybe best to drop it now and add it back later), but you can still simply call debugstr_w with the buffer pointer here.