Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- Rebased to follow 92eb5ef5a1ada34853b57626b4e5201010decc21
--- tools/widl/parser.l | 2 +- tools/widl/parser.y | 15 +++++++++++++++ tools/widl/widltypes.h | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l index b715342ad59..d7d96702322 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -339,6 +339,7 @@ static const struct keyword attr_keywords[] = {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE, 0}, {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE, 0}, {"control", tCONTROL, 0}, + {"custom", tCUSTOM, 0}, {"decode", tDECODE, 0}, {"defaultbind", tDEFAULTBIND, 0}, {"defaultcollelem", tDEFAULTCOLLELEM, 0}, @@ -431,7 +432,6 @@ static const struct keyword attr_keywords[] = };
/* attributes TODO: - custom first_is last_is max_is diff --git a/tools/widl/parser.y b/tools/widl/parser.y index caf4569179b..160e4029a6e 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -58,6 +58,7 @@ static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t static attr_t *make_attr(enum attr_type type); static attr_t *make_attrv(enum attr_type type, unsigned int val); static attr_t *make_attrp(enum attr_type type, void *val); +static attr_t *make_custom_attr(UUID *id, expr_t *pval); static expr_list_t *append_expr(expr_list_t *list, expr_t *expr); static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_t *decl, int top); static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls); @@ -177,6 +178,7 @@ static typelib_t *current_typelib; %token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS %token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE %token tCONTEXTHANDLESERIALIZE tCONTROL tCPPQUOTE +%token tCUSTOM %token tDECODE tDEFAULT tDEFAULTBIND %token tDEFAULTCOLLELEM %token tDEFAULTVALUE @@ -506,6 +508,7 @@ attribute: { $$ = NULL; } | tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ } | tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ } | tCONTROL { $$ = make_attr(ATTR_CONTROL); } + | tCUSTOM '(' uuid_string ',' expr_const ')' { $$ = make_custom_attr($3, $5); } | tDECODE { $$ = make_attr(ATTR_DECODE); } | tDEFAULT { $$ = make_attr(ATTR_DEFAULT); } | tDEFAULTBIND { $$ = make_attr(ATTR_DEFAULTBIND); } @@ -1366,6 +1369,17 @@ static attr_t *make_attrp(enum attr_type type, void *val) return a; }
+static attr_t *make_custom_attr(UUID *id, expr_t *pval) +{ + attr_t *a = xmalloc(sizeof(attr_t)); + attr_custdata_t *cstdata = xmalloc(sizeof(attr_custdata_t)); + a->type = ATTR_CUSTOM; + cstdata->id = *id; + cstdata->pval = pval; + a->u.pval = cstdata; + return a; +} + static expr_list_t *append_expr(expr_list_t *list, expr_t *expr) { if (!expr) return list; @@ -2142,6 +2156,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_COMMSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" }, /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" }, /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" }, + /* ATTR_CUSTOM */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, "custom" }, /* ATTR_DECODE */ { 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" }, /* ATTR_DEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" }, /* ATTR_DEFAULTBIND */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" }, diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 2e2ee7a206b..b02b80e122c 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -37,6 +37,7 @@ typedef GUID UUID;
typedef struct _loc_info_t loc_info_t; typedef struct _attr_t attr_t; +typedef struct _attr_custdata_t attr_custdata_t; typedef struct _expr_t expr_t; typedef struct _type_t type_t; typedef struct _var_t var_t; @@ -84,6 +85,7 @@ enum attr_type ATTR_COMMSTATUS, ATTR_CONTEXTHANDLE, ATTR_CONTROL, + ATTR_CUSTOM, ATTR_DECODE, ATTR_DEFAULT, ATTR_DEFAULTBIND, @@ -338,6 +340,11 @@ struct _expr_t { struct list entry; };
+struct _attr_custdata_t { + GUID id; + expr_t *pval; +}; + struct struct_details { var_list_t *fields;
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- tools/widl/write_msft.c | 80 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 4 deletions(-)
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 440bb23f79b..734bdeee695 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1276,6 +1276,7 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid,
guidoffset = ctl2_alloc_guid(typelib, &guidentry); if(vt == VT_BSTR) + /* TODO midl appears to share a single reference if the same string is used as custdata in multiple places */ write_string_value(typelib, &data_out, value); else write_int_value(typelib, &data_out, vt, *(int*)value); @@ -1291,6 +1292,25 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, return S_OK; }
+static HRESULT set_custdata_attr(msft_typelib_t *typelib, attr_custdata_t *custdata, int *offset) +{ + switch(custdata->pval->type) { + case EXPR_STRLIT: + case EXPR_WSTRLIT: + set_custdata(typelib, &custdata->id, VT_BSTR, custdata->pval->u.sval, offset); + break; + case EXPR_HEXNUM: + case EXPR_NUM: + set_custdata(typelib, &custdata->id, VT_I4, &custdata->pval->u.lval, offset); + break; + default: + error("custom() attribute with unknown type\n"); + break; + } + + return S_OK; +} + static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) { int offset, name_offset; @@ -1298,12 +1318,14 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) int i, id, next_idx; int decoded_size, extra_attr = 0; int num_params = 0, num_optional = 0, num_defaults = 0; + int has_arg_custdata = 0; var_t *arg; unsigned char *namedata; const attr_t *attr; unsigned int funcflags = 0, callconv = 4 /* CC_STDCALL */; unsigned int funckind, invokekind = 1 /* INVOKE_FUNC */; int help_context = 0, help_string_context = 0, help_string_offset = -1; + int func_custdata_offset = -1; int entry = -1, entry_is_ord = 0; int lcid_retval_count = 0;
@@ -1337,6 +1359,8 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) num_defaults++; else if(attr->type == ATTR_OPTIONAL) num_optional++; + else if(attr->type == ATTR_CUSTOM) + has_arg_custdata = 1; } }
@@ -1350,6 +1374,9 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) case ATTR_BINDABLE: funcflags |= 0x4; /* FUNCFLAG_FBINDABLE */ break; + case ATTR_CUSTOM: + set_custdata_attr(typeinfo->typelib, attr->u.pval, &func_custdata_offset); + break; case ATTR_DEFAULTBIND: funcflags |= 0x20; /* FUNCFLAG_FDEFAULTBIND */ break; @@ -1430,6 +1457,10 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) } }
+ if(has_arg_custdata || func_custdata_offset != -1) { + extra_attr = max(extra_attr, 7 + num_params); + } + /* allocate type data space for us */ typedata_size = 0x18 + extra_attr * sizeof(int) + (num_params * (num_defaults ? 16 : 12));
@@ -1476,6 +1507,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) typedata[2] = funcflags; typedata[3] = ((52 /*sizeof(FUNCDESC)*/ + decoded_size) << 16) | typeinfo->typeinfo->cbSizeVft; typedata[4] = (next_idx << 16) | (callconv << 8) | (invokekind << 3) | funckind; + if(has_arg_custdata || func_custdata_offset != -1) typedata[4] |= 0x0080; if(num_defaults) typedata[4] |= 0x1000; if(entry_is_ord) typedata[4] |= 0x2000; typedata[5] = (num_optional << 16) | num_params; @@ -1486,6 +1518,10 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) typedata[3] += (24 /*sizeof(PARAMDESCEX)*/ * num_defaults) << 16;
switch(extra_attr) { + default: + if(extra_attr > 7 + num_params) warning("unknown number of optional attrs\n"); + /* typedata[13..+num_params] = arg_custdata_offset handled in below loop */ + case 7: typedata[12] = func_custdata_offset; case 6: typedata[11] = help_string_context; case 5: typedata[10] = -1; case 4: typedata[9] = -1; @@ -1494,8 +1530,6 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) case 1: typedata[6] = help_context; case 0: break; - default: - warning("unknown number of optional attrs\n"); }
if (type_function_get_args(func->declspec.type)) @@ -1506,12 +1540,16 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) int paramflags = 0; int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3; int *defaultdata = num_defaults ? typedata + 6 + extra_attr + i : NULL; + int arg_custdata_offset = -1;
if(defaultdata) *defaultdata = -1;
encode_var(typeinfo->typelib, arg->declspec.type, arg, paramdata, &decoded_size); if (arg->attrs) LIST_FOR_EACH_ENTRY( attr, arg->attrs, const attr_t, entry ) { switch(attr->type) { + case ATTR_CUSTOM: + set_custdata_attr(typeinfo->typelib, attr->u.pval, &arg_custdata_offset); + break; case ATTR_DEFAULTVALUE: { paramflags |= 0x30; /* PARAMFLAG_FHASDEFAULT | PARAMFLAG_FOPT */ @@ -1539,6 +1577,9 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) chat("unhandled param attr %d\n", attr->type); break; } + if(extra_attr > 7 + i) { + typedata[13+i] = arg_custdata_offset; + } } paramdata[1] = -1; paramdata[2] = paramflags; @@ -1621,6 +1662,7 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) { int offset, id; unsigned int typedata_size; + int extra_attr = 0; INT *typedata; unsigned int var_datawidth, var_alignment = 0; int var_type_size, var_kind = 0 /* VAR_PERINSTANCE */; @@ -1629,6 +1671,7 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) const attr_t *attr; unsigned char *namedata; int var_num = (typeinfo->typeinfo->cElement >> 16) & 0xffff; + int var_custdata_offset = -1;
if (!var->name) var->name = gen_name(); @@ -1643,6 +1686,10 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) case ATTR_BINDABLE: varflags |= 0x04; /* VARFLAG_FBINDABLE */ break; + case ATTR_CUSTOM: + extra_attr = max(extra_attr,4); + set_custdata_attr(typeinfo->typelib, attr->u.pval, &var_custdata_offset); + break; case ATTR_DEFAULTBIND: varflags |= 0x20; /* VARFLAG_FDEFAULTBIND */ break; @@ -1686,7 +1733,7 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) }
/* allocate type data space for us */ - typedata_size = 0x14; + typedata_size = 0x14 + extra_attr * sizeof(int);
if (!typeinfo->var_data) { typeinfo->var_data = xmalloc(0x100); @@ -1762,6 +1809,18 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) /* add type description size to total required allocation */ typedata[3] += var_type_size << 16 | var_kind;
+ switch(extra_attr) { + case 5: typedata[9] = -1 /*help_string_context*/; + case 4: typedata[8] = var_custdata_offset; + case 3: typedata[7] = -1; + case 2: typedata[6] = -1 /*help_string_offset*/; + case 1: typedata[5] = -1 /*help_context*/; + case 0: + break; + default: + warning("unknown number of optional attrs\n"); + } + /* fix type alignment */ alignment = (typeinfo->typeinfo->typekind >> 11) & 0x1f; if (alignment < var_alignment) { @@ -1871,7 +1930,9 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ if (kind == TKIND_COCLASS) typeinfo->flags |= 0x20; /* TYPEFLAG_FCONTROL */ break; - + case ATTR_CUSTOM: + set_custdata_attr(typelib, attr->u.pval, &typeinfo->oCustData); + break; case ATTR_DLLNAME: { int offset = ctl2_alloc_string(typelib, attr->u.pval); @@ -2700,6 +2761,7 @@ int create_msft_typelib(typelib_t *typelib) msft_typelib_t *msft; int failed = 0; const statement_t *stmt; + const attr_t *attr; time_t cur_time; char *time_override; unsigned int version = 7 << 24 | 555; /* 7.00.0555 */ @@ -2747,6 +2809,16 @@ int create_msft_typelib(typelib_t *typelib) set_help_string_dll(msft); set_help_string_context(msft);
+ if (typelib->attrs) LIST_FOR_EACH_ENTRY( attr, typelib->attrs, const attr_t, entry ) { + switch(attr->type) { + case ATTR_CUSTOM: + set_custdata_attr(msft, attr->u.pval, &msft->typelib_header.CustomDataOffset); + break; + default: + break; + } + } + /* midl adds two sets of custom data to the library: the current unix time and midl's version number */ time_override = getenv( "WIDL_TIME_OVERRIDE");
e.g. using the same kind of custdata in multiple interfaces
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- tools/widl/write_msft.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 734bdeee695..5728f041f6f 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1263,18 +1263,25 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, int vt, const void *value, int *offset) { - MSFT_GuidEntry guidentry; int guidoffset; int custoffset; int *custdata; int data_out; + int hash_key;
- guidentry.guid = *guid; + hash_key = ctl2_hash_guid(guid); + guidoffset = ctl2_find_guid(typelib, hash_key, guid); + if(guidoffset == -1) { + /* add GUID that was not already present */ + MSFT_GuidEntry guidentry; + guidentry.guid = *guid;
- guidentry.hreftype = -1; - guidentry.next_hash = -1; + guidentry.hreftype = -1; + guidentry.next_hash = -1; + + guidoffset = ctl2_alloc_guid(typelib, &guidentry); + }
- guidoffset = ctl2_alloc_guid(typelib, &guidentry); if(vt == VT_BSTR) /* TODO midl appears to share a single reference if the same string is used as custdata in multiple places */ write_string_value(typelib, &data_out, value);
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- dlls/oleaut32/tests/typelib.c | 275 +++++++++++++++++++++++++++++++++- 1 file changed, 267 insertions(+), 8 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 47a84a769e1..3c7a3bd147d 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -4315,6 +4315,12 @@ static const char *dump_variant_info(const VARIANT *v) return buf; }
+static const char *dump_custdata_info(LPCUSTDATAITEM item) { + static char buf[256]; + sprintf(buf, "{ "%s", %s }", wine_dbgstr_guid(&item->guid), dump_variant_info(&item->varValue)); + return buf; +} + static int get_href_type(ITypeInfo *info, TYPEDESC *tdesc) { int href_type = -1; @@ -4342,10 +4348,12 @@ static int get_href_type(ITypeInfo *info, TYPEDESC *tdesc) static void test_dump_typelib(const WCHAR *name) { ITypeInfo *info; + ITypeInfo2 *info2; ITypeLib *lib; int count; int i; HREFTYPE hRefType = 0; + CUSTDATA cust_data;
OLE_CHECK(LoadTypeLib(name, &lib));
@@ -4357,7 +4365,7 @@ static void test_dump_typelib(const WCHAR *name) TYPEATTR *attr; BSTR name; DWORD help_ctx; - int f = 0, v = 0; + int f = 0, v = 0, c = 0;
OLE_CHECK(ITypeLib_GetDocumentation(lib, i, &name, NULL, &help_ctx, NULL)); printf("{\n" @@ -4371,7 +4379,10 @@ static void test_dump_typelib(const WCHAR *name) ITypeInfo_Release(info); info = refInfo; } + OLE_CHECK(ITypeInfo_QueryInterface(info, &IID_ITypeInfo2, (void**)&info2)); + OLE_CHECK(ITypeInfo_GetTypeAttr(info, &attr)); + OLE_CHECK(ITypeInfo2_GetAllCustData(info2,&cust_data));
printf(" "%s",\n", wine_dbgstr_guid(&attr->guid));
@@ -4382,6 +4393,13 @@ static void test_dump_typelib(const WCHAR *name) help_ctx, MAKELONG(attr->wMinorVerNum, attr->wMajorVerNum), attr->cbSizeVft/sizeof(void*), attr->cFuncs, attr->cVars);
+ printf(" /*#custdata*/ %d, %s\n", cust_data.cCustData, cust_data.cCustData ? "{" : "{},"); + for (c = 0; c < cust_data.cCustData; ++c) { + printf(" %s,\n", dump_custdata_info(&cust_data.prgCustData[c])); + } + if (cust_data.cCustData) printf(" },\n"); + ClearCustData(&cust_data); + printf(" { /* funcs */%s", attr->cFuncs ? "\n" : " },\n"); while (1) { @@ -4392,6 +4410,7 @@ static void test_dump_typelib(const WCHAR *name)
if (FAILED(ITypeInfo_GetFuncDesc(info, f, &desc))) break; + OLE_CHECK(ITypeInfo2_GetAllFuncCustData(info2,f,&cust_data)); printf(" {\n" " /*id*/ 0x%x, /*func*/ %s, /*inv*/ %s, /*call*/ %s,\n", desc->memid, map_value(desc->funckind, funckind_map), map_value(desc->invkind, invkind_map), @@ -4400,12 +4419,30 @@ static void test_dump_typelib(const WCHAR *name) desc->cParams, desc->cParamsOpt, desc->oVft/sizeof(void*), desc->cScodes, dump_func_flags(desc->wFuncFlags)); printf(" {%s, %s, %s}, /* ret */\n", map_value(desc->elemdescFunc.tdesc.vt, vt_map), map_value(get_href_type(info, &desc->elemdescFunc.tdesc), tkind_map), dump_param_flags(U(desc->elemdescFunc).paramdesc.wParamFlags)); + printf(" /*#custdata*/ %d, %s\n", cust_data.cCustData, cust_data.cCustData ? "{" : "{},"); + for (c = 0; c < cust_data.cCustData; ++c) { + printf(" %s,\n", dump_custdata_info(&cust_data.prgCustData[c])); + } + if (cust_data.cCustData) printf(" },\n"); + ClearCustData(&cust_data); + printf(" { /* params */\n"); for (p = 0; p < desc->cParams; p++) { ELEMDESC e = desc->lprgelemdescParam[p]; - printf(" {%s, %s, %s},\n", map_value(e.tdesc.vt, vt_map), + OLE_CHECK(ITypeInfo2_GetAllParamCustData(info2,f,p,&cust_data)); + printf(" {%s, %s, %s", map_value(e.tdesc.vt, vt_map), map_value(get_href_type(info, &e.tdesc), tkind_map), dump_param_flags(U(e).paramdesc.wParamFlags)); + if (cust_data.cCustData) { + printf(", /*#custdata*/ %d, {\n", cust_data.cCustData); + for (c = 0; c < cust_data.cCustData; ++c) { + printf(" %s,\n", dump_custdata_info(&cust_data.prgCustData[c])); + } + printf(" } },\n"); + } else { + printf("},\n"); + } + ClearCustData(&cust_data); } printf(" {-1, 0, 0}\n"); printf(" },\n"); @@ -4432,6 +4469,7 @@ static void test_dump_typelib(const WCHAR *name) UINT cNames; if (FAILED(ITypeInfo_GetVarDesc(info, v, &desc))) break; + OLE_CHECK(ITypeInfo2_GetAllVarCustData(info2,v,&cust_data)); OLE_CHECK(ITypeInfo_GetNames(info, desc->memid, &varname, 1, &cNames)); if(cNames!=1) { printf("GetNames failed - VARDESC should have one name, got %d\n", cNames); return; } printf(" {\n" @@ -4445,6 +4483,14 @@ static void test_dump_typelib(const WCHAR *name) } else { printf(" { /* DUMMYUNIONNAME unused*/ },\n"); } + + printf(" /*#custdata*/ %d, %s\n", cust_data.cCustData, cust_data.cCustData ? "{" : "{},"); + for (c = 0; c < cust_data.cCustData; ++c) { + printf(" %s,\n", dump_custdata_info(&cust_data.prgCustData[c])); + } + if (cust_data.cCustData) printf(" },\n"); + ClearCustData(&cust_data); + printf(" {%s, %s, %s}, /* ret */\n", map_value(desc->elemdescVar.tdesc.vt, vt_map), map_value(get_href_type(info, &desc->elemdescVar.tdesc), tkind_map), dump_param_flags(U(desc->elemdescVar).paramdesc.wParamFlags)); printf(" },\n"); @@ -4467,6 +4513,7 @@ static void test_dump_typelib(const WCHAR *name) }
ITypeInfo_ReleaseTypeAttr(info, attr); + ITypeInfo2_Release(info2); ITypeInfo_Release(info); SysFreeString(name); } @@ -4485,11 +4532,18 @@ typedef struct _variant_info { }; } variant_info;
+typedef struct _custdata_info { + LPCSTR uuid; + variant_info value; +} custdata_info; + typedef struct _element_info { VARTYPE vt; TYPEKIND type; USHORT wParamFlags; + DWORD cCustData; + custdata_info custdata[5]; } element_info;
typedef struct _function_info @@ -4504,6 +4558,8 @@ typedef struct _function_info short cScodes; WORD wFuncFlags; element_info ret_type; + DWORD cCustData; + custdata_info custdata[5]; element_info params[15]; LPCSTR names[15]; } function_info; @@ -4518,6 +4574,8 @@ typedef struct _var_info ULONG oInst; /* VAR_PERINSTANCE */ variant_info varValue; /* VAR_CONST */ } DUMMYUNIONNAME; + DWORD cCustData; + custdata_info custdata[5]; element_info elemdescVar; } var_info;
@@ -4534,6 +4592,8 @@ typedef struct _type_info USHORT cbSizeVft; USHORT cFuncs; USHORT cVars; + DWORD cCustData; + custdata_info custdata[5]; function_info funcs[20]; var_info vars[20]; } type_info; @@ -4546,11 +4606,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7a0001}", /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct g), /*size*/ sizeof(struct g), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "g1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4560,11 +4622,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7a0002}", /*kind*/ TKIND_INTERFACE, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(test_iface*), /*size*/ sizeof(test_iface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 4, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60010000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {-1, 0, 0} @@ -4583,11 +4647,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7aa001}", /*kind*/ TKIND_INTERFACE, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(parent_iface*), /*size*/ sizeof(parent_iface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 4, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60010000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -4606,11 +4672,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7aa002}", /*kind*/ TKIND_INTERFACE, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(child_iface*), /*size*/ sizeof(child_iface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 5, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4627,11 +4695,13 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753903}", /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct _n), /*size*/ sizeof(struct _n), /*helpctx*/ 0x0003, /*version*/ 0x00010002, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "n1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4641,6 +4711,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753902}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(n), /*size*/ sizeof(n), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4649,6 +4720,7 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ALIAS, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(nn), /*size*/ sizeof(nn), /*helpctx*/ 0x0003, /*version*/ 0x00010002, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4657,11 +4729,13 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753906}", /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct _m), /*size*/ sizeof(struct _m), /*helpctx*/ 0x0003, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "m1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4671,6 +4745,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753905}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(m), /*size*/ sizeof(m), /*helpctx*/ 0x0000, /*version*/ 0x00010002, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4679,6 +4754,7 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ALIAS, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(mm), /*size*/ sizeof(mm), /*helpctx*/ 0x0003, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4687,11 +4763,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7aaedd}", /*kind*/ TKIND_DISPATCH, /*flags*/ TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL, /*align*/ TYPE_ALIGNMENT(IDualIface*), /*size*/ sizeof(IDualIface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 7, /*#func*/ 8, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60000000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 2, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FOUT}, @@ -4708,6 +4786,7 @@ static const type_info info[] = { /*id*/ 0x60000001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 1, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4720,6 +4799,7 @@ static const type_info info[] = { /*id*/ 0x60000002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 2, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4732,6 +4812,7 @@ static const type_info info[] = { /*id*/ 0x60010000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT}, {-1, 0, 0} @@ -4746,6 +4827,7 @@ static const type_info info[] = { /*id*/ 0x60010001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_UINT, -1, PARAMFLAG_FIN}, {VT_UI4, -1, PARAMFLAG_FIN}, @@ -4764,6 +4846,7 @@ static const type_info info[] = { /*id*/ 0x60010002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 5, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -4786,6 +4869,7 @@ static const type_info info[] = { /*id*/ 0x60010003, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 6, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_I4, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -4814,6 +4898,7 @@ static const type_info info[] = { /*id*/ 0x60020000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4830,11 +4915,13 @@ static const type_info info[] = { "{b14b6bb5-904e-4ff9-b247-bd361f7aaedd}", /*kind*/ TKIND_INTERFACE, /*flags*/ TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL, /*align*/ TYPE_ALIGNMENT(IDualIface*), /*size*/ sizeof(IDualIface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 8, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4851,11 +4938,13 @@ static const type_info info[] = { "{ec5dfcd6-eeb0-4cd6-b51e-8030e1dac009}", /*kind*/ TKIND_INTERFACE, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(ISimpleIface*), /*size*/ sizeof(ISimpleIface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 8, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -4872,26 +4961,31 @@ static const type_info info[] = { "{4029f190-ca4a-4611-aeb9-673983cb96dd}", /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct test_struct), /*size*/ sizeof(struct test_struct), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 4, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "hr", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "b", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 4 }, + /*#custdata*/ 0, {}, {VT_BOOL, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000002, /*name*/ "disp", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 8 }, + /*#custdata*/ 0, {}, {VT_DISPATCH, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000003, /*name*/ "bstr", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 12 }, + /*#custdata*/ 0, {}, {VT_BSTR, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4901,26 +4995,31 @@ static const type_info info[] = { "{4029f190-ca4a-4611-aeb9-673983cb96de}", /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct test_struct2), /*size*/ sizeof(struct test_struct2), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 4, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "hr", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "b", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 4 }, + /*#custdata*/ 0, {}, {VT_BOOL, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000002, /*name*/ "disp", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 8 }, + /*#custdata*/ 0, {}, {VT_DISPATCH, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000003, /*name*/ "bstr", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 12 }, + /*#custdata*/ 0, {}, {VT_BSTR, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4930,6 +5029,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a75396a}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FRESTRICTED, /*align*/ TYPE_ALIGNMENT(t_INT), /*size*/ sizeof(t_INT), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4938,6 +5038,7 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ALIAS, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(a), /*size*/ sizeof(a), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -4946,16 +5047,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "a1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "a2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4965,16 +5069,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "aa1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "aa2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -4984,16 +5091,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "b1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "b2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5003,16 +5113,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "bb1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "bb2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5022,6 +5135,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a75396b}", /*kind*/ TKIND_ALIAS, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(c), /*size*/ sizeof(c), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -5030,16 +5144,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "c1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "c2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5049,16 +5166,19 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a75396c}", /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "cc1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "cc2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5068,6 +5188,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a75396d}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(d), /*size*/ sizeof(d), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -5076,16 +5197,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_ENUM, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "d1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "d2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5095,16 +5219,19 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a75396e}", /*kind*/ TKIND_ENUM, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ 4, /*size*/ 4, /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "dd1", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "dd2", /*flags*/ 0, /*kind*/ VAR_CONST, { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5114,6 +5241,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753970}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(e), /*size*/ sizeof(e), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -5122,11 +5250,13 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_RECORD, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(struct _e), /*size*/ sizeof(struct _e), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "e1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5136,11 +5266,13 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753971}", /*kind*/ TKIND_RECORD, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(struct ee), /*size*/ sizeof(struct ee), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "ee1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5150,6 +5282,7 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753972}", /*kind*/ TKIND_ALIAS, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(f), /*size*/ sizeof(f), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ }, }, @@ -5158,16 +5291,19 @@ static const type_info info[] = { "{00000000-0000-0000-0000-000000000000}", /*kind*/ TKIND_UNION, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(union _f), /*size*/ sizeof(union _f), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "f1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "f2", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_PTR, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5177,16 +5313,19 @@ static const type_info info[] = { "{016fe2ec-b2c8-45f8-b23b-39e53a753973}", /*kind*/ TKIND_UNION, /*flags*/ TYPEFLAG_FRESTRICTED|TYPEFLAG_FHIDDEN, /*align*/ TYPE_ALIGNMENT(union ff), /*size*/ sizeof(union ff), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ }, { /* vars */ { /*id*/ 0x40000000, /*name*/ "ff1", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0x40000001, /*name*/ "ff2", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, { .oInst = 0 }, + /*#custdata*/ 0, {}, {VT_PTR, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5196,11 +5335,13 @@ static const type_info info[] = { "{ec5dfcd6-eeb0-4cd6-b51e-8030e1dac00a}", /*kind*/ TKIND_INTERFACE, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(ITestIface*), /*size*/ sizeof(ITestIface*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 13, /*#func*/ 6, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ALIAS, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5215,6 +5356,7 @@ static const type_info info[] = { /*id*/ 0x60020001, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 8, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ENUM, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5229,6 +5371,7 @@ static const type_info info[] = { /*id*/ 0x60020002, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 9, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ALIAS, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5243,6 +5386,7 @@ static const type_info info[] = { /*id*/ 0x60020003, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 10, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ALIAS, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5257,6 +5401,7 @@ static const type_info info[] = { /*id*/ 0x60020004, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 11, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ALIAS, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5271,6 +5416,7 @@ static const type_info info[] = { /*id*/ 0x60020005, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 12, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_USERDEFINED, TKIND_ALIAS, PARAMFLAG_NONE}, {-1, 0, 0} @@ -5289,11 +5435,13 @@ static const type_info info[] = { "{2d4430d5-99ea-4645-85f0-c5814b72804b}", /*kind*/ TKIND_DISPATCH, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(ITestDispatch*), /*size*/ sizeof(ITestDispatch*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 7, /*#func*/ 7, /*#var*/ 2, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x1, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5306,6 +5454,7 @@ static const type_info info[] = { /*id*/ 0x2, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5320,6 +5469,7 @@ static const type_info info[] = { /*id*/ 0x3, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5332,6 +5482,7 @@ static const type_info info[] = { /*id*/ 0x4, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5346,6 +5497,7 @@ static const type_info info[] = { /*id*/ 0x5, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5358,6 +5510,7 @@ static const type_info info[] = { /*id*/ 0x6, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5372,6 +5525,7 @@ static const type_info info[] = { /*id*/ 0x7, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 2, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_BSTR, -1, PARAMFLAG_FIN}, {VT_I4, -1, PARAMFLAG_FLCID}, @@ -5389,11 +5543,13 @@ static const type_info info[] = { { /*id*/ 0xa, /*name*/ "property_int", /*flags*/ 0, /*kind*/ VAR_DISPATCH, { /* DUMMYUNIONNAME unused*/ }, + /*#custdata*/ 0, {}, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ }, { /*id*/ 0xb, /*name*/ "property_HRESULT", /*flags*/ 0, /*kind*/ VAR_DISPATCH, { /* DUMMYUNIONNAME unused*/ }, + /*#custdata*/ 0, {}, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ }, }, @@ -5403,11 +5559,13 @@ static const type_info info[] = { "{79ca07f9-ac22-44ac-9aaf-811f45412293}", /*kind*/ TKIND_DISPATCH, /*flags*/ TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL, /*align*/ TYPE_ALIGNMENT(ITestDispDual*), /*size*/ sizeof(ITestDispDual*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 7, /*#func*/ 14, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60000000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 2, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FOUT}, @@ -5424,6 +5582,7 @@ static const type_info info[] = { /*id*/ 0x60000001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 1, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5436,6 +5595,7 @@ static const type_info info[] = { /*id*/ 0x60000002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 2, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5448,6 +5608,7 @@ static const type_info info[] = { /*id*/ 0x60010000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT}, {-1, 0, 0} @@ -5462,6 +5623,7 @@ static const type_info info[] = { /*id*/ 0x60010001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_UINT, -1, PARAMFLAG_FIN}, {VT_UI4, -1, PARAMFLAG_FIN}, @@ -5480,6 +5642,7 @@ static const type_info info[] = { /*id*/ 0x60010002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 5, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -5502,6 +5665,7 @@ static const type_info info[] = { /*id*/ 0x60010003, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 6, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_I4, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -5530,6 +5694,7 @@ static const type_info info[] = { /*id*/ 0x1, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5542,6 +5707,7 @@ static const type_info info[] = { /*id*/ 0x2, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 8, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5554,6 +5720,7 @@ static const type_info info[] = { /*id*/ 0x3, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 9, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5566,6 +5733,7 @@ static const type_info info[] = { /*id*/ 0x4, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 10, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5578,6 +5746,7 @@ static const type_info info[] = { /*id*/ 0x5, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 11, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5590,6 +5759,7 @@ static const type_info info[] = { /*id*/ 0x6, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 12, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5602,6 +5772,7 @@ static const type_info info[] = { /*id*/ 0x7, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 13, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_BSTR, -1, PARAMFLAG_FIN}, {-1, 0, 0} @@ -5620,11 +5791,13 @@ static const type_info info[] = { "{79ca07f9-ac22-44ac-9aaf-811f45412293}", /*kind*/ TKIND_INTERFACE, /*flags*/ TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL, /*align*/ TYPE_ALIGNMENT(ITestDispDual*), /*size*/ sizeof(ITestDispDual*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 14, /*#func*/ 7, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x1, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5637,6 +5810,7 @@ static const type_info info[] = { /*id*/ 0x2, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 8, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5651,6 +5825,7 @@ static const type_info info[] = { /*id*/ 0x3, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 9, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5663,6 +5838,7 @@ static const type_info info[] = { /*id*/ 0x4, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 10, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5677,6 +5853,7 @@ static const type_info info[] = { /*id*/ 0x5, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 11, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5689,6 +5866,7 @@ static const type_info info[] = { /*id*/ 0x6, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 12, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT|PARAMFLAG_FRETVAL}, {-1, 0, 0} @@ -5703,6 +5881,7 @@ static const type_info info[] = { /*id*/ 0x7, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 13, /*#scodes*/ 0, /*flags*/ 0, {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_BSTR, -1, PARAMFLAG_FIN}, {VT_I4, -1, PARAMFLAG_FLCID}, @@ -5725,11 +5904,13 @@ static const type_info info[] = { "{cdb105e3-24fb-4ae6-b826-801b7b2a0a07}", /*kind*/ TKIND_DISPATCH, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(ITestDispInherit*), /*size*/ sizeof(ITestDispInherit*), /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 7, /*#func*/ 14, /*#var*/ 0, + /*#custdata*/ 0, {}, { /* funcs */ { /*id*/ 0x60000000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 2, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FOUT}, @@ -5746,6 +5927,7 @@ static const type_info info[] = { /*id*/ 0x60000001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 1, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5758,6 +5940,7 @@ static const type_info info[] = { /*id*/ 0x60000002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 2, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_UI4, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5770,6 +5953,7 @@ static const type_info info[] = { /*id*/ 0x60010000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FOUT}, {-1, 0, 0} @@ -5784,6 +5968,7 @@ static const type_info info[] = { /*id*/ 0x60010001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_UINT, -1, PARAMFLAG_FIN}, {VT_UI4, -1, PARAMFLAG_FIN}, @@ -5802,6 +5987,7 @@ static const type_info info[] = { /*id*/ 0x60010002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 5, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_PTR, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -5824,6 +6010,7 @@ static const type_info info[] = { /*id*/ 0x60010003, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 6, /*#scodes*/ 0, /*flags*/ FUNCFLAG_FRESTRICTED, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_I4, -1, PARAMFLAG_FIN}, {VT_PTR, -1, PARAMFLAG_FIN}, @@ -5852,6 +6039,7 @@ static const type_info info[] = { /*id*/ 0x1, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5864,6 +6052,7 @@ static const type_info info[] = { /*id*/ 0x2, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 8, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5876,6 +6065,7 @@ static const type_info info[] = { /*id*/ 0x3, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 9, /*#scodes*/ 0, /*flags*/ 0, {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5888,6 +6078,7 @@ static const type_info info[] = { /*id*/ 0x4, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 10, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5900,6 +6091,7 @@ static const type_info info[] = { /*id*/ 0x5, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 11, /*#scodes*/ 0, /*flags*/ 0, {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5912,6 +6104,7 @@ static const type_info info[] = { /*id*/ 0x6, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 12, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {-1, 0, 0} }, @@ -5924,6 +6117,7 @@ static const type_info info[] = { /*id*/ 0x7, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 13, /*#scodes*/ 0, /*flags*/ 0, {VT_R8, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 0, {}, { /* params */ {VT_BSTR, -1, PARAMFLAG_FIN}, {-1, 0, 0} @@ -5962,11 +6156,18 @@ static const type_info info[] = { expect_hex(U(*(elem)).paramdesc.wParamFlags, (info)->wParamFlags); \ }
+static void parse_guid(LPCSTR strGuid, GUID *guid) +{ + WCHAR guidW[39]; + MultiByteToWideChar(CP_ACP, 0, strGuid, -1, guidW, ARRAY_SIZE(guidW)); + ole_check(IIDFromString(guidW, guid)); +} + static void test_dump_typelib(const WCHAR *name) { ITypeLib *typelib; CUSTDATA cust_data; - int iface = 0, func, var; + int iface = 0, func, var, cust; HREFTYPE hRefType = 0; VARIANT v; HRESULT hr; @@ -6016,13 +6217,11 @@ static void test_dump_typelib(const WCHAR *name) /* compare type uuid */ if (ti->uuid && *ti->uuid) { - WCHAR guidW[39]; ITypeInfo *typeinfo2; HRESULT hr; GUID guid;
- MultiByteToWideChar(CP_ACP, 0, ti->uuid, -1, guidW, ARRAY_SIZE(guidW)); - IIDFromString(guidW, &guid); + parse_guid(ti->uuid,&guid); expect_guid(&guid, &typeattr->guid);
/* check that it's possible to search using this uuid */ @@ -6032,9 +6231,26 @@ static void test_dump_typelib(const WCHAR *name) if (hr == S_OK) ITypeInfo_Release(typeinfo2); }
+ ole_check(ITypeInfo_GetTypeAttr(typeinfo, &typeattr)); + hr = ITypeInfo_QueryInterface(typeinfo, &IID_ITypeInfo2, (void**)&typeinfo2); ok(hr == S_OK, "Could not get ITypeInfo2: %08x\n", hr);
+ memset(&cust_data, 0, sizeof(cust_data)); + ole_check(ITypeInfo2_GetAllCustData(typeinfo2,&cust_data)); + expect_int(cust_data.cCustData, ti->cCustData); + ClearCustData(&cust_data); + for (cust = 0; cust < ti->cCustData; cust++) + { + GUID guid; + parse_guid(ti->custdata[cust].uuid,&guid); + /* check that it's possible to search using this uuid */ + hr = ITypeInfo2_GetCustData(typeinfo2,&guid,&v); + ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + check_variant_info(&v,&ti->custdata[cust].value); + VariantClear(&v); + } + for (func = 0; func < typeattr->cFuncs; func++) { const function_info *fn_info = &ti->funcs[func]; @@ -6054,6 +6270,22 @@ static void test_dump_typelib(const WCHAR *name) expect_int(desc->oVft, fn_info->vtbl_index * sizeof(void*)); expect_int(desc->cScodes, fn_info->cScodes); expect_int(desc->wFuncFlags, fn_info->wFuncFlags); + + memset(&cust_data, 0, sizeof(cust_data)); + ole_check(ITypeInfo2_GetAllFuncCustData(typeinfo2,func,&cust_data)); + expect_int(cust_data.cCustData, fn_info->cCustData); + ClearCustData(&cust_data); + for (cust = 0; cust < fn_info->cCustData; cust++) + { + GUID guid; + parse_guid(fn_info->custdata[cust].uuid,&guid); + /* check that it's possible to search using this uuid */ + hr = ITypeInfo2_GetFuncCustData(typeinfo2,func,&guid,&v); + ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + check_variant_info(&v,&fn_info->custdata[cust].value); + VariantClear(&v); + } + ole_check(ITypeInfo_GetNames(typeinfo, desc->memid, namesTab, 256, &cNames)); for (i = 0; i < cNames; i++) { @@ -6067,6 +6299,21 @@ static void test_dump_typelib(const WCHAR *name) { check_type(&desc->lprgelemdescParam[i], &fn_info->params[i]);
+ memset(&cust_data, 0, sizeof(cust_data)); + ole_check(ITypeInfo2_GetAllParamCustData(typeinfo2,func,i,&cust_data)); + expect_int(cust_data.cCustData, fn_info->params[i].cCustData); + ClearCustData(&cust_data); + for (cust = 0; cust < fn_info->params[i].cCustData; cust++) + { + GUID guid; + parse_guid(fn_info->params[i].custdata[cust].uuid,&guid); + /* check that it's possible to search using this uuid */ + hr = ITypeInfo2_GetParamCustData(typeinfo2,func,i,&guid,&v); + ok(hr == S_OK, "GetParamCustDatafailed: %08x\n", hr); + check_variant_info(&v,&fn_info->params[i].custdata[cust].value); + VariantClear(&v); + } + if (desc->lprgelemdescParam[i].tdesc.vt == VT_USERDEFINED) { ITypeInfo *param; @@ -6096,9 +6343,7 @@ static void test_dump_typelib(const WCHAR *name) VariantClear(&v);
memset(&cust_data, 0, sizeof(cust_data)); - hr = ITypeInfo2_GetAllCustData(typeinfo2, &cust_data); ITypeInfo_ReleaseFuncDesc(typeinfo, desc); - ClearCustData(&cust_data); }
for (var = 0; var < typeattr->cVars; var++) @@ -6132,6 +6377,20 @@ static void test_dump_typelib(const WCHAR *name) } else { expect_null(desc->DUMMYUNIONNAME.lpvarValue); } + memset(&cust_data, 0, sizeof(cust_data)); + ole_check(ITypeInfo2_GetAllVarCustData(typeinfo2,var,&cust_data)); + expect_int(cust_data.cCustData, var_info->cCustData); + ClearCustData(&cust_data); + for (cust = 0; cust < var_info->cCustData; cust++) + { + GUID guid; + parse_guid(var_info->custdata[cust].uuid,&guid); + /* check that it's possible to search using this uuid */ + hr = ITypeInfo2_GetVarCustData(typeinfo2,var,&guid,&v); + ok(hr == S_OK, "GetVarCustData failed: %08x\n", hr); + check_variant_info(&v,&var_info->custdata[cust].value); + VariantClear(&v); + }
check_type(&desc->elemdescVar, &var_info->elemdescVar);
VariantCopy clears existing contents of pvargDest and thus requires it contain a valid (possibly-empty) VARIANT, not uninitialized garbage.
If a failure still occurs, propgate the HRESULT to GetAll*CustData.
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- dlls/oleaut32/typelib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 989340de9c2..d04e4d2cbe2 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5288,6 +5288,7 @@ static HRESULT TLB_copy_all_custdata(const struct list *custdata_list, CUSTDATA TLBCustData *pCData; unsigned int ct; CUSTDATAITEM *cdi; + HRESULT hr = S_OK;
ct = list_count(custdata_list);
@@ -5300,11 +5301,13 @@ static HRESULT TLB_copy_all_custdata(const struct list *custdata_list, CUSTDATA cdi = pCustData->prgCustData; LIST_FOR_EACH_ENTRY(pCData, custdata_list, TLBCustData, entry){ cdi->guid = *TLB_get_guid_null(pCData->guid); - VariantCopy(&cdi->varValue, &pCData->data); + VariantInit(&cdi->varValue); + hr = VariantCopy(&cdi->varValue, &pCData->data); + if(FAILED(hr)) break; ++cdi; }
- return S_OK; + return hr; }
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- dlls/oleaut32/tests/test_tlb.idl | 52 ++++++++++- dlls/oleaut32/tests/typelib.c | 148 +++++++++++++++++++++++++++++++ dlls/oleaut32/typelib.c | 3 + 3 files changed, 202 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/tests/test_tlb.idl b/dlls/oleaut32/tests/test_tlb.idl index b8fecc9a019..e8e16ce0082 100644 --- a/dlls/oleaut32/tests/test_tlb.idl +++ b/dlls/oleaut32/tests/test_tlb.idl @@ -26,7 +26,17 @@ import "oaidl.idl"; /* needed by widl */
midl_pragma warning ( disable : 2368 )
-[uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784)] +#define CUSTDATA_BSTR c8768723-e6d2-4442-b039-92e9c82429c4 + +#define CUSTDATA_STRLIT c8768723-e6d2-4442-b039-92e9c82429c4 +#define CUSTDATA_NUM b481b478-a181-4eb6-b6e0-df63069e8c80 +#define CUSTDATA_HEXNUM a09d7c06-cf38-4db3-9450-10641651c35b + +[uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784), +custom(CUSTDATA_STRLIT,"ITypeLib2::GetCustData"), +custom(CUSTDATA_NUM,42), +custom(CUSTDATA_HEXNUM,0x1337C0D3), +] library Test { importlib("stdole2.tlb"); @@ -170,4 +180,44 @@ library Test { interface ITestDispDual; } + + [uuid(786ee4ff-c5dd-4bf4-9578-0d22fb5369cc),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData interface")] + interface custdata_interface : IDispatch + { + [custom(CUSTDATA_STRLIT,"ITypeInfo2::GetFuncCustData custdata_interface::test_method")] + HRESULT test_method([in,custom(CUSTDATA_STRLIT,"ITypeInfo2::GetParamCustData custdata_interface::test_method(x)")] int x); + } + + [uuid(6ca99f5e-c86a-42ad-a5ee-5bd4c8e5553c),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData enum")] + enum custdata_enum { + [custom(CUSTDATA_STRLIT,"ITypeInfo2::GetVarCustData enum")] + One, + Two + }; + + [uuid(62fabe17-f733-4b09-b859-3f455dcda450),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData struct")] + struct custdata_struct { + [custom(CUSTDATA_STRLIT,"ITypeInfo2::GetVarCustData struct")] + int test_field; + }; + + [/* uuid(...) not allowed on union */ custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData union")] + union custdata_union { + [custom(CUSTDATA_STRLIT,"ITypeInfo2::GetVarCustData union")] + int test_field; + }; + + [public,uuid(d58744d6-63f9-467c-87e5-c95158098b18),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData typedef")] + typedef custdata_interface * custdata_typedef; + + [uuid(bffc216e-2159-465a-80df-b85fd4f4f122),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetCustData dispinterface")] + dispinterface custdata_dispatch + { +properties: + [id(0),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetVarCustData dispinterface property")] + int test_property; +methods: + [id(1),custom(CUSTDATA_STRLIT,"ITypeInfo2::GetFuncCustData dispinterface method")] + void test_method([in,custom(CUSTDATA_STRLIT,"ITypeInfo2::GetParamCustData test_dispatch::test_method(x)")] int x); + } } diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 3c7a3bd147d..ff709ddef62 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -6130,6 +6130,154 @@ static const type_info info[] = { }, }, { /* vars */ }, +}, +{ + "custdata_interface", + "{786ee4ff-c5dd-4bf4-9578-0d22fb5369cc}", + /*kind*/ TKIND_INTERFACE, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(custdata_interface*), /*size*/ sizeof(custdata_interface*), + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 8, /*#func*/ 1, /*#var*/ 0, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData interface" } } }, + }, + { /* funcs */ + { + /*id*/ 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, + /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0, + {VT_HRESULT, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetFuncCustData custdata_interface::test_method" } } }, + }, + { /* params */ + {VT_INT, -1, PARAMFLAG_FIN, /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetParamCustData custdata_interface::test_method(x)" } } }, + } }, + {-1, 0, 0} + }, + { /* names */ + "test_method", + "x", + NULL, + }, + }, + }, + { /* vars */ }, +}, +{ + "custdata_enum", + "{6ca99f5e-c86a-42ad-a5ee-5bd4c8e5553c}", + /*kind*/ TKIND_ENUM, /*flags*/ 0, /*align*/ 4, /*size*/ 4, + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 2, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData enum" } } }, + }, + { /* funcs */ }, + { /* vars */ + { + /*id*/ 0x40000000, /*name*/ "One", /*flags*/ 0, /*kind*/ VAR_CONST, + { .varValue = { VT_I4, { .value_int = 0 } } }, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetVarCustData enum" } } }, + }, + {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + }, + { + /*id*/ 0x40000001, /*name*/ "Two", /*flags*/ 0, /*kind*/ VAR_CONST, + { .varValue = { VT_I4, { .value_int = 1 } } }, + /*#custdata*/ 0, {}, + {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + }, + }, +}, +{ + "custdata_struct", + "{62fabe17-f733-4b09-b859-3f455dcda450}", + /*kind*/ TKIND_RECORD, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(struct custdata_struct), /*size*/ sizeof(struct custdata_struct), + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData struct" } } }, + }, + { /* funcs */ }, + { /* vars */ + { + /*id*/ 0x40000000, /*name*/ "test_field", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, + { .oInst = 0 }, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetVarCustData struct" } } }, + }, + {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + }, + }, +}, +{ + "custdata_union", + "{00000000-0000-0000-0000-000000000000}", + /*kind*/ TKIND_UNION, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(union custdata_union), /*size*/ sizeof(union custdata_union), + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 1, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData union" } } }, + }, + { /* funcs */ }, + { /* vars */ + { + /*id*/ 0x40000000, /*name*/ "test_field", /*flags*/ 0, /*kind*/ VAR_PERINSTANCE, + { .oInst = 0 }, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetVarCustData union" } } }, + }, + {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + }, + }, +}, +{ + "custdata_typedef", + "{d58744d6-63f9-467c-87e5-c95158098b18}", + /*kind*/ TKIND_ALIAS, /*flags*/ 0, /*align*/ TYPE_ALIGNMENT(custdata_typedef), /*size*/ sizeof(custdata_typedef), + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 0, /*#func*/ 0, /*#var*/ 0, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData typedef" } } }, + }, + { /* funcs */ }, + { /* vars */ }, +}, +{ + "custdata_dispatch", + "{bffc216e-2159-465a-80df-b85fd4f4f122}", + /*kind*/ TKIND_DISPATCH, /*flags*/ TYPEFLAG_FDISPATCHABLE, /*align*/ TYPE_ALIGNMENT(custdata_dispatch*), /*size*/ sizeof(custdata_dispatch*), + /*helpctx*/ 0x0000, /*version*/ 0x00000000, /*#vtbl*/ 7, /*#func*/ 1, /*#var*/ 1, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetCustData dispinterface" } } }, + }, + { /* funcs */ + { + /*id*/ 0x1, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ CC_STDCALL, + /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0, + {VT_VOID, -1, PARAMFLAG_NONE}, /* ret */ + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetFuncCustData dispinterface method" } } }, + }, + { /* params */ + {VT_INT, -1, PARAMFLAG_FIN, /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetParamCustData test_dispatch::test_method(x)" } } }, + } }, + {-1, 0, 0} + }, + { /* names */ + "test_method", + "x", + NULL, + }, + }, + }, + { /* vars */ + { + /*id*/ 0x0, /*name*/ "test_property", /*flags*/ 0, /*kind*/ VAR_DISPATCH, + { /* DUMMYUNIONNAME unused*/ }, + /*#custdata*/ 1, { + { "{c8768723-e6d2-4442-b039-92e9c82429c4}", { VT_BSTR, { .value_str = "ITypeInfo2::GetVarCustData dispinterface property" } } }, + }, + {VT_INT, -1, PARAMFLAG_NONE}, /* ret */ + }, + }, } };
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index d04e4d2cbe2..bef4f93748b 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2599,6 +2599,9 @@ static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs, if(reclength > FIELD_OFFSET(MSFT_VarRecord, HelpString)) ptvd->HelpString = MSFT_ReadString(pcx, pVarRec->HelpString);
+ if (reclength > FIELD_OFFSET(MSFT_VarRecord, oCustData)) + MSFT_CustData(pcx, pVarRec->oCustData, &ptvd->custdata_list); + if(reclength > FIELD_OFFSET(MSFT_VarRecord, HelpStringContext)) ptvd->HelpStringContext = pVarRec->HelpStringContext;