Add propget and propput function attributes.

Clarify the meaning of the FKCCIC bit field.
This commit is contained in:
Huw Davies 2005-01-19 19:08:01 +00:00 committed by Alexandre Julliard
parent 2cae30b6cf
commit b1a0c6c3d7
2 changed files with 17 additions and 11 deletions

View File

@ -176,13 +176,13 @@ typedef struct {
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 @@ typedef struct {
/*
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;

View File

@ -1119,7 +1119,8 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, func_t *func)
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 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, func_t *func)
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 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, func_t *func)
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;