Commit da433158 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msvfw32: Enumerate installed functions in ICInfo().

parent 830fe630
......@@ -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));
......
......@@ -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));
......
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