On 1/11/2013 14:39, Dmitry Timoshkov wrote:
> + icon = CreateIconIndirect(&info);
> + ok(icon != 0, "CreateIconIndirect failed\n");
> + DeleteObject(info.hbmColor);
> + DeleteObject(info.hbmMask);
> +
> + hr = IWICImagingFactory_CreateBitmapFromHICON(factory, icon, &bitmap);
> + ok(hr == S_OK, "CreateBitmapFromHICON error %#x\n", hr);
> +
> + IWICBitmap_GetPixelFormat(bitmap, &format);
> + ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA),
> + "unexpected pixel format %s\n", debugstr_guid(&format));
> +
> + IWICBitmap_GetSize(bitmap, &width, &height);
> + ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
> + ok(width == 16, "expected 16, got %u\n", width);
> + ok(height == 16, "expected 16, got %u\n", height);
> +
> + IWICBitmap_Release(bitmap);
> +}
Who is responsible for freeing icon handle? I guess it should be done
here cause your implementation doesn't free it either.