Vincent Povirk : windowscodecs: Implement IWICComponentInfo::GetVendorGUID.
Alexandre Julliard
julliard at winehq.org
Tue Jun 19 15:36:25 CDT 2012
Module: wine
Branch: master
Commit: 7d19b39c2d666f7219e88ceb79e7d8b1b9774d3f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d19b39c2d666f7219e88ceb79e7d8b1b9774d3f
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon Apr 16 15:19:05 2012 -0500
windowscodecs: Implement IWICComponentInfo::GetVendorGUID.
---
dlls/windowscodecs/info.c | 29 +++++++++++++++++++++--------
dlls/windowscodecs/tests/info.c | 11 ++++-------
2 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c
index 699f3f2..4893621 100644
--- a/dlls/windowscodecs/info.c
+++ b/dlls/windowscodecs/info.c
@@ -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,
diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c
index f8c3402..1e31fcc 100644
--- a/dlls/windowscodecs/tests/info.c
+++ b/dlls/windowscodecs/tests/info.c
@@ -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);
}
More information about the wine-cvs
mailing list