The TYPEFLAG_FDISPATCHABLE is a calculated flag that signals the interface has a base of IDispatch.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
The TYPEFLAG_FDISPATCHABLE is a calculated flag that signals the interface has a base of IDispatch. --- dlls/oleaut32/typelib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index c4f00ca5bea..d59118a98e5 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -7845,7 +7845,8 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( pTypeInfoImpl->ref = 0; list_init(&pTypeInfoImpl->custdata_list);
- if (This->typeattr.typekind == TKIND_INTERFACE) + if (This->typeattr.typekind == TKIND_INTERFACE && + This->typeattr.wTypeFlags & TYPEFLAG_FDISPATCHABLE) pTypeInfoImpl->typeattr.typekind = TKIND_DISPATCH; else pTypeInfoImpl->typeattr.typekind = TKIND_INTERFACE;
Surely this is testable?
On Wed Jul 23 09:05:15 2025 +0000, Elizabeth Figura wrote:
Surely this is testable?
I'll have to workout the exact scenario the errir occurs.
As a note there is many tests already that go through both cases, that appear to work just by chance under wine.
While developing it, I attempted to use the TYPEFLAG_FDUAL flag but it caused a massive amount of test failures. Just the theory of the original code is just wrong, Not all interfaces can be an dispatch interface.
On Wed Jul 23 09:05:15 2025 +0000, Alistair Leslie-Hughes wrote:
I'll have to workout the exact scenario the errir occurs. As a note there is many tests already that go through both cases, that appear to work just by chance under wine. While developing it, I attempted to use the TYPEFLAG_FDUAL flag but it caused a massive amount of test failures. Just the theory of the original code is just wrong, Not all interfaces can be an dispatch interface.
However TYPEFLAG_FDUAL is checked earlier, and I think it implies IDispatch support. But that's definitely needs a number of tests, not just for this one flag, but for different HREFTYPE values too. There is too many assumptions already making it impossible to follow, fix like that won't improve that but tests at least will offer some assurance.