widl: typeinfo attributes
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Mon Jan 10 05:21:25 CST 2005
Huw Davies <huw at codeweavers.com>
Add support for hidden, restricted and version attributes on
typeinfos
--
Huw Davies
huw at codeweavers.com
Index: tools/widl/write_msft.c
===================================================================
RCS file: /home/wine/wine/tools/widl/write_msft.c,v
retrieving revision 1.2
diff -u -p -r1.2 write_msft.c
--- tools/widl/write_msft.c 9 Jan 2005 17:59:44 -0000 1.2
+++ tools/widl/write_msft.c 10 Jan 2005 11:18:26 -0000
@@ -1291,7 +1291,16 @@ static msft_typeinfo_t *create_msft_type
for( ; attr; attr = NEXT_LINK(attr)) {
- if(attr->type == ATTR_UUID) {
+ switch(attr->type) {
+ case ATTR_HIDDEN:
+ typeinfo->flags |= 0x10; /* TYPEFLAG_FHIDDEN */
+ break;
+
+ case ATTR_RESTRICTED:
+ typeinfo->flags |= 0x200; /* TYPEFLAG_FRESTRICTED */
+ break;
+
+ case ATTR_UUID:
guidentry.guid = *(GUID*)attr->u.pval;
guidentry.hreftype = typelib->typelib_typeinfo_offsets[typeinfo->typekind >> 16];
guidentry.next_hash = -1;
@@ -1301,6 +1310,14 @@ static msft_typeinfo_t *create_msft_type
typelib->typelib_header.dispatchpos = typelib->typelib_typeinfo_offsets[typeinfo->typekind >> 16];
}
#endif
+
+ case ATTR_VERSION:
+ typeinfo->version = attr->u.ival;
+ break;
+
+ default:
+ warning("create_msft_typeinfo: ignoring attr %d\n", attr->type);
+ break;
}
}
More information about the wine-patches
mailing list