msvfw32: Enumerate installed functions in ICInfo().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-03-06 21:10:23 -06:00 committed by Alexandre Julliard
parent 830fe63093
commit da4331584c
2 changed files with 9 additions and 6 deletions

View File

@ -271,6 +271,7 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
{
char name_buf[10], buf[2048];
DWORD ret_type, ret_handler;
reg_driver *driver;
DWORD i, count = 0;
LONG res;
HKEY key;
@ -326,6 +327,14 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
}
}
LIST_FOR_EACH_ENTRY(driver, &reg_driver_list, reg_driver, entry)
{
if (type && compare_fourcc(type, driver->fccType)) continue;
if (compare_fourcc(handler, driver->fccHandler) && handler != count++) continue;
if (driver->proc(0, NULL, ICM_GETINFO, (DWORD_PTR)info, sizeof(*info)) == sizeof(*info))
return TRUE;
}
info->fccType = type;
info->fccHandler = handler;
WARN("No driver found for codec %s.%s.\n", wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler));

View File

@ -429,13 +429,10 @@ todo_wine
memset(&enum_info, 0x55, sizeof(enum_info));
enum_info.dwSize = sizeof(enum_info);
todo_wine {
ok(ICInfo(test_type, test_handler, &enum_info), "Expected success.\n");
ok(!enum_info.fccType, "Got unexpected type %#x.\n", enum_info.fccType);
ok(!enum_info.fccHandler, "Got unexpected handler %#x.\n", enum_info.fccHandler);
}
ok(!enum_info.dwFlags, "Got unexpected flags %#x.\n", enum_info.dwFlags);
todo_wine
ok(enum_info.dwVersion == 0xdeadbeef, "Got unexpected version %#x.\n", enum_info.dwVersion);
ok(enum_info.dwVersionICM == ICVERSION, "Got unexpected ICM version %#x.\n", enum_info.dwVersionICM);
ok(!enum_info.szName[0], "Got unexpected name %s.\n", wine_dbgstr_w(enum_info.szName));
@ -445,13 +442,10 @@ todo_wine
/* Functions installed after msvfw32 is loaded are enumerated. */
memset(&enum_info, 0x55, sizeof(enum_info));
enum_info.dwSize = sizeof(enum_info);
todo_wine {
ok(ICInfo(test_type, 0, &enum_info), "Expected success.\n");
ok(!enum_info.fccType, "Got unexpected type %#x.\n", enum_info.fccType);
}
ok(!enum_info.fccHandler, "Got unexpected handler %#x.\n", enum_info.fccHandler);
ok(!enum_info.dwFlags, "Got unexpected flags %#x.\n", enum_info.dwFlags);
todo_wine
ok(enum_info.dwVersion == 0xdeadbeef, "Got unexpected version %#x.\n", enum_info.dwVersion);
ok(enum_info.dwVersionICM == ICVERSION, "Got unexpected ICM version %#x.\n", enum_info.dwVersionICM);
ok(!enum_info.szName[0], "Got unexpected name %s.\n", wine_dbgstr_w(enum_info.szName));