Commit 9f157e5b authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Report missing component info strings as zero-length.

parent ef2b4d74
......@@ -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);
......
......@@ -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);
}
......
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