windowscodecs: Implement IWICComponentInfo::GetVendorGUID.

oldstable
Vincent Povirk 2012-04-16 15:19:05 -05:00 committed by Alexandre Julliard
parent d99740e8ea
commit 7d19b39c2d
2 changed files with 25 additions and 15 deletions

View File

@ -41,6 +41,7 @@ static const WCHAR author_valuename[] = {'A','u','t','h','o','r',0};
static const WCHAR friendlyname_valuename[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0};
static const WCHAR containerformat_valuename[] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0};
static const WCHAR vendor_valuename[] = {'V','e','n','d','o','r',0};
static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value,
UINT buffer_size, WCHAR *buffer, UINT *actual_size)
@ -199,8 +200,11 @@ static HRESULT WINAPI BitmapDecoderInfo_GetAuthor(IWICBitmapDecoderInfo *iface,
static HRESULT WINAPI BitmapDecoderInfo_GetVendorGUID(IWICBitmapDecoderInfo *iface, GUID *pguidVendor)
{
FIXME("(%p,%p): stub\n", iface, pguidVendor);
return E_NOTIMPL;
BitmapDecoderInfo *This = impl_from_IWICBitmapDecoderInfo(iface);
TRACE("(%p,%p)\n", iface, pguidVendor);
return ComponentInfo_GetGUIDValue(This->classkey, vendor_valuename, pguidVendor);
}
static HRESULT WINAPI BitmapDecoderInfo_GetVersion(IWICBitmapDecoderInfo *iface, UINT cchVersion,
@ -653,8 +657,11 @@ static HRESULT WINAPI BitmapEncoderInfo_GetAuthor(IWICBitmapEncoderInfo *iface,
static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID(IWICBitmapEncoderInfo *iface, GUID *pguidVendor)
{
FIXME("(%p,%p): stub\n", iface, pguidVendor);
return E_NOTIMPL;
BitmapEncoderInfo *This = impl_from_IWICBitmapEncoderInfo(iface);
TRACE("(%p,%p)\n", iface, pguidVendor);
return ComponentInfo_GetGUIDValue(This->classkey, vendor_valuename, pguidVendor);
}
static HRESULT WINAPI BitmapEncoderInfo_GetVersion(IWICBitmapEncoderInfo *iface, UINT cchVersion,
@ -932,8 +939,11 @@ static HRESULT WINAPI FormatConverterInfo_GetAuthor(IWICFormatConverterInfo *ifa
static HRESULT WINAPI FormatConverterInfo_GetVendorGUID(IWICFormatConverterInfo *iface, GUID *pguidVendor)
{
FIXME("(%p,%p): stub\n", iface, pguidVendor);
return E_NOTIMPL;
FormatConverterInfo *This = impl_from_IWICFormatConverterInfo(iface);
TRACE("(%p,%p)\n", iface, pguidVendor);
return ComponentInfo_GetGUIDValue(This->classkey, vendor_valuename, pguidVendor);
}
static HRESULT WINAPI FormatConverterInfo_GetVersion(IWICFormatConverterInfo *iface, UINT cchVersion,
@ -1146,8 +1156,11 @@ static HRESULT WINAPI PixelFormatInfo_GetAuthor(IWICPixelFormatInfo2 *iface, UIN
static HRESULT WINAPI PixelFormatInfo_GetVendorGUID(IWICPixelFormatInfo2 *iface, GUID *pguidVendor)
{
FIXME("(%p,%p): stub\n", iface, pguidVendor);
return E_NOTIMPL;
PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface);
TRACE("(%p,%p)\n", iface, pguidVendor);
return ComponentInfo_GetGUIDValue(This->classkey, vendor_valuename, pguidVendor);
}
static HRESULT WINAPI PixelFormatInfo_GetVersion(IWICPixelFormatInfo2 *iface, UINT cchVersion,

View File

@ -201,12 +201,10 @@ static void test_pixelformat_info(void)
ok(hr == S_OK, "GetSigningStatus failed, hr=%x\n", hr);
ok(signing == WICComponentSigned, "unexpected signing status 0x%x\n", signing);
todo_wine
{
len = 0xdeadbeef;
hr = IWICComponentInfo_GetSpecVersion(info, 0, NULL, &len);
ok(hr == S_OK, "GetSpecVersion failed, hr=%x\n", hr);
ok(len == 0, "invalid length 0x%x\n", len); /* spec version does not apply to pixel formats */
todo_wine ok(hr == S_OK, "GetSpecVersion failed, hr=%x\n", hr);
todo_wine ok(len == 0, "invalid length 0x%x\n", len); /* spec version does not apply to pixel formats */
memset(&guid, 0xaa, sizeof(guid));
hr = IWICComponentInfo_GetVendorGUID(info, &guid);
@ -216,9 +214,8 @@ static void test_pixelformat_info(void)
len = 0xdeadbeef;
hr = IWICComponentInfo_GetVersion(info, 0, NULL, &len);
ok(hr == S_OK, "GetVersion failed, hr=%x\n", hr);
ok(len == 0, "invalid length 0x%x\n", len); /* version does not apply to pixel formats */
}
todo_wine ok(hr == S_OK, "GetVersion failed, hr=%x\n", hr);
todo_wine ok(len == 0, "invalid length 0x%x\n", len); /* version does not apply to pixel formats */
IWICComponentInfo_Release(info);
}