Vincent Povirk : windowscodecs: Report missing component info strings as zero-length.
Alexandre Julliard
julliard at winehq.org
Wed Jun 20 13:49:44 CDT 2012
Module: wine
Branch: master
Commit: 9f157e5bfaccb895c969ab656c8b06575169f066
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f157e5bfaccb895c969ab656c8b06575169f066
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon Apr 16 15:25:37 2012 -0500
windowscodecs: Report missing component info strings as zero-length.
---
dlls/windowscodecs/info.c | 6 ++++++
dlls/windowscodecs/tests/info.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c
index a2cc1a7..5b81702 100644
--- a/dlls/windowscodecs/info.c
+++ b/dlls/windowscodecs/info.c
@@ -59,6 +59,12 @@ static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value,
ret = RegGetValueW(classkey, NULL, value, RRF_RT_REG_SZ|RRF_NOEXPAND, NULL,
buffer, &cbdata);
+ if (ret == ERROR_FILE_NOT_FOUND)
+ {
+ *actual_size = 0;
+ return S_OK;
+ }
+
if (ret == 0 || ret == ERROR_MORE_DATA)
*actual_size = cbdata/sizeof(WCHAR);
diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c
index eda21a6..e923999 100644
--- a/dlls/windowscodecs/tests/info.c
+++ b/dlls/windowscodecs/tests/info.c
@@ -214,8 +214,8 @@ static void test_pixelformat_info(void)
len = 0xdeadbeef;
hr = IWICComponentInfo_GetVersion(info, 0, NULL, &len);
- 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 */
+ 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 */
IWICComponentInfo_Release(info);
}
More information about the wine-cvs
mailing list