Commit f6c7f150 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

windowscodecs: Use create_instance instead of ImagingFactory_CreateInstance.

parent 3549097c
...@@ -206,7 +206,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) ...@@ -206,7 +206,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return ret; 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; int i;
......
...@@ -665,7 +665,7 @@ static HRESULT WINAPI CommonDecoderFrame_Block_GetReaderByIndex(IWICMetadataBloc ...@@ -665,7 +665,7 @@ static HRESULT WINAPI CommonDecoderFrame_Block_GetReaderByIndex(IWICMetadataBloc
else else
{ {
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
hr = ImagingFactory_CreateInstance(&IID_IWICComponentFactory, (void**)&factory); hr = create_instance(&CLSID_WICImagingFactory, &IID_IWICComponentFactory, (void**)&factory);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
......
...@@ -679,7 +679,7 @@ static HRESULT WINAPI PaletteImpl_InitializeFromBitmap(IWICPalette *palette, ...@@ -679,7 +679,7 @@ static HRESULT WINAPI PaletteImpl_InitializeFromBitmap(IWICPalette *palette,
else else
rgb24_source = source; 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; if (hr != S_OK) goto fail;
hr = IWICImagingFactory_CreateBitmapFromSource(factory, rgb24_source, WICBitmapCacheOnLoad, &rgb24_bitmap); hr = IWICImagingFactory_CreateBitmapFromSource(factory, rgb24_source, WICBitmapCacheOnLoad, &rgb24_bitmap);
......
...@@ -133,7 +133,7 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown) ...@@ -133,7 +133,7 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
}; };
#undef INTERFACE #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**); typedef HRESULT(*class_constructor)(REFIID,void**);
extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment