Piotr Caban : oleaut32: Add support for best version argument in LoadRegTypeLib.
Module: wine Branch: master Commit: 2142bde3e2ebdd20d72342f4e1afd5522425f29d URL: http://source.winehq.org/git/wine.git/?a=commit;h=2142bde3e2ebdd20d72342f4e1... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jan 25 16:24:57 2016 +0100 oleaut32: Add support for best version argument in LoadRegTypeLib. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/typelib.c | 14 ++++++++++++++ dlls/oleaut32/typelib.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a354f00..71764c3 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -5676,6 +5676,20 @@ static void test_LoadRegTypeLib(void) hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 7, LOCALE_NEUTRAL, &tl); ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + hr = LoadRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &tl); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITypeLib_GetLibAttr(tl, &attr); + ok(hr == S_OK, "got 0x%08x\n", hr); + + ok(attr->lcid == 0, "got %x\n", attr->lcid); + ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum); + ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum); + ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n", attr->wLibFlags); + + ITypeLib_ReleaseTLibAttr(tl, attr); + ITypeLib_Release(tl); + DeleteFileA("test_actctx_tlb.tlb"); DeleteFileA("test_actctx_tlb2.tlb"); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 6fd52b0..2a24b79 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -536,7 +536,7 @@ HRESULT WINAPI LoadRegTypeLib( res= LoadTypeLib(bstr, ppTLib); SysFreeString(bstr); - if (*ppTLib) + if ((wVerMajor!=0xffff || wVerMinor!=0xffff) && *ppTLib) { TLIBATTR *attr;
participants (1)
-
Alexandre Julliard