Commit ab381924 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

windowscodecs/tests: Enable compilation with long types.

parent 2c0c6a9f
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = windowscodecs.dll
IMPORTS = windowscodecs propsys oleaut32 ole32 user32 gdi32 shlwapi uuid
......
......@@ -143,21 +143,21 @@ static void test_ico_data_(void *data, DWORD data_size, HRESULT init_hr, int tod
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void**)&factory);
ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
if (FAILED(hr)) return;
hr = IWICImagingFactory_CreateStream(factory, &icostream);
ok(hr == S_OK, "CreateStream failed, hr=%x\n", hr);
ok(hr == S_OK, "CreateStream failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
hr = IWICStream_InitializeFromMemory(icostream, data, data_size);
ok(hr == S_OK, "InitializeFromMemory failed, hr=%x\n", hr);
ok(hr == S_OK, "InitializeFromMemory failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(&CLSID_WICIcoDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder);
ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
}
if (SUCCEEDED(hr))
......@@ -165,12 +165,12 @@ static void test_ico_data_(void *data, DWORD data_size, HRESULT init_hr, int tod
hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)icostream,
WICDecodeMetadataCacheOnDemand);
todo_wine_if(todo)
ok_(__FILE__, line)(hr == init_hr, "Initialize failed, hr=%x\n", hr);
ok_(__FILE__, line)(hr == init_hr, "Initialize failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
ok(hr == S_OK, "GetFrame failed, hr=%x\n", hr);
ok(hr == S_OK, "GetFrame failed, hr=%lx\n", hr);
}
if (SUCCEEDED(hr))
......@@ -180,16 +180,16 @@ static void test_ico_data_(void *data, DWORD data_size, HRESULT init_hr, int tod
width = height = 0;
hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height);
ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr);
ok(hr == S_OK, "GetFrameSize failed, hr=%lx\n", hr);
ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height);
hr = IWICBitmapFrameDecode_GetThumbnail(framedecode, &thumbnail);
ok(hr == S_OK, "GetThumbnail failed, hr=%x\n", hr);
ok(hr == S_OK, "GetThumbnail failed, hr=%lx\n", hr);
if (hr == S_OK)
{
width = height = 0;
hr = IWICBitmapSource_GetSize(thumbnail, &width, &height);
ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr);
ok(hr == S_OK, "GetFrameSize failed, hr=%lx\n", hr);
ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height);
IWICBitmapSource_Release(thumbnail);
}
......
......@@ -76,12 +76,12 @@ static void test_decode_adobe_cmyk(void)
hr = CoCreateInstance(&CLSID_WICJpegDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%lx\n", hr);
if (FAILED(hr)) return;
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&factory);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%lx\n", hr);
hjpegdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(jpeg_adobe_cmyk_1x5));
ok(hjpegdata != 0, "GlobalAlloc failed\n");
......@@ -92,31 +92,31 @@ static void test_decode_adobe_cmyk(void)
GlobalUnlock(hjpegdata);
hr = CreateStreamOnHGlobal(hjpegdata, FALSE, &jpegstream);
ok(SUCCEEDED(hr), "CreateStreamOnHGlobal failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CreateStreamOnHGlobal failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
hr = IWICBitmapDecoder_Initialize(decoder, jpegstream, WICDecodeMetadataCacheOnLoad);
ok(hr == S_OK, "Initialize failed, hr=%x\n", hr);
ok(hr == S_OK, "Initialize failed, hr=%lx\n", hr);
hr = IWICBitmapDecoder_GetContainerFormat(decoder, &guidresult);
ok(SUCCEEDED(hr), "GetContainerFormat failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetContainerFormat failed, hr=%lx\n", hr);
ok(IsEqualGUID(&guidresult, &GUID_ContainerFormatJpeg), "unexpected container format\n");
hr = IWICBitmapDecoder_GetFrameCount(decoder, &count);
ok(SUCCEEDED(hr), "GetFrameCount failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetFrameCount failed, hr=%lx\n", hr);
ok(count == 1, "unexpected count %u\n", count);
hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
ok(SUCCEEDED(hr), "GetFrame failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetFrame failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height);
ok(SUCCEEDED(hr), "GetSize failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetSize failed, hr=%lx\n", hr);
ok(width == 1, "expected width=1, got %u\n", width);
ok(height == 5, "expected height=5, got %u\n", height);
hr = IWICBitmapFrameDecode_GetPixelFormat(framedecode, &guidresult);
ok(SUCCEEDED(hr), "GetPixelFormat failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetPixelFormat failed, hr=%lx\n", hr);
ok(IsEqualGUID(&guidresult, &GUID_WICPixelFormat32bppCMYK) ||
broken(IsEqualGUID(&guidresult, &GUID_WICPixelFormat24bppBGR)), /* xp/2003 */
"unexpected pixel format: %s\n", wine_dbgstr_guid(&guidresult));
......@@ -126,20 +126,20 @@ static void test_decode_adobe_cmyk(void)
for(i=2; i>0; --i)
{
hr = IWICBitmapFrameDecode_CopyPixels(framedecode, NULL, 4, sizeof(imagedata), imagedata);
ok(SUCCEEDED(hr), "CopyPixels failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CopyPixels failed, hr=%lx\n", hr);
ok(!memcmp(imagedata, expected_imagedata, sizeof(imagedata)) ||
broken(!memcmp(imagedata, expected_imagedata_24bpp, sizeof(expected_imagedata))), /* xp/2003 */
"unexpected image data\n");
}
hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(SUCCEEDED(hr), "CreatePalette failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CreatePalette failed, hr=%lx\n", hr);
hr = IWICBitmapDecoder_CopyPalette(decoder, palette);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#x.\n", hr);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IWICBitmapFrameDecode_CopyPalette(framedecode, palette);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#x.\n", hr);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
IWICPalette_Release(palette);
......
......@@ -41,36 +41,36 @@ static void test_propertybag_getpropertyinfo(IPropertyBag2 *property, ULONG expe
/* iProperty: Out of bounce */
hr = IPropertyBag2_GetPropertyInfo(property, expected_count, 1, pb, &out_count);
ok(hr == WINCODEC_ERR_VALUEOUTOFRANGE,
"GetPropertyInfo handled iProperty out of bounce wrong, hr=%x\n", hr);
"GetPropertyInfo handled iProperty out of bounce wrong, hr=%lx\n", hr);
/* cProperty: Out of bounce */
hr = IPropertyBag2_GetPropertyInfo(property, 0, expected_count+1, pb, &out_count);
ok(hr == WINCODEC_ERR_VALUEOUTOFRANGE,
"GetPropertyInfo handled cProperty out of bounce wrong, hr=%x\n", hr);
"GetPropertyInfo handled cProperty out of bounce wrong, hr=%lx\n", hr);
/* GetPropertyInfo can be called for zero items on Windows 8 but not on Windows 7 (wine behaves like Win8) */
if (expected_count == 0)
return;
hr = IPropertyBag2_GetPropertyInfo(property, 0, expected_count, pb, &out_count);
ok(hr == S_OK, "GetPropertyInfo failed, hr=%x\n", hr);
ok(hr == S_OK, "GetPropertyInfo failed, hr=%lx\n", hr);
if (FAILED(hr))
return;
ok(expected_count == out_count,
"GetPropertyInfo returned unexpected property count, %i != %i)\n",
"GetPropertyInfo returned unexpected property count, %li != %li)\n",
expected_count, out_count);
if(expected_count != 2)
return;
ok(pb[0].vt == VT_UI1, "Invalid variant type, pb[0].vt=%x\n", pb[0].vt);
ok(pb[0].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[0].dwType=%x\n", pb[0].dwType);
ok(pb[0].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[0].dwType=%lx\n", pb[0].dwType);
ok(lstrcmpW(pb[0].pstrName, wszTestProperty1) == 0, "Invalid property name, pb[0].pstrName=%s\n", wine_dbgstr_w(pb[0].pstrName));
CoTaskMemFree(pb[0].pstrName);
ok(pb[1].vt == VT_R4, "Invalid variant type, pb[1].vt=%x\n", pb[1].vt);
ok(pb[1].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[1].dwType=%x\n", pb[1].dwType);
ok(pb[1].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[1].dwType=%lx\n", pb[1].dwType);
ok(lstrcmpW(pb[1].pstrName, wszTestProperty2) == 0, "Invalid property name, pb[1].pstrName=%s\n", wine_dbgstr_w(pb[1].pstrName));
CoTaskMemFree(pb[1].pstrName);
}
......@@ -81,15 +81,15 @@ static void test_propertybag_countproperties(IPropertyBag2 *property, ULONG expe
HRESULT hr;
hr = IPropertyBag2_CountProperties(property, NULL);
ok(hr == E_INVALIDARG, "CountProperties returned unexpected result, hr=%x\n", hr);
ok(hr == E_INVALIDARG, "CountProperties returned unexpected result, hr=%lx\n", hr);
hr = IPropertyBag2_CountProperties(property, &count);
ok(hr == S_OK, "CountProperties failed, hr=%x\n", hr);
ok(hr == S_OK, "CountProperties failed, hr=%lx\n", hr);
if (FAILED(hr))
return;
ok(count == expected_count, "CountProperties returned invalid value, count=%i\n", count);
ok(count == expected_count, "CountProperties returned invalid value, count=%li\n", count);
}
static void test_propertybag_read(IPropertyBag2 *property)
......@@ -103,17 +103,17 @@ static void test_propertybag_read(IPropertyBag2 *property)
options[0].pstrName = (LPOLESTR)wszTestInvalidProperty;
hr = IPropertyBag2_Read(property, 1, options, NULL, values, itm_hr);
ok(hr == E_FAIL,
"Read for an unknown property did not fail with expected code, hr=%x\n", hr);
"Read for an unknown property did not fail with expected code, hr=%lx\n", hr);
/* 2. One known property */
options[0].pstrName = (LPOLESTR)wszTestProperty1;
itm_hr[0] = E_FAIL;
hr = IPropertyBag2_Read(property, 1, options, NULL, values, itm_hr);
ok(hr == S_OK, "Read failed, hr=%x\n", hr);
ok(hr == S_OK, "Read failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
ok(itm_hr[0] == S_OK,
"Read failed, itm_hr[0]=%x\n", itm_hr[0]);
"Read failed, itm_hr[0]=%lx\n", itm_hr[0]);
ok(V_VT(&values[0]) == VT_UI1,
"Read failed, V_VT(&values[0])=%x\n", V_VT(&values[0]));
ok(V_UNION(&values[0], bVal) == 12,
......@@ -128,14 +128,14 @@ static void test_propertybag_read(IPropertyBag2 *property)
itm_hr[0] = E_FAIL;
itm_hr[1] = E_FAIL;
hr = IPropertyBag2_Read(property, 2, options, NULL, values, itm_hr);
ok(hr == S_OK, "Read failed, hr=%x\n", hr);
ok(hr == S_OK, "Read failed, hr=%lx\n", hr);
if (SUCCEEDED(hr))
{
ok(itm_hr[0] == S_OK, "Read failed, itm_hr[0]=%x\n", itm_hr[0]);
ok(itm_hr[0] == S_OK, "Read failed, itm_hr[0]=%lx\n", itm_hr[0]);
ok(V_VT(&values[0]) == VT_UI1, "Read failed, V_VT(&values[0])=%x\n", V_VT(&values[0]));
ok(V_UNION(&values[0], bVal) == 12, "Read failed, &values[0]=%i\n", V_UNION(&values[0], bVal));
ok(itm_hr[1] == S_OK, "Read failed, itm_hr[1]=%x\n", itm_hr[1]);
ok(itm_hr[1] == S_OK, "Read failed, itm_hr[1]=%lx\n", itm_hr[1]);
ok(V_VT(&values[1]) == VT_R4, "Read failed, V_VT(&values[1])=%x\n", V_VT(&values[1]));
ok(V_UNION(&values[1], fltVal) == (float)3.14, "Read failed, &values[1]=%f\n", V_UNION(&values[1], fltVal));
......@@ -160,12 +160,12 @@ static void test_propertybag_read(IPropertyBag2 *property)
options[2].pstrName = (LPOLESTR)wszTestProperty2;
hr = IPropertyBag2_Read(property, 3, options, NULL, values, itm_hr);
ok(hr == E_FAIL, "Read failed, hr=%x\n", hr);
ok(hr == E_FAIL, "Read failed, hr=%lx\n", hr);
if (hr == E_FAIL)
{
ok(itm_hr[0] == S_OK, "Read error code has unexpected value, itm_hr[0]=%x\n", itm_hr[0]);
ok(itm_hr[1] == -1, "Read error code has unexpected value, itm_hr[1]=%x\n", itm_hr[1]);
ok(itm_hr[2] == -1, "Read error code has unexpected value, itm_hr[2]=%x\n", itm_hr[2]);
ok(itm_hr[0] == S_OK, "Read error code has unexpected value, itm_hr[0]=%lx\n", itm_hr[0]);
ok(itm_hr[1] == -1, "Read error code has unexpected value, itm_hr[1]=%lx\n", itm_hr[1]);
ok(itm_hr[2] == -1, "Read error code has unexpected value, itm_hr[2]=%lx\n", itm_hr[2]);
ok(V_VT(&values[0]) == VT_UI1, "Read variant has unexpected type, V_VT(&values[0])=%x\n", V_VT(&values[0]));
ok(V_VT(&values[1]) == VT_NULL, "Read variant has unexpected type, V_VT(&values[1])=%x\n", V_VT(&values[1]));
......@@ -189,14 +189,14 @@ static void test_propertybag_write(IPropertyBag2 *property)
/* 1. One unknown property */
options[0].pstrName = (LPOLESTR)wszTestInvalidProperty;
hr = IPropertyBag2_Write(property, 1, options, values);
ok(hr == E_FAIL, "Write for an unknown property did not fail with expected code, hr=%x\n", hr);
ok(hr == E_FAIL, "Write for an unknown property did not fail with expected code, hr=%lx\n", hr);
/* 2. One property without correct type */
options[0].pstrName = (LPOLESTR)wszTestProperty1;
V_VT(&values[0]) = VT_UI1;
V_UNION(&values[0], bVal) = 1;
hr = IPropertyBag2_Write(property, 1, options, values);
ok(hr == S_OK, "Write for one property failed, hr=%x\n", hr);
ok(hr == S_OK, "Write for one property failed, hr=%lx\n", hr);
/* 3. One property with mismatching type */
options[0].pstrName = (LPOLESTR)wszTestProperty1;
......@@ -204,14 +204,14 @@ static void test_propertybag_write(IPropertyBag2 *property)
V_UNION(&values[0], bVal) = 2;
hr = IPropertyBag2_Write(property, 1, options, values);
ok(hr == WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE,
"Write with mismatching type did not fail with expected code hr=%x\n", hr);
"Write with mismatching type did not fail with expected code hr=%lx\n", hr);
/* 4. Reset one property to empty */
options[0].pstrName = (LPOLESTR)wszTestProperty1;
VariantClear(&values[0]);
hr = IPropertyBag2_Write(property, 1, options, values);
ok(hr == WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE,
"Write to reset to empty value does not fail with expected code, hr=%x\n", hr);
"Write to reset to empty value does not fail with expected code, hr=%lx\n", hr);
/* 5. Set two properties */
options[0].pstrName = (LPOLESTR)wszTestProperty1;
......@@ -221,7 +221,7 @@ static void test_propertybag_write(IPropertyBag2 *property)
V_VT(&values[1]) = VT_R4;
V_UNION(&values[1], fltVal) = (float)3.14;
hr = IPropertyBag2_Write(property, 2, options, values);
ok(hr == S_OK, "Write for two properties failed, hr=%x\n", hr);
ok(hr == S_OK, "Write for two properties failed, hr=%lx\n", hr);
}
static void test_empty_propertybag(void)
......@@ -232,11 +232,11 @@ static void test_empty_propertybag(void)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICComponentFactory, (void**)&factory);
ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
hr = IWICComponentFactory_CreateEncoderPropertyBag(factory, NULL, 0, &property);
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%lx\n", hr);
if (FAILED(hr)) return;
test_propertybag_countproperties(property, 0);
......@@ -260,11 +260,11 @@ static void test_filled_propertybag(void)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICComponentFactory, (void**)&factory);
ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
hr = IWICComponentFactory_CreateEncoderPropertyBag(factory, opts, 2, &property);
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%lx\n", hr);
if (FAILED(hr)) return;
test_propertybag_countproperties(property, 2);
......
......@@ -95,7 +95,7 @@ static void test_decode(void)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&factory);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%lx\n", hr);
hwmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(wmp_imagedata));
ok(hwmpdata != 0, "GlobalAlloc failed\n");
......@@ -105,38 +105,38 @@ static void test_decode(void)
GlobalUnlock(hwmpdata);
hr = CreateStreamOnHGlobal(hwmpdata, FALSE, &wmpstream);
ok(SUCCEEDED(hr), "CreateStreamOnHGlobal failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CreateStreamOnHGlobal failed, hr=%lx\n", hr);
hr = IWICBitmapDecoder_Initialize(decoder, wmpstream, WICDecodeMetadataCacheOnLoad);
ok(hr == S_OK, "Initialize failed, hr=%x\n", hr);
ok(hr == S_OK, "Initialize failed, hr=%lx\n", hr);
hr = IWICBitmapDecoder_Initialize(decoder, wmpstream, WICDecodeMetadataCacheOnLoad);
ok(hr == WINCODEC_ERR_WRONGSTATE, "Initialize returned %x\n", hr);
ok(hr == WINCODEC_ERR_WRONGSTATE, "Initialize returned %lx\n", hr);
hr = IWICBitmapDecoder_GetContainerFormat(decoder, &format);
ok(SUCCEEDED(hr), "GetContainerFormat failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetContainerFormat failed, hr=%lx\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatWmp),
"unexpected container format\n");
hr = IWICBitmapDecoder_GetFrameCount(decoder, &count);
ok(SUCCEEDED(hr), "GetFrameCount failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetFrameCount failed, hr=%lx\n", hr);
ok(count == 1, "unexpected count %u\n", count);
hr = IWICBitmapDecoder_GetFrame(decoder, 0, NULL);
ok(hr == E_INVALIDARG, "GetFrame(NULL) returned hr=%x\n", hr);
ok(hr == E_INVALIDARG, "GetFrame(NULL) returned hr=%lx\n", hr);
for (j = 2; j > 0; --j)
{
hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
ok(SUCCEEDED(hr), "GetFrame failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetFrame failed, hr=%lx\n", hr);
hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height);
ok(SUCCEEDED(hr), "GetSize failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetSize failed, hr=%lx\n", hr);
ok(width == 1, "expected width=1, got %u\n", width);
ok(height == 5, "expected height=5, got %u\n", height);
hr = IWICBitmapFrameDecode_GetPixelFormat(framedecode, &format);
ok(SUCCEEDED(hr), "GetPixelFormat failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "GetPixelFormat failed, hr=%lx\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA),
"unexpected pixel format: %s\n", wine_dbgstr_guid(&format));
......@@ -145,20 +145,20 @@ static void test_decode(void)
memset(imagedata, 0, sizeof(imagedata));
hr = IWICBitmapFrameDecode_CopyPixels(
framedecode, NULL, 4, sizeof(imagedata), imagedata);
ok(SUCCEEDED(hr), "CopyPixels failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CopyPixels failed, hr=%lx\n", hr);
ok(!memcmp(imagedata, expected_imagedata, sizeof(imagedata)) ||
broken(!memcmp(imagedata, broken_imagedata, sizeof(imagedata)) /* w2008s64 */),
"unexpected image data\n");
}
hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(SUCCEEDED(hr), "CreatePalette failed, hr=%x\n", hr);
ok(SUCCEEDED(hr), "CreatePalette failed, hr=%lx\n", hr);
hr = IWICBitmapDecoder_CopyPalette(decoder, palette);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#x.\n", hr);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IWICBitmapFrameDecode_CopyPalette(framedecode, palette);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#x.\n", hr);
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
IWICPalette_Release(palette);
......
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