mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
[WINDOWSCODECS]
* Sync with Wine 1.7.17. CORE-8080 svn path=/trunk/; revision=62936
This commit is contained in:
parent
e620c729eb
commit
d235a6b915
22 changed files with 656 additions and 186 deletions
|
@ -18,9 +18,15 @@
|
||||||
|
|
||||||
#include "wincodecs_private.h"
|
#include "wincodecs_private.h"
|
||||||
|
|
||||||
|
/* WARNING: .NET Media Integration Layer (MIL) directly dereferences
|
||||||
|
* BitmapImpl members and depends on its exact layout.
|
||||||
|
*/
|
||||||
typedef struct BitmapImpl {
|
typedef struct BitmapImpl {
|
||||||
IWICBitmap IWICBitmap_iface;
|
IMILUnknown1 IMILUnknown1_iface;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
IMILBitmapSource IMILBitmapSource_iface;
|
||||||
|
IWICBitmap IWICBitmap_iface;
|
||||||
|
IMILUnknown2 IMILUnknown2_iface;
|
||||||
IWICPalette *palette;
|
IWICPalette *palette;
|
||||||
int palette_set;
|
int palette_set;
|
||||||
LONG lock; /* 0 if not locked, -1 if locked for writing, count if locked for reading */
|
LONG lock; /* 0 if not locked, -1 if locked for writing, count if locked for reading */
|
||||||
|
@ -46,6 +52,21 @@ static inline BitmapImpl *impl_from_IWICBitmap(IWICBitmap *iface)
|
||||||
return CONTAINING_RECORD(iface, BitmapImpl, IWICBitmap_iface);
|
return CONTAINING_RECORD(iface, BitmapImpl, IWICBitmap_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline BitmapImpl *impl_from_IMILBitmapSource(IMILBitmapSource *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, BitmapImpl, IMILBitmapSource_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline BitmapImpl *impl_from_IMILUnknown1(IMILUnknown1 *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown1_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline BitmapImpl *impl_from_IMILUnknown2(IMILUnknown2 *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown2_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static inline BitmapLockImpl *impl_from_IWICBitmapLock(IWICBitmapLock *iface)
|
static inline BitmapLockImpl *impl_from_IWICBitmapLock(IWICBitmapLock *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, BitmapLockImpl, IWICBitmapLock_iface);
|
return CONTAINING_RECORD(iface, BitmapLockImpl, IWICBitmapLock_iface);
|
||||||
|
@ -213,6 +234,10 @@ static HRESULT WINAPI BitmapImpl_QueryInterface(IWICBitmap *iface, REFIID iid,
|
||||||
{
|
{
|
||||||
*ppv = &This->IWICBitmap_iface;
|
*ppv = &This->IWICBitmap_iface;
|
||||||
}
|
}
|
||||||
|
else if (IsEqualIID(&IID_IMILBitmapSource, iid))
|
||||||
|
{
|
||||||
|
*ppv = &This->IMILBitmapSource_iface;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
@ -431,6 +456,229 @@ static const IWICBitmapVtbl BitmapImpl_Vtbl = {
|
||||||
BitmapImpl_SetResolution
|
BitmapImpl_SetResolution
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmapSource *iface, REFIID iid,
|
||||||
|
void **ppv)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
|
if (!ppv) return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (IsEqualIID(&IID_IUnknown, iid) ||
|
||||||
|
IsEqualIID(&IID_IMILBitmapSource, iid))
|
||||||
|
{
|
||||||
|
IUnknown_AddRef(&This->IMILBitmapSource_iface);
|
||||||
|
*ppv = &This->IMILBitmapSource_iface;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppv = NULL;
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILBitmapImpl_AddRef(IMILBitmapSource *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_AddRef(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmapSource *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_Release(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmapSource *iface,
|
||||||
|
UINT *width, UINT *height)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct
|
||||||
|
{
|
||||||
|
const GUID *WIC_format;
|
||||||
|
int enum_format;
|
||||||
|
} pixel_fmt_map[] =
|
||||||
|
{
|
||||||
|
{ &GUID_WICPixelFormatDontCare, 0 },
|
||||||
|
{ &GUID_WICPixelFormat1bppIndexed, 1 },
|
||||||
|
{ &GUID_WICPixelFormat2bppIndexed, 2 },
|
||||||
|
{ &GUID_WICPixelFormat4bppIndexed, 3 },
|
||||||
|
{ &GUID_WICPixelFormat8bppIndexed, 4 },
|
||||||
|
{ &GUID_WICPixelFormatBlackWhite, 5 },
|
||||||
|
{ &GUID_WICPixelFormat2bppGray, 6 },
|
||||||
|
{ &GUID_WICPixelFormat4bppGray, 7 },
|
||||||
|
{ &GUID_WICPixelFormat8bppGray, 8 },
|
||||||
|
{ &GUID_WICPixelFormat16bppBGR555, 9 },
|
||||||
|
{ &GUID_WICPixelFormat16bppBGR565, 0x0a },
|
||||||
|
{ &GUID_WICPixelFormat16bppGray, 0x0b },
|
||||||
|
{ &GUID_WICPixelFormat24bppBGR, 0x0c },
|
||||||
|
{ &GUID_WICPixelFormat24bppRGB, 0x0d },
|
||||||
|
{ &GUID_WICPixelFormat32bppBGR, 0x0e },
|
||||||
|
{ &GUID_WICPixelFormat32bppBGRA, 0x0f },
|
||||||
|
{ &GUID_WICPixelFormat32bppPBGRA, 0x10 },
|
||||||
|
{ &GUID_WICPixelFormat48bppRGB, 0x15 },
|
||||||
|
{ &GUID_WICPixelFormat64bppRGBA, 0x16 },
|
||||||
|
{ &GUID_WICPixelFormat64bppPRGBA, 0x17 },
|
||||||
|
{ &GUID_WICPixelFormat32bppCMYK, 0x1c }
|
||||||
|
};
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmapSource *iface,
|
||||||
|
int *format)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
TRACE("(%p,%p)\n", iface, format);
|
||||||
|
|
||||||
|
if (!format) return E_INVALIDARG;
|
||||||
|
|
||||||
|
*format = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof(pixel_fmt_map)/sizeof(pixel_fmt_map[0]); i++)
|
||||||
|
{
|
||||||
|
if (IsEqualGUID(pixel_fmt_map[i].WIC_format, &This->pixelformat))
|
||||||
|
{
|
||||||
|
*format = pixel_fmt_map[i].enum_format;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmapSource *iface,
|
||||||
|
double *dpix, double *dpiy)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmapSource *iface,
|
||||||
|
IWICPalette *palette)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmapSource *iface,
|
||||||
|
const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, void **ppv)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
|
||||||
|
|
||||||
|
TRACE("(%p,%p)\n", iface, ppv);
|
||||||
|
|
||||||
|
if (!ppv) return E_INVALIDARG;
|
||||||
|
|
||||||
|
IUnknown_AddRef(&This->IMILUnknown1_iface);
|
||||||
|
*ppv = &This->IMILUnknown1_iface;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IMILBitmapSourceVtbl IMILBitmapImpl_Vtbl =
|
||||||
|
{
|
||||||
|
IMILBitmapImpl_QueryInterface,
|
||||||
|
IMILBitmapImpl_AddRef,
|
||||||
|
IMILBitmapImpl_Release,
|
||||||
|
IMILBitmapImpl_GetSize,
|
||||||
|
IMILBitmapImpl_GetPixelFormat,
|
||||||
|
IMILBitmapImpl_GetResolution,
|
||||||
|
IMILBitmapImpl_CopyPalette,
|
||||||
|
IMILBitmapImpl_CopyPixels,
|
||||||
|
IMILBitmapImpl_UnknownMethod1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid,
|
||||||
|
void **ppv)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown1(iface);
|
||||||
|
|
||||||
|
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
|
if (!ppv) return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (IsEqualIID(&IID_IUnknown, iid))
|
||||||
|
{
|
||||||
|
IUnknown_AddRef(&This->IMILUnknown1_iface);
|
||||||
|
*ppv = iface;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown1(iface);
|
||||||
|
return IWICBitmap_AddRef(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown1(iface);
|
||||||
|
return IWICBitmap_Release(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl =
|
||||||
|
{
|
||||||
|
IMILUnknown1Impl_QueryInterface,
|
||||||
|
IMILUnknown1Impl_AddRef,
|
||||||
|
IMILUnknown1Impl_Release,
|
||||||
|
};
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid,
|
||||||
|
void **ppv)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown2(iface);
|
||||||
|
|
||||||
|
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
|
if (!ppv) return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (IsEqualIID(&IID_IUnknown, iid))
|
||||||
|
{
|
||||||
|
IUnknown_AddRef(&This->IMILUnknown2_iface);
|
||||||
|
*ppv = iface;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown2(iface);
|
||||||
|
return IWICBitmap_AddRef(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface)
|
||||||
|
{
|
||||||
|
BitmapImpl *This = impl_from_IMILUnknown2(iface);
|
||||||
|
return IWICBitmap_Release(&This->IWICBitmap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI IMILUnknown2Impl_UnknownMethod1(IMILUnknown2 *iface, void *arg1, void *arg2)
|
||||||
|
{
|
||||||
|
FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl =
|
||||||
|
{
|
||||||
|
IMILUnknown2Impl_QueryInterface,
|
||||||
|
IMILUnknown2Impl_AddRef,
|
||||||
|
IMILUnknown2Impl_Release,
|
||||||
|
IMILUnknown2Impl_UnknownMethod1,
|
||||||
|
};
|
||||||
|
|
||||||
HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
||||||
UINT stride, UINT datasize, BYTE *bits,
|
UINT stride, UINT datasize, BYTE *bits,
|
||||||
REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option,
|
REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option,
|
||||||
|
@ -461,6 +709,9 @@ HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
||||||
if (bits) memcpy(data, bits, datasize);
|
if (bits) memcpy(data, bits, datasize);
|
||||||
|
|
||||||
This->IWICBitmap_iface.lpVtbl = &BitmapImpl_Vtbl;
|
This->IWICBitmap_iface.lpVtbl = &BitmapImpl_Vtbl;
|
||||||
|
This->IMILBitmapSource_iface.lpVtbl = &IMILBitmapImpl_Vtbl;
|
||||||
|
This->IMILUnknown1_iface.lpVtbl = &IMILUnknown1Impl_Vtbl;
|
||||||
|
This->IMILUnknown2_iface.lpVtbl = &IMILUnknown2Impl_Vtbl;
|
||||||
This->ref = 1;
|
This->ref = 1;
|
||||||
This->palette = NULL;
|
This->palette = NULL;
|
||||||
This->palette_set = 0;
|
This->palette_set = 0;
|
||||||
|
|
|
@ -1169,17 +1169,15 @@ static HRESULT BmpDecoder_Create(int packed, int icoframe, BmpDecoder **ppDecode
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
static HRESULT BmpDecoder_Construct(int packed, int icoframe, REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
BmpDecoder *This;
|
BmpDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
ret = BmpDecoder_Create(packed, icoframe, &This);
|
ret = BmpDecoder_Create(packed, icoframe, &This);
|
||||||
if (FAILED(ret)) return ret;
|
if (FAILED(ret)) return ret;
|
||||||
|
|
||||||
|
@ -1189,14 +1187,14 @@ static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOute
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT BmpDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
return BmpDecoder_Construct(FALSE, FALSE, pUnkOuter, iid, ppv);
|
return BmpDecoder_Construct(FALSE, FALSE, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
return BmpDecoder_Construct(TRUE, FALSE, pUnkOuter, iid, ppv);
|
return BmpDecoder_Construct(TRUE, FALSE, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder)
|
HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder)
|
||||||
|
|
|
@ -586,17 +586,15 @@ static const IWICBitmapEncoderVtbl BmpEncoder_Vtbl = {
|
||||||
BmpEncoder_GetMetadataQueryWriter
|
BmpEncoder_GetMetadataQueryWriter
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
BmpEncoder *This;
|
BmpEncoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpEncoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpEncoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ extern HRESULT WINAPI WIC_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
REFCLSID classid;
|
REFCLSID classid;
|
||||||
HRESULT (*constructor)(IUnknown*,REFIID,void**);
|
HRESULT (*constructor)(REFIID,void**);
|
||||||
} classinfo;
|
} classinfo;
|
||||||
|
|
||||||
static const classinfo wic_classes[] = {
|
static const classinfo wic_classes[] = {
|
||||||
|
@ -112,7 +112,11 @@ static HRESULT WINAPI ClassFactoryImpl_CreateInstance(IClassFactory *iface,
|
||||||
{
|
{
|
||||||
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||||
|
|
||||||
return This->info->constructor(pUnkOuter, riid, ppv);
|
*ppv = NULL;
|
||||||
|
|
||||||
|
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
||||||
|
|
||||||
|
return This->info->constructor(riid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock)
|
static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock)
|
||||||
|
|
|
@ -1256,17 +1256,15 @@ static const IWICFormatConverterVtbl FormatConverter_Vtbl = {
|
||||||
FormatConverter_CanConvert
|
FormatConverter_CanConvert
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT FormatConverter_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
FormatConverter *This;
|
FormatConverter *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(FormatConverter));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(FormatConverter));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -129,9 +129,9 @@ static const MetadataHandlerVtbl LSDReader_Vtbl = {
|
||||||
load_LSD_metadata
|
load_LSD_metadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&LSDReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "pshpack1.h"
|
#include "pshpack1.h"
|
||||||
|
@ -227,9 +227,9 @@ static const MetadataHandlerVtbl IMDReader_Vtbl = {
|
||||||
load_IMD_metadata
|
load_IMD_metadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&IMDReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&IMDReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
||||||
|
@ -305,9 +305,9 @@ static const MetadataHandlerVtbl GCEReader_Vtbl = {
|
||||||
load_GCE_metadata
|
load_GCE_metadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&GCEReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&GCEReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
||||||
|
@ -412,9 +412,9 @@ static const MetadataHandlerVtbl APEReader_Vtbl = {
|
||||||
load_APE_metadata
|
load_APE_metadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT APEReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&APEReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&APEReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWORD options,
|
||||||
|
@ -506,9 +506,9 @@ static const MetadataHandlerVtbl GifCommentReader_Vtbl = {
|
||||||
load_GifComment_metadata
|
load_GifComment_metadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&GifCommentReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&GifCommentReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IStream *create_stream(const void *data, int data_size)
|
static IStream *create_stream(const void *data, int data_size)
|
||||||
|
@ -1079,7 +1079,7 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IStream_Read(stream, data, len, &bytesread);
|
hr = IStream_Read(stream, data, len, &bytesread);
|
||||||
if (hr != S_OK) bytesread = 0;
|
if (FAILED(hr)) bytesread = 0;
|
||||||
return bytesread;
|
return bytesread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1402,17 +1402,15 @@ static const IWICMetadataBlockReaderVtbl GifDecoder_BlockVtbl =
|
||||||
GifDecoder_Block_GetEnumerator
|
GifDecoder_Block_GetEnumerator
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT GifDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
GifDecoder *This;
|
GifDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(GifDecoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(GifDecoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,6 @@ DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0
|
||||||
DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);
|
DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);
|
||||||
DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
|
DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
|
||||||
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
|
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
|
||||||
|
DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
|
||||||
|
|
||||||
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
|
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
|
||||||
|
|
|
@ -730,17 +730,15 @@ static const IWICBitmapEncoderVtbl IcnsEncoder_Vtbl = {
|
||||||
IcnsEncoder_GetMetadataQueryWriter
|
IcnsEncoder_GetMetadataQueryWriter
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
IcnsEncoder *This;
|
IcnsEncoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcnsEncoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcnsEncoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
@ -763,7 +761,7 @@ HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
#else /* !defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) ||
|
#else /* !defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) ||
|
||||||
MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 */
|
MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 */
|
||||||
|
|
||||||
HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to save ICNS picture, but ICNS support is not compiled in.\n");
|
ERR("Trying to save ICNS picture, but ICNS support is not compiled in.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
|
@ -216,7 +216,7 @@ static HRESULT ReadIcoDib(IStream *stream, IcoFrameDecode *result)
|
||||||
IWICBitmapFrameDecode *framedecode;
|
IWICBitmapFrameDecode *framedecode;
|
||||||
WICPixelFormatGUID pixelformat;
|
WICPixelFormatGUID pixelformat;
|
||||||
IWICBitmapSource *source;
|
IWICBitmapSource *source;
|
||||||
int has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */
|
BOOL has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */
|
||||||
WICRect rc;
|
WICRect rc;
|
||||||
|
|
||||||
hr = IcoDibDecoder_CreateInstance(&bmp_decoder);
|
hr = IcoDibDecoder_CreateInstance(&bmp_decoder);
|
||||||
|
@ -381,7 +381,7 @@ static HRESULT ReadIcoPng(IStream *stream, IcoFrameDecode *result)
|
||||||
WICRect rect;
|
WICRect rect;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hr = PngDecoder_CreateInstance(NULL, &IID_IWICBitmapDecoder, (void**)&decoder);
|
hr = PngDecoder_CreateInstance(&IID_IWICBitmapDecoder, (void**)&decoder);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto end;
|
goto end;
|
||||||
hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad);
|
hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad);
|
||||||
|
@ -722,17 +722,15 @@ static const IWICBitmapDecoderVtbl IcoDecoder_Vtbl = {
|
||||||
IcoDecoder_GetFrame
|
IcoDecoder_GetFrame
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
IcoDecoder *This;
|
IcoDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcoDecoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcoDecoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ static HRESULT WINAPI ComponentFactory_CreatePalette(IWICComponentFactory *iface
|
||||||
static HRESULT WINAPI ComponentFactory_CreateFormatConverter(IWICComponentFactory *iface,
|
static HRESULT WINAPI ComponentFactory_CreateFormatConverter(IWICComponentFactory *iface,
|
||||||
IWICFormatConverter **ppIFormatConverter)
|
IWICFormatConverter **ppIFormatConverter)
|
||||||
{
|
{
|
||||||
return FormatConverter_CreateInstance(NULL, &IID_IWICFormatConverter, (void**)ppIFormatConverter);
|
return FormatConverter_CreateInstance(&IID_IWICFormatConverter, (void**)ppIFormatConverter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ComponentFactory_CreateBitmapScaler(IWICComponentFactory *iface,
|
static HRESULT WINAPI ComponentFactory_CreateBitmapScaler(IWICComponentFactory *iface,
|
||||||
|
@ -585,12 +585,166 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromMemory(IWICComponentFacto
|
||||||
return BitmapImpl_Create(width, height, stride, size, buffer, format, WICBitmapCacheOnLoad, bitmap);
|
return BitmapImpl_Create(width, height, stride, size, buffer, format, WICBitmapCacheOnLoad, bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHBITMAP(IWICComponentFactory *iface,
|
static BOOL get_16bpp_format(HBITMAP hbm, WICPixelFormatGUID *format)
|
||||||
HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options,
|
|
||||||
IWICBitmap **ppIBitmap)
|
|
||||||
{
|
{
|
||||||
FIXME("(%p,%p,%p,%u,%p): stub\n", iface, hBitmap, hPalette, options, ppIBitmap);
|
BOOL ret = TRUE;
|
||||||
return E_NOTIMPL;
|
BITMAPV4HEADER bmh;
|
||||||
|
HDC hdc;
|
||||||
|
|
||||||
|
hdc = CreateCompatibleDC(0);
|
||||||
|
|
||||||
|
memset(&bmh, 0, sizeof(bmh));
|
||||||
|
bmh.bV4Size = sizeof(bmh);
|
||||||
|
bmh.bV4Width = 1;
|
||||||
|
bmh.bV4Height = 1;
|
||||||
|
bmh.bV4V4Compression = BI_BITFIELDS;
|
||||||
|
bmh.bV4BitCount = 16;
|
||||||
|
|
||||||
|
GetDIBits(hdc, hbm, 0, 0, NULL, (BITMAPINFO *)&bmh, DIB_RGB_COLORS);
|
||||||
|
|
||||||
|
if (bmh.bV4RedMask == 0x7c00 &&
|
||||||
|
bmh.bV4GreenMask == 0x3e0 &&
|
||||||
|
bmh.bV4BlueMask == 0x1f)
|
||||||
|
{
|
||||||
|
*format = GUID_WICPixelFormat16bppBGR555;
|
||||||
|
}
|
||||||
|
else if (bmh.bV4RedMask == 0xf800 &&
|
||||||
|
bmh.bV4GreenMask == 0x7e0 &&
|
||||||
|
bmh.bV4BlueMask == 0x1f)
|
||||||
|
{
|
||||||
|
*format = GUID_WICPixelFormat16bppBGR565;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FIXME("unrecognized bitfields %x,%x,%x\n", bmh.bV4RedMask,
|
||||||
|
bmh.bV4GreenMask, bmh.bV4BlueMask);
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DeleteDC(hdc);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHBITMAP(IWICComponentFactory *iface,
|
||||||
|
HBITMAP hbm, HPALETTE hpal, WICBitmapAlphaChannelOption option, IWICBitmap **bitmap)
|
||||||
|
{
|
||||||
|
BITMAP bm;
|
||||||
|
HRESULT hr;
|
||||||
|
WICPixelFormatGUID format;
|
||||||
|
IWICBitmapLock *lock;
|
||||||
|
UINT size, num_palette_entries = 0;
|
||||||
|
PALETTEENTRY entry[256];
|
||||||
|
|
||||||
|
TRACE("(%p,%p,%p,%u,%p)\n", iface, hbm, hpal, option, bitmap);
|
||||||
|
|
||||||
|
if (!bitmap) return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (GetObjectW(hbm, sizeof(bm), &bm) != sizeof(bm))
|
||||||
|
return WINCODEC_ERR_WIN32ERROR;
|
||||||
|
|
||||||
|
if (hpal)
|
||||||
|
{
|
||||||
|
num_palette_entries = GetPaletteEntries(hpal, 0, 256, entry);
|
||||||
|
if (!num_palette_entries)
|
||||||
|
return WINCODEC_ERR_WIN32ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: Figure out the correct format for 16, 32, 64 bpp */
|
||||||
|
switch(bm.bmBitsPixel)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
format = GUID_WICPixelFormat1bppIndexed;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
format = GUID_WICPixelFormat4bppIndexed;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
format = GUID_WICPixelFormat8bppIndexed;
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
if (!get_16bpp_format(hbm, &format))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
format = GUID_WICPixelFormat24bppBGR;
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
switch (option)
|
||||||
|
{
|
||||||
|
case WICBitmapUseAlpha:
|
||||||
|
format = GUID_WICPixelFormat32bppBGRA;
|
||||||
|
break;
|
||||||
|
case WICBitmapUsePremultipliedAlpha:
|
||||||
|
format = GUID_WICPixelFormat32bppPBGRA;
|
||||||
|
break;
|
||||||
|
case WICBitmapIgnoreAlpha:
|
||||||
|
format = GUID_WICPixelFormat32bppBGR;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 48:
|
||||||
|
format = GUID_WICPixelFormat48bppRGB;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FIXME("unsupported %d bpp\n", bm.bmBitsPixel);
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = BitmapImpl_Create(bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, 0, NULL, &format, option, bitmap);
|
||||||
|
if (hr != S_OK) return hr;
|
||||||
|
|
||||||
|
hr = IWICBitmap_Lock(*bitmap, NULL, WICBitmapLockWrite, &lock);
|
||||||
|
if (hr == S_OK)
|
||||||
|
{
|
||||||
|
BYTE *buffer;
|
||||||
|
HDC hdc;
|
||||||
|
char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
|
||||||
|
BITMAPINFO *bmi = (BITMAPINFO *)bmibuf;
|
||||||
|
|
||||||
|
IWICBitmapLock_GetDataPointer(lock, &size, &buffer);
|
||||||
|
|
||||||
|
hdc = CreateCompatibleDC(0);
|
||||||
|
|
||||||
|
bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
|
bmi->bmiHeader.biBitCount = 0;
|
||||||
|
GetDIBits(hdc, hbm, 0, 0, NULL, bmi, DIB_RGB_COLORS);
|
||||||
|
bmi->bmiHeader.biHeight = -bm.bmHeight;
|
||||||
|
GetDIBits(hdc, hbm, 0, bm.bmHeight, buffer, bmi, DIB_RGB_COLORS);
|
||||||
|
|
||||||
|
DeleteDC(hdc);
|
||||||
|
IWICBitmapLock_Release(lock);
|
||||||
|
|
||||||
|
if (num_palette_entries)
|
||||||
|
{
|
||||||
|
IWICPalette *palette;
|
||||||
|
WICColor colors[256];
|
||||||
|
UINT i;
|
||||||
|
|
||||||
|
hr = PaletteImpl_Create(&palette);
|
||||||
|
if (hr == S_OK)
|
||||||
|
{
|
||||||
|
for (i = 0; i < num_palette_entries; i++)
|
||||||
|
colors[i] = 0xff000000 | entry[i].peRed << 16 |
|
||||||
|
entry[i].peGreen << 8 | entry[i].peBlue;
|
||||||
|
|
||||||
|
hr = IWICPalette_InitializeCustom(palette, colors, num_palette_entries);
|
||||||
|
if (hr == S_OK)
|
||||||
|
hr = IWICBitmap_SetPalette(*bitmap, palette);
|
||||||
|
|
||||||
|
IWICPalette_Release(palette);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hr != S_OK)
|
||||||
|
{
|
||||||
|
IWICBitmap_Release(*bitmap);
|
||||||
|
*bitmap = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactory *iface,
|
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactory *iface,
|
||||||
|
@ -860,17 +1014,15 @@ static const IWICComponentFactoryVtbl ComponentFactory_Vtbl = {
|
||||||
ComponentFactory_CreateEncoderPropertyBag
|
ComponentFactory_CreateEncoderPropertyBag
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT ComponentFactory_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ComponentFactory *This;
|
ComponentFactory *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentFactory));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentFactory));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -1754,7 +1754,7 @@ HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
|
||||||
WCHAR guidstring[39];
|
WCHAR guidstring[39];
|
||||||
LONG res;
|
LONG res;
|
||||||
const struct category *category;
|
const struct category *category;
|
||||||
int found=0;
|
BOOL found = FALSE;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, KEY_READ, &clsidkey);
|
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, KEY_READ, &clsidkey);
|
||||||
|
@ -1775,7 +1775,7 @@ HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegCloseKey(classkey);
|
RegCloseKey(classkey);
|
||||||
found = 1;
|
found = TRUE;
|
||||||
}
|
}
|
||||||
RegCloseKey(instancekey);
|
RegCloseKey(instancekey);
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,7 +231,7 @@ static jpeg_boolean source_mgr_fill_input_buffer(j_decompress_ptr cinfo)
|
||||||
|
|
||||||
hr = IStream_Read(This->stream, This->source_buffer, 1024, &bytesread);
|
hr = IStream_Read(This->stream, This->source_buffer, 1024, &bytesread);
|
||||||
|
|
||||||
if (hr != S_OK || bytesread == 0)
|
if (FAILED(hr) || bytesread == 0)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -696,12 +696,12 @@ static const IWICBitmapFrameDecodeVtbl JpegDecoder_Frame_Vtbl = {
|
||||||
JpegDecoder_Frame_GetThumbnail
|
JpegDecoder_Frame_GetThumbnail
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
JpegDecoder *This;
|
JpegDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
if (!libjpeg_handle && !load_libjpeg())
|
if (!libjpeg_handle && !load_libjpeg())
|
||||||
{
|
{
|
||||||
|
@ -711,8 +711,6 @@ HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(JpegDecoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(JpegDecoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
@ -754,13 +752,13 @@ typedef struct JpegEncoder {
|
||||||
struct jpeg_compress_struct cinfo;
|
struct jpeg_compress_struct cinfo;
|
||||||
struct jpeg_error_mgr jerr;
|
struct jpeg_error_mgr jerr;
|
||||||
struct jpeg_destination_mgr dest_mgr;
|
struct jpeg_destination_mgr dest_mgr;
|
||||||
int initialized;
|
BOOL initialized;
|
||||||
int frame_count;
|
int frame_count;
|
||||||
int frame_initialized;
|
BOOL frame_initialized;
|
||||||
int started_compress;
|
BOOL started_compress;
|
||||||
int lines_written;
|
int lines_written;
|
||||||
int frame_committed;
|
BOOL frame_committed;
|
||||||
int committed;
|
BOOL committed;
|
||||||
UINT width, height;
|
UINT width, height;
|
||||||
double xres, yres;
|
double xres, yres;
|
||||||
const jpeg_compress_format *format;
|
const jpeg_compress_format *format;
|
||||||
|
@ -1031,7 +1029,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WritePixels(IWICBitmapFrameEncode *iface
|
||||||
|
|
||||||
pjpeg_start_compress(&This->cinfo, TRUE);
|
pjpeg_start_compress(&This->cinfo, TRUE);
|
||||||
|
|
||||||
This->started_compress = 1;
|
This->started_compress = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
row_size = This->format->bpp / 8 * This->width;
|
row_size = This->format->bpp / 8 * This->width;
|
||||||
|
@ -1438,17 +1436,15 @@ static const IWICBitmapEncoderVtbl JpegEncoder_Vtbl = {
|
||||||
JpegEncoder_GetMetadataQueryWriter
|
JpegEncoder_GetMetadataQueryWriter
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
JpegEncoder *This;
|
JpegEncoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
if (!libjpeg_handle && !load_libjpeg())
|
if (!libjpeg_handle && !load_libjpeg())
|
||||||
{
|
{
|
||||||
ERR("Failed writing JPEG because unable to find %s\n",SONAME_LIBJPEG);
|
ERR("Failed writing JPEG because unable to find %s\n",SONAME_LIBJPEG);
|
||||||
|
@ -1461,13 +1457,13 @@ HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
This->IWICBitmapEncoder_iface.lpVtbl = &JpegEncoder_Vtbl;
|
This->IWICBitmapEncoder_iface.lpVtbl = &JpegEncoder_Vtbl;
|
||||||
This->IWICBitmapFrameEncode_iface.lpVtbl = &JpegEncoder_FrameVtbl;
|
This->IWICBitmapFrameEncode_iface.lpVtbl = &JpegEncoder_FrameVtbl;
|
||||||
This->ref = 1;
|
This->ref = 1;
|
||||||
This->initialized = 0;
|
This->initialized = FALSE;
|
||||||
This->frame_count = 0;
|
This->frame_count = 0;
|
||||||
This->frame_initialized = 0;
|
This->frame_initialized = FALSE;
|
||||||
This->started_compress = 0;
|
This->started_compress = FALSE;
|
||||||
This->lines_written = 0;
|
This->lines_written = 0;
|
||||||
This->frame_committed = 0;
|
This->frame_committed = FALSE;
|
||||||
This->committed = 0;
|
This->committed = FALSE;
|
||||||
This->width = This->height = 0;
|
This->width = This->height = 0;
|
||||||
This->xres = This->yres = 0.0;
|
This->xres = This->yres = 0.0;
|
||||||
This->format = NULL;
|
This->format = NULL;
|
||||||
|
@ -1483,13 +1479,13 @@ HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
|
|
||||||
#else /* !defined(SONAME_LIBJPEG) */
|
#else /* !defined(SONAME_LIBJPEG) */
|
||||||
|
|
||||||
HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to load JPEG picture, but JPEG support is not compiled in.\n");
|
ERR("Trying to load JPEG picture, but JPEG support is not compiled in.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to save JPEG picture, but JPEG support is not compiled in.\n");
|
ERR("Trying to save JPEG picture, but JPEG support is not compiled in.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
|
@ -440,7 +440,7 @@ static const IWICPersistStreamVtbl MetadataHandler_PersistStream_Vtbl = {
|
||||||
MetadataHandler_SaveEx
|
MetadataHandler_SaveEx
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
MetadataHandler *This;
|
MetadataHandler *This;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -449,8 +449,6 @@ HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkO
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataHandler));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataHandler));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
@ -709,9 +707,9 @@ static const MetadataHandlerVtbl UnknownMetadataReader_Vtbl = {
|
||||||
LoadUnknownMetadata
|
LoadUnknownMetadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&UnknownMetadataReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&UnknownMetadataReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); } while(0)
|
#define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); } while(0)
|
||||||
|
@ -1144,7 +1142,7 @@ static const MetadataHandlerVtbl IfdMetadataReader_Vtbl = {
|
||||||
LoadIfdMetadata
|
LoadIfdMetadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
|
HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&IfdMetadataReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&IfdMetadataReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,9 +129,9 @@ static const MetadataHandlerVtbl TextReader_Vtbl = {
|
||||||
LoadTextMetadata
|
LoadTextMetadata
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
return MetadataReader_Create(&TextReader_Vtbl, pUnkOuter, iid, ppv);
|
return MetadataReader_Create(&TextReader_Vtbl, iid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SONAME_LIBPNG
|
#ifdef SONAME_LIBPNG
|
||||||
|
@ -935,7 +935,9 @@ static HRESULT WINAPI PngDecoder_Block_GetContainerFormat(IWICMetadataBlockReade
|
||||||
static HRESULT WINAPI PngDecoder_Block_GetCount(IWICMetadataBlockReader *iface,
|
static HRESULT WINAPI PngDecoder_Block_GetCount(IWICMetadataBlockReader *iface,
|
||||||
UINT *pcCount)
|
UINT *pcCount)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, pcCount);
|
static int once;
|
||||||
|
TRACE("%p,%p\n", iface, pcCount);
|
||||||
|
if (!once++) FIXME("stub\n");
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -963,17 +965,15 @@ static const IWICMetadataBlockReaderVtbl PngDecoder_BlockVtbl = {
|
||||||
PngDecoder_Block_GetEnumerator,
|
PngDecoder_Block_GetEnumerator,
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
PngDecoder *This;
|
PngDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
if (!libpng_handle && !load_libpng())
|
if (!libpng_handle && !load_libpng())
|
||||||
{
|
{
|
||||||
ERR("Failed reading PNG because unable to find %s\n",SONAME_LIBPNG);
|
ERR("Failed reading PNG because unable to find %s\n",SONAME_LIBPNG);
|
||||||
|
@ -1655,17 +1655,15 @@ static const IWICBitmapEncoderVtbl PngEncoder_Vtbl = {
|
||||||
PngEncoder_GetMetadataQueryWriter
|
PngEncoder_GetMetadataQueryWriter
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
PngEncoder *This;
|
PngEncoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
if (!libpng_handle && !load_libpng())
|
if (!libpng_handle && !load_libpng())
|
||||||
{
|
{
|
||||||
ERR("Failed writing PNG because unable to find %s\n",SONAME_LIBPNG);
|
ERR("Failed writing PNG because unable to find %s\n",SONAME_LIBPNG);
|
||||||
|
@ -1703,13 +1701,13 @@ HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
|
|
||||||
#else /* !HAVE_PNG_H */
|
#else /* !HAVE_PNG_H */
|
||||||
|
|
||||||
HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to load PNG picture, but PNG support is not compiled in.\n");
|
ERR("Trying to load PNG picture, but PNG support is not compiled in.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to save PNG picture, but PNG support is not compiled in.\n");
|
ERR("Trying to save PNG picture, but PNG support is not compiled in.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
|
@ -20,6 +20,12 @@
|
||||||
|
|
||||||
#include "wincodecs_private.h"
|
#include "wincodecs_private.h"
|
||||||
|
|
||||||
|
HRESULT WINAPI IPropertyBag2_Write_Proxy(IPropertyBag2 *iface,
|
||||||
|
ULONG cProperties, PROPBAG2 *ppropbag, VARIANT *pvarValue)
|
||||||
|
{
|
||||||
|
return IPropertyBag2_Write(iface, cProperties, ppropbag, pvarValue);
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT WINAPI IWICBitmapClipper_Initialize_Proxy_W(IWICBitmapClipper *iface,
|
HRESULT WINAPI IWICBitmapClipper_Initialize_Proxy_W(IWICBitmapClipper *iface,
|
||||||
IWICBitmapSource *pISource, const WICRect *prc)
|
IWICBitmapSource *pISource, const WICRect *prc)
|
||||||
{
|
{
|
||||||
|
@ -614,5 +620,45 @@ HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT SDKVersion, IWICImagingFactory
|
||||||
{
|
{
|
||||||
TRACE("%x, %p\n", SDKVersion, ppIImagingFactory);
|
TRACE("%x, %p\n", SDKVersion, ppIImagingFactory);
|
||||||
|
|
||||||
return ComponentFactory_CreateInstance(NULL, &IID_IWICImagingFactory, (void**)ppIImagingFactory);
|
return ComponentFactory_CreateInstance(&IID_IWICImagingFactory, (void**)ppIImagingFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI WICSetEncoderFormat_Proxy(IWICBitmapSource *pSourceIn,
|
||||||
|
IWICPalette *pIPalette, IWICBitmapFrameEncode *pIFrameEncode,
|
||||||
|
IWICBitmapSource **ppSourceOut)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
WICPixelFormatGUID pixelformat, framepixelformat;
|
||||||
|
|
||||||
|
TRACE("%p,%p,%p,%p\n", pSourceIn, pIPalette, pIFrameEncode, ppSourceOut);
|
||||||
|
|
||||||
|
if (pIPalette) FIXME("ignoring palette\n");
|
||||||
|
|
||||||
|
if (!pSourceIn || !pIFrameEncode || !ppSourceOut)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
*ppSourceOut = NULL;
|
||||||
|
|
||||||
|
hr = IWICBitmapSource_GetPixelFormat(pSourceIn, &pixelformat);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
framepixelformat = pixelformat;
|
||||||
|
hr = IWICBitmapFrameEncode_SetPixelFormat(pIFrameEncode, &framepixelformat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
if (IsEqualGUID(&pixelformat, &framepixelformat))
|
||||||
|
{
|
||||||
|
*ppSourceOut = pSourceIn;
|
||||||
|
IWICBitmapSource_AddRef(pSourceIn);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hr = WICConvertBitmapSource(&framepixelformat, pSourceIn, ppSourceOut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,21 +218,21 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
|
||||||
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
RegCloseKey(instance_clsid_key);
|
RegCloseKey(instance_clsid_key);
|
||||||
}
|
}
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->author) {
|
if (list->author) {
|
||||||
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->author),
|
(const BYTE*)list->author,
|
||||||
strlen(list->author) + 1);
|
strlen(list->author) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->friendlyname) {
|
if (list->friendlyname) {
|
||||||
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->friendlyname),
|
(const BYTE*)list->friendlyname,
|
||||||
strlen(list->friendlyname) + 1);
|
strlen(list->friendlyname) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -240,34 +240,34 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
|
||||||
if (list->vendor) {
|
if (list->vendor) {
|
||||||
StringFromGUID2(list->vendor, buf, 39);
|
StringFromGUID2(list->vendor, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->container_format) {
|
if (list->container_format) {
|
||||||
StringFromGUID2(list->container_format, buf, 39);
|
StringFromGUID2(list->container_format, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->version) {
|
if (list->version) {
|
||||||
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->mimetypes) {
|
if (list->mimetypes) {
|
||||||
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->mimetypes),
|
(const BYTE*)list->mimetypes,
|
||||||
strlen(list->mimetypes) + 1);
|
strlen(list->mimetypes) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->extensions) {
|
if (list->extensions) {
|
||||||
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->extensions),
|
(const BYTE*)list->extensions,
|
||||||
strlen(list->extensions) + 1);
|
strlen(list->extensions) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -308,10 +308,10 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
|
||||||
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
|
||||||
if (res != ERROR_SUCCESS) break;
|
if (res != ERROR_SUCCESS) break;
|
||||||
res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->patterns[i].length), 4);
|
(const BYTE*)&list->patterns[i].length, 4);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->patterns[i].position), 4);
|
(const BYTE*)&list->patterns[i].position, 4);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
|
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
|
||||||
list->patterns[i].pattern,
|
list->patterns[i].pattern,
|
||||||
|
@ -322,7 +322,7 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
|
||||||
list->patterns[i].length);
|
list->patterns[i].length);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
res = RegSetValueExA(pattern_key, endofstream_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(pattern_key, endofstream_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)&(list->patterns[i].endofstream), 4);
|
(const BYTE*)&list->patterns[i].endofstream, 4);
|
||||||
RegCloseKey(pattern_key);
|
RegCloseKey(pattern_key);
|
||||||
}
|
}
|
||||||
RegCloseKey(patterns_key);
|
RegCloseKey(patterns_key);
|
||||||
|
@ -433,21 +433,21 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
|
||||||
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
RegCloseKey(instance_clsid_key);
|
RegCloseKey(instance_clsid_key);
|
||||||
}
|
}
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->author) {
|
if (list->author) {
|
||||||
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->author),
|
(const BYTE*)list->author,
|
||||||
strlen(list->author) + 1);
|
strlen(list->author) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->friendlyname) {
|
if (list->friendlyname) {
|
||||||
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->friendlyname),
|
(const BYTE*)list->friendlyname,
|
||||||
strlen(list->friendlyname) + 1);
|
strlen(list->friendlyname) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -455,34 +455,34 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
|
||||||
if (list->vendor) {
|
if (list->vendor) {
|
||||||
StringFromGUID2(list->vendor, buf, 39);
|
StringFromGUID2(list->vendor, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->container_format) {
|
if (list->container_format) {
|
||||||
StringFromGUID2(list->container_format, buf, 39);
|
StringFromGUID2(list->container_format, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->version) {
|
if (list->version) {
|
||||||
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->mimetypes) {
|
if (list->mimetypes) {
|
||||||
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->mimetypes),
|
(const BYTE*)list->mimetypes,
|
||||||
strlen(list->mimetypes) + 1);
|
strlen(list->mimetypes) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->extensions) {
|
if (list->extensions) {
|
||||||
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->extensions),
|
(const BYTE*)list->extensions,
|
||||||
strlen(list->extensions) + 1);
|
strlen(list->extensions) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -611,21 +611,21 @@ static HRESULT register_converters(struct regsvr_converter const *list)
|
||||||
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
RegCloseKey(instance_clsid_key);
|
RegCloseKey(instance_clsid_key);
|
||||||
}
|
}
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->author) {
|
if (list->author) {
|
||||||
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->author),
|
(const BYTE*)list->author,
|
||||||
strlen(list->author) + 1);
|
strlen(list->author) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->friendlyname) {
|
if (list->friendlyname) {
|
||||||
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->friendlyname),
|
(const BYTE*)list->friendlyname,
|
||||||
strlen(list->friendlyname) + 1);
|
strlen(list->friendlyname) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -633,13 +633,13 @@ static HRESULT register_converters(struct regsvr_converter const *list)
|
||||||
if (list->vendor) {
|
if (list->vendor) {
|
||||||
StringFromGUID2(list->vendor, buf, 39);
|
StringFromGUID2(list->vendor, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->version) {
|
if (list->version) {
|
||||||
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -768,21 +768,21 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
|
||||||
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
RegCloseKey(instance_clsid_key);
|
RegCloseKey(instance_clsid_key);
|
||||||
}
|
}
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->author) {
|
if (list->author) {
|
||||||
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->author),
|
(const BYTE*)list->author,
|
||||||
strlen(list->author) + 1);
|
strlen(list->author) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->friendlyname) {
|
if (list->friendlyname) {
|
||||||
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->friendlyname),
|
(const BYTE*)list->friendlyname,
|
||||||
strlen(list->friendlyname) + 1);
|
strlen(list->friendlyname) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -790,42 +790,42 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
|
||||||
if (list->vendor) {
|
if (list->vendor) {
|
||||||
StringFromGUID2(list->vendor, buf, 39);
|
StringFromGUID2(list->vendor, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->metadata_format) {
|
if (list->metadata_format) {
|
||||||
StringFromGUID2(list->metadata_format, buf, 39);
|
StringFromGUID2(list->metadata_format, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, metadataformat_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, metadataformat_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->version) {
|
if (list->version) {
|
||||||
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->specversion) {
|
if (list->specversion) {
|
||||||
res = RegSetValueExA(clsid_key, specversion_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, specversion_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, requiresfullstream_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, requiresfullstream_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->requires_fullstream), 4);
|
(const BYTE*)&list->requires_fullstream, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, supportspadding_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, supportspadding_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->supports_padding), 4);
|
(const BYTE*)&list->supports_padding, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->requires_fixedsize) {
|
if (list->requires_fixedsize) {
|
||||||
res = RegSetValueExA(clsid_key, requiresfixedsize_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, requiresfixedsize_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->requires_fixedsize), 4);
|
(const BYTE*)&list->requires_fixedsize, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,7 +854,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
|
||||||
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
|
||||||
if (res != ERROR_SUCCESS) break;
|
if (res != ERROR_SUCCESS) break;
|
||||||
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&container->patterns[i].position), 4);
|
(const BYTE*)&container->patterns[i].position, 4);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
|
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
|
||||||
container->patterns[i].pattern,
|
container->patterns[i].pattern,
|
||||||
|
@ -865,7 +865,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
|
||||||
container->patterns[i].length);
|
container->patterns[i].length);
|
||||||
if (res == ERROR_SUCCESS && container->patterns[i].data_offset)
|
if (res == ERROR_SUCCESS && container->patterns[i].data_offset)
|
||||||
res = RegSetValueExA(pattern_key, dataoffset_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(pattern_key, dataoffset_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)&(container->patterns[i].data_offset), 4);
|
(const BYTE*)&container->patterns[i].data_offset, 4);
|
||||||
RegCloseKey(pattern_key);
|
RegCloseKey(pattern_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,21 +978,21 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
|
||||||
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
RegCloseKey(instance_clsid_key);
|
RegCloseKey(instance_clsid_key);
|
||||||
}
|
}
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->author) {
|
if (list->author) {
|
||||||
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->author),
|
(const BYTE*)list->author,
|
||||||
strlen(list->author) + 1);
|
strlen(list->author) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->friendlyname) {
|
if (list->friendlyname) {
|
||||||
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->friendlyname),
|
(const BYTE*)list->friendlyname,
|
||||||
strlen(list->friendlyname) + 1);
|
strlen(list->friendlyname) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
@ -1000,31 +1000,31 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
|
||||||
if (list->vendor) {
|
if (list->vendor) {
|
||||||
StringFromGUID2(list->vendor, buf, 39);
|
StringFromGUID2(list->vendor, buf, 39);
|
||||||
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(buf), 78);
|
(const BYTE*)buf, 78);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->version) {
|
if (list->version) {
|
||||||
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
|
||||||
(CONST BYTE*)(list->version),
|
(const BYTE*)list->version,
|
||||||
strlen(list->version) + 1);
|
strlen(list->version) + 1);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, bitsperpixel_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, bitsperpixel_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->bitsperpixel), 4);
|
(const BYTE*)&list->bitsperpixel, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, channelcount_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, channelcount_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->channelcount), 4);
|
(const BYTE*)&list->channelcount, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, numericrepresentation_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, numericrepresentation_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->numericrepresentation), 4);
|
(const BYTE*)&list->numericrepresentation, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
res = RegSetValueExA(clsid_key, supportstransparency_valuename, 0, REG_DWORD,
|
res = RegSetValueExA(clsid_key, supportstransparency_valuename, 0, REG_DWORD,
|
||||||
(CONST BYTE*)(&list->supportsalpha), 4);
|
(const BYTE*)&list->supportsalpha, 4);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
|
||||||
if (list->channelmasks) {
|
if (list->channelmasks) {
|
||||||
|
|
|
@ -934,17 +934,15 @@ static const IWICBitmapFrameDecodeVtbl TgaDecoder_Frame_Vtbl = {
|
||||||
TgaDecoder_Frame_GetThumbnail
|
TgaDecoder_Frame_GetThumbnail
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
TgaDecoder *This;
|
TgaDecoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(TgaDecoder));
|
This = HeapAlloc(GetProcessHeap(), 0, sizeof(TgaDecoder));
|
||||||
if (!This) return E_OUTOFMEMORY;
|
if (!This) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
|
|
@ -1279,17 +1279,15 @@ static const IWICMetadataBlockReaderVtbl TiffFrameDecode_BlockVtbl =
|
||||||
TiffFrameDecode_Block_GetEnumerator
|
TiffFrameDecode_Block_GetEnumerator
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
TiffDecoder *This;
|
TiffDecoder *This;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
if (!load_libtiff())
|
if (!load_libtiff())
|
||||||
{
|
{
|
||||||
ERR("Failed reading TIFF because unable to load %s\n",SONAME_LIBTIFF);
|
ERR("Failed reading TIFF because unable to load %s\n",SONAME_LIBTIFF);
|
||||||
|
@ -2023,17 +2021,15 @@ static const IWICBitmapEncoderVtbl TiffEncoder_Vtbl = {
|
||||||
TiffEncoder_GetMetadataQueryWriter
|
TiffEncoder_GetMetadataQueryWriter
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
TiffEncoder *This;
|
TiffEncoder *This;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
|
TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
|
|
||||||
|
|
||||||
if (!load_libtiff())
|
if (!load_libtiff())
|
||||||
{
|
{
|
||||||
ERR("Failed writing TIFF because unable to load %s\n",SONAME_LIBTIFF);
|
ERR("Failed writing TIFF because unable to load %s\n",SONAME_LIBTIFF);
|
||||||
|
@ -2062,13 +2058,13 @@ HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
||||||
|
|
||||||
#else /* !SONAME_LIBTIFF */
|
#else /* !SONAME_LIBTIFF */
|
||||||
|
|
||||||
HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to load TIFF picture, but Wine was compiled without TIFF support.\n");
|
ERR("Trying to load TIFF picture, but Wine was compiled without TIFF support.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
|
HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv)
|
||||||
{
|
{
|
||||||
ERR("Trying to save TIFF picture, but Wine was compiled without TIFF support.\n");
|
ERR("Trying to save TIFF picture, but Wine was compiled without TIFF support.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
|
@ -54,22 +54,61 @@ DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47
|
||||||
|
|
||||||
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
|
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
|
||||||
|
|
||||||
extern HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
|
||||||
extern HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
#define INTERFACE IMILBitmapSource
|
||||||
extern HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
|
||||||
extern HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
{
|
||||||
extern HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
/*** IUnknown methods ***/
|
||||||
extern HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
||||||
extern HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
extern HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
extern HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
/*** IMILBitmapSource methods ***/
|
||||||
extern HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *);
|
||||||
extern HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *);
|
||||||
extern HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *);
|
||||||
extern HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *);
|
||||||
extern HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *);
|
||||||
|
STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void **);
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
|
||||||
extern HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
#define INTERFACE IMILUnknown1
|
||||||
|
DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
|
||||||
|
{
|
||||||
|
/*** IUnknown methods ***/
|
||||||
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
|
||||||
|
#define INTERFACE IMILUnknown2
|
||||||
|
DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
|
||||||
|
{
|
||||||
|
/*** IUnknown methods ***/
|
||||||
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
/*** unknown methods ***/
|
||||||
|
STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void *, void *) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
|
||||||
|
extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT ComponentFactory_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT BmpDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT GifDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
extern HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
||||||
UINT stride, UINT datasize, BYTE *bits,
|
UINT stride, UINT datasize, BYTE *bits,
|
||||||
|
@ -122,16 +161,16 @@ typedef struct _MetadataHandlerVtbl
|
||||||
ULARGE_INTEGER *size);
|
ULARGE_INTEGER *size);
|
||||||
} MetadataHandlerVtbl;
|
} MetadataHandlerVtbl;
|
||||||
|
|
||||||
extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
extern HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
extern HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT APEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
extern HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern HRESULT stream_initialize_from_filehandle(IWICStream *iface, HANDLE hfile) DECLSPEC_HIDDEN;
|
extern HRESULT stream_initialize_from_filehandle(IWICStream *iface, HANDLE hfile) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
@ stdcall -private DllUnregisterServer()
|
@ stdcall -private DllUnregisterServer()
|
||||||
@ stub IEnumString_Next_WIC_Proxy
|
@ stub IEnumString_Next_WIC_Proxy
|
||||||
@ stub IEnumString_Reset_WIC_Proxy
|
@ stub IEnumString_Reset_WIC_Proxy
|
||||||
@ stub IPropertyBag2_Write_Proxy
|
@ stdcall IPropertyBag2_Write_Proxy(ptr long ptr ptr)
|
||||||
@ stdcall IWICBitmapClipper_Initialize_Proxy(ptr ptr ptr) IWICBitmapClipper_Initialize_Proxy_W
|
@ stdcall IWICBitmapClipper_Initialize_Proxy(ptr ptr ptr) IWICBitmapClipper_Initialize_Proxy_W
|
||||||
@ stdcall IWICBitmapCodecInfo_DoesSupportAnimation_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportAnimation_Proxy_W
|
@ stdcall IWICBitmapCodecInfo_DoesSupportAnimation_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportAnimation_Proxy_W
|
||||||
@ stdcall IWICBitmapCodecInfo_DoesSupportLossless_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportLossless_Proxy_W
|
@ stdcall IWICBitmapCodecInfo_DoesSupportLossless_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportLossless_Proxy_W
|
||||||
|
@ -114,4 +114,4 @@
|
||||||
@ stub WICMapShortNameToGuid
|
@ stub WICMapShortNameToGuid
|
||||||
@ stub WICMatchMetadataContent
|
@ stub WICMatchMetadataContent
|
||||||
@ stub WICSerializeMetadataContent
|
@ stub WICSerializeMetadataContent
|
||||||
@ stub WICSetEncoderFormat_Proxy
|
@ stdcall WICSetEncoderFormat_Proxy(ptr ptr ptr ptr)
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma makedep proxy
|
||||||
|
#pragma makedep register
|
||||||
|
|
||||||
#include "wincodec.idl"
|
#include "wincodec.idl"
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -203,7 +203,7 @@ reactos/dll/win32/version # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/wbemdisp # Synced to Wine-1.7.17
|
reactos/dll/win32/wbemdisp # Synced to Wine-1.7.17
|
||||||
reactos/dll/win32/wbemprox # Synced to Wine-1.7.2
|
reactos/dll/win32/wbemprox # Synced to Wine-1.7.2
|
||||||
reactos/dll/win32/wer # Autosync
|
reactos/dll/win32/wer # Autosync
|
||||||
reactos/dll/win32/windowscodecs # Synced to Wine-1.7.1
|
reactos/dll/win32/windowscodecs # Synced to Wine-1.7.17
|
||||||
reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1
|
reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/winemp3.acm # Synced to Wine-1.7.1
|
reactos/dll/win32/winemp3.acm # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/wing32 # Out of sync
|
reactos/dll/win32/wing32 # Out of sync
|
||||||
|
|
Loading…
Reference in a new issue