Signed-off-by: Bernhard Kölbl besentv@gmail.com --- v2: Remove unneeded macro. --- dlls/windows.media.speech/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/windows.media.speech/main.c b/dlls/windows.media.speech/main.c index 047e1ab0e90..d81cfad9ffe 100644 --- a/dlls/windows.media.speech/main.c +++ b/dlls/windows.media.speech/main.c @@ -30,13 +30,15 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory) { + const WCHAR *buffer = WindowsGetStringRawBuffer(classid, NULL); + TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
- if (wcscmp(WindowsGetStringRawBuffer(classid, NULL), L"Windows.Media.SpeechSynthesis.SpeechSynthesizer")) + if (!wcscmp(buffer, L"Windows.Media.SpeechSynthesis.SpeechSynthesizer")) { - ERR("Unknown classid %s.\n", debugstr_hstring(classid)); - return CLASS_E_CLASSNOTAVAILABLE; + return IActivationFactory_QueryInterface(synthesizer_factory, &IID_IActivationFactory, (void**)factory);; }
- return IActivationFactory_QueryInterface(synthesizer_factory, &IID_IActivationFactory, (void**)factory); + ERR("Unknown classid %s.\n", debugstr_hstring(classid)); + return CLASS_E_CLASSNOTAVAILABLE; }