widl: Write out TYPEFLAG_FDUAL, TYPEFLAG_FDISPATCHABLE and
TYPEFLAG_FOLEAUTOMATION typelib flags.
This commit is contained in:
parent
69698f9b44
commit
649d5d0e8e
|
@ -1676,6 +1676,11 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
|
||||||
typeinfo->datatype1 = offset;
|
typeinfo->datatype1 = offset;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ATTR_DUAL:
|
||||||
|
typeinfo->flags |= 0x40; /* TYPEFLAG_FDUAL */
|
||||||
|
break;
|
||||||
|
|
||||||
case ATTR_HELPCONTEXT:
|
case ATTR_HELPCONTEXT:
|
||||||
{
|
{
|
||||||
expr_t *expr = (expr_t*)attr->u.pval;
|
expr_t *expr = (expr_t*)attr->u.pval;
|
||||||
|
@ -1706,6 +1711,10 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
|
||||||
case ATTR_ODL:
|
case ATTR_ODL:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTR_OLEAUTOMATION:
|
||||||
|
typeinfo->flags |= 0x100; /* TYPEFLAG_FOLEAUTOMATION */
|
||||||
|
break;
|
||||||
|
|
||||||
case ATTR_PUBLIC:
|
case ATTR_PUBLIC:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1824,6 +1833,7 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface)
|
||||||
msft_typeinfo_t *msft_typeinfo;
|
msft_typeinfo_t *msft_typeinfo;
|
||||||
int num_parents = 0, num_funcs = 0;
|
int num_parents = 0, num_funcs = 0;
|
||||||
const attr_t *attr;
|
const attr_t *attr;
|
||||||
|
const type_t *derived;
|
||||||
|
|
||||||
for(attr = interface->attrs; attr; attr = NEXT_LINK(attr))
|
for(attr = interface->attrs; attr; attr = NEXT_LINK(attr))
|
||||||
if(attr->type == ATTR_DISPINTERFACE)
|
if(attr->type == ATTR_DISPINTERFACE)
|
||||||
|
@ -1841,6 +1851,14 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface)
|
||||||
msft_typeinfo->typeinfo->size = 4;
|
msft_typeinfo->typeinfo->size = 4;
|
||||||
msft_typeinfo->typeinfo->typekind |= 0x2200;
|
msft_typeinfo->typeinfo->typekind |= 0x2200;
|
||||||
|
|
||||||
|
for (derived = interface->ref; derived; derived = derived->ref)
|
||||||
|
if (derived->name && !strcmp(derived->name, "IDispatch"))
|
||||||
|
msft_typeinfo->typeinfo->flags |= 0x1000; /* TYPEFLAG_FDISPATCHABLE */
|
||||||
|
|
||||||
|
/* can't be dual if it doesn't derive from IDispatch */
|
||||||
|
if (!(msft_typeinfo->typeinfo->flags & 0x1000)) /* TYPEFLAG_FDISPATCHABLE */
|
||||||
|
msft_typeinfo->typeinfo->flags &= 0x40; /* TYPEFLAG_FDUAL */
|
||||||
|
|
||||||
if(interface->ref)
|
if(interface->ref)
|
||||||
add_impl_type(msft_typeinfo, interface->ref);
|
add_impl_type(msft_typeinfo, interface->ref);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue