From: Francis De Brabandere <francisdb@gmail.com> Match native: when the typeinfo's typekind isn't TKIND_COCLASS, CreateInstance reports TYPE_E_BADMODULEKIND rather than E_INVALIDARG. --- dlls/oleaut32/tests/typelib.c | 2 +- dlls/oleaut32/typelib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 9a87be369fc..08831062474 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -8790,7 +8790,7 @@ static void test_CreateInstance_typekind(void) obj = (void*)0xdeadbeef; hr = ITypeInfo_CreateInstance(ti, NULL, &IID_IUnknown, &obj); - todo_wine ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance hr=%#lx\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance hr=%#lx\n", hr); ok(!obj, "CreateInstance left obj=%p, expected NULL\n", obj); ITypeInfo_Release(ti); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index e9997a86d24..2c2cd364cbc 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -8069,7 +8069,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface, if(pTA->typekind != TKIND_COCLASS) { WARN("CreateInstance on typeinfo of type %x\n", pTA->typekind); - hr = E_INVALIDARG; + hr = TYPE_E_BADMODULEKIND; goto end; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10854