widl #16: add support for propget and propput function attributes

Huw D M Davies h.davies1 at physics.ox.ac.uk
Tue Jan 18 07:51:15 CST 2005


        Huw Davies <huw at codeweavers.com>
        Add propget and propput function attributes.
        Clarify the meaning of the FKCCIC bit field.
-- 
Huw Davies
huw at codeweavers.com
--- tools/widl/typelib_struct.h	2005-01-18 13:42:34.364279079 +0000
+++ tools/widl/typelib_struct.h	2005-01-18 13:44:47.768947127 +0000
@@ -176,13 +176,13 @@
     INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
 #endif
     INT   FKCCIC;       /* bit string with the following  */
-                        /* meaning (bit 0 is the msb): */
-                        /* bit 2 indicates that oEntry is numeric */
-                        /* bit 3 that parameter has default values */
-                        /* calling convention (bits 4-7 ) */
-                        /* bit 8 indicates that custom data is present */
-                        /* Invokation kind (bits 9-12 ) */
-                        /* function kind (eg virtual), bits 13-15  */
+                        /* meaning (bit 0 is the lsb): */
+                        /* bits 0 - 2: FUNCKIND */
+                        /* bits 3 - 6: INVOKEKIND */
+                        /* bit  7: custom data present */
+                        /* bits 8 - 11: CALLCONV */
+                        /* bit  12: parameters have default values */
+                        /* bit  13: oEntry is numeric */
 #ifdef WORDS_BIGENDIAN
     INT16 nroargs;      /* nr of optional arguments */
     INT16 nrargs;       /* number of arguments (including optional ????) */
@@ -195,7 +195,7 @@
 /*
 0*  INT   helpcontext;
 1*  INT   oHelpString;
-2*  INT   oEntry;       // either offset in string table or numeric as it is //
+2*  INT   oEntry;       // either offset in string table or numeric as it is (see bit 13 of FKCCIC) //
 3*  INT   res9;         // unknown (-1) //
 4*  INT   resA;         // unknown (-1) //
 5*  INT   HelpStringContext;
--- tools/widl/write_msft.c	2005-01-18 13:43:16.415402784 +0000
+++ tools/widl/write_msft.c	2005-01-18 13:45:25.189158467 +0000
@@ -1119,7 +1119,8 @@
     var_t *arg, *last_arg = NULL;
     char *namedata;
     attr_t *attr;
-    unsigned int funcflags = 0, callconv = 4;
+    unsigned int funcflags = 0, callconv = 4 /* CC_STDCALL */;
+    unsigned int funckind = 1 /* FUNC_PUREVIRTUAL */, invokekind = 1 /* INVOKE_FUNC */;
     int help_context = 0, help_string_context = 0, help_string_offset = -1;
 
     id = ((0x6000 | typeinfo->typeinfo->cImplTypes) << 16) | index;
@@ -1164,7 +1165,12 @@
             break;
         case ATTR_OUT:
             break;
-
+        case ATTR_PROPGET:
+            invokekind = 0x2; /* INVOKE_PROPERTYGET */
+            break;
+        case ATTR_PROPPUT:
+            invokekind = 0x4; /* INVOKE_PROPERTYPUT */
+            break;
         default:
             warning("ignoring attr %d\n", attr->type);
             break;
@@ -1180,7 +1186,7 @@
     encode_var(typeinfo->typelib, func->def, &typedata[1], NULL, NULL, &decoded_size);
     typedata[2] = funcflags;
     typedata[3] = ((52 /*sizeof(FUNCDESC)*/ + decoded_size) << 16) | typeinfo->typeinfo->cbSizeVft;
-    typedata[4] = (index << 16) | (callconv << 8) | 9;
+    typedata[4] = (index << 16) | (callconv << 8) | (invokekind << 3) | funckind;
     if(num_defaults) typedata[4] |= 0x1000;
     typedata[5] = num_params;
 



More information about the wine-patches mailing list