From f6c7f150ec33d6ab53e18cdf4cef37470cc2cda0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Wed, 20 Jan 2021 10:30:05 +0100 Subject: [PATCH] windowscodecs: Use create_instance instead of ImagingFactory_CreateInstance. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Esme Povirk Signed-off-by: Alexandre Julliard --- dlls/windowscodecs/clsfactory.c | 2 +- dlls/windowscodecs/decoder.c | 2 +- dlls/windowscodecs/palette.c | 2 +- dlls/windowscodecs/wincodecs_private.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 914e8ad52cd..b2914a7fd5b 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -206,7 +206,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return ret; } -HRESULT create_instance(CLSID *clsid, const IID *iid, void **ppv) +HRESULT create_instance(const CLSID *clsid, const IID *iid, void **ppv) { int i; diff --git a/dlls/windowscodecs/decoder.c b/dlls/windowscodecs/decoder.c index 3e43fa91114..5970a44cd53 100644 --- a/dlls/windowscodecs/decoder.c +++ b/dlls/windowscodecs/decoder.c @@ -665,7 +665,7 @@ static HRESULT WINAPI CommonDecoderFrame_Block_GetReaderByIndex(IWICMetadataBloc else { if (SUCCEEDED(hr)) - hr = ImagingFactory_CreateInstance(&IID_IWICComponentFactory, (void**)&factory); + hr = create_instance(&CLSID_WICImagingFactory, &IID_IWICComponentFactory, (void**)&factory); if (SUCCEEDED(hr)) { diff --git a/dlls/windowscodecs/palette.c b/dlls/windowscodecs/palette.c index 34329717201..051a5944eb2 100644 --- a/dlls/windowscodecs/palette.c +++ b/dlls/windowscodecs/palette.c @@ -679,7 +679,7 @@ static HRESULT WINAPI PaletteImpl_InitializeFromBitmap(IWICPalette *palette, else rgb24_source = source; - hr = ImagingFactory_CreateInstance(&IID_IWICImagingFactory, (void **)&factory); + hr = create_instance(&CLSID_WICImagingFactory, &IID_IWICImagingFactory, (void **)&factory); if (hr != S_OK) goto fail; hr = IWICImagingFactory_CreateBitmapFromSource(factory, rgb24_source, WICBitmapCacheOnLoad, &rgb24_bitmap); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 3b20f7d6c24..85d057cc278 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -133,7 +133,7 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown) }; #undef INTERFACE -HRESULT create_instance(CLSID *clsid, const IID *iid, void **ppv) DECLSPEC_HIDDEN; +HRESULT create_instance(const CLSID *clsid, const IID *iid, void **ppv) DECLSPEC_HIDDEN; typedef HRESULT(*class_constructor)(REFIID,void**); extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;