oleaut32: Fix best version handling in QueryPathOfRegTypeLib when type library redirection is used.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3934253513
commit
dcd9b8ea0e
|
@ -5626,6 +5626,11 @@ static void test_LoadRegTypeLib(void)
|
||||||
ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);
|
ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);
|
||||||
SysFreeString(path);
|
SysFreeString(path);
|
||||||
|
|
||||||
|
path = NULL;
|
||||||
|
hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &path);
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
SysFreeString(path);
|
||||||
|
|
||||||
/* manifest version is 2.0, actual is 1.0 */
|
/* manifest version is 2.0, actual is 1.0 */
|
||||||
hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl);
|
hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl);
|
||||||
ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);
|
ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);
|
||||||
|
|
|
@ -323,7 +323,7 @@ static HRESULT query_typelib_path( REFGUID guid, WORD wMaj, WORD wMin,
|
||||||
WCHAR *nameW;
|
WCHAR *nameW;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
|
||||||
if (tlib->major_version != wMaj || tlib->minor_version < wMin)
|
if ((wMaj != 0xffff || wMin != 0xffff) && (tlib->major_version != wMaj || tlib->minor_version < wMin))
|
||||||
return TYPE_E_LIBNOTREGISTERED;
|
return TYPE_E_LIBNOTREGISTERED;
|
||||||
|
|
||||||
nameW = (WCHAR*)((BYTE*)data.lpSectionBase + tlib->name_offset);
|
nameW = (WCHAR*)((BYTE*)data.lpSectionBase + tlib->name_offset);
|
||||||
|
|
Loading…
Reference in New Issue