diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index e22180994d3..bd6b47f3b9b 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -3780,7 +3780,6 @@ todo_wine VariantInit(&ret); hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, NULL); -todo_wine ok(hr == S_OK, "error %#x\n", hr); IWinHttpRequest_Release(request); diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 26600e43471..a39e986ea88 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1836,7 +1836,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ MSFT_TypeInfoBase *typeinfo; MSFT_GuidEntry guidentry; - chat("create_msft_typeinfo: name %s kind %d\n", name, kind); + chat("create_msft_typeinfo: name %s kind %d index %d\n", name, kind, typelib->typelib_header.nrtypeinfos); msft_typeinfo = xmalloc(sizeof(*msft_typeinfo)); memset( msft_typeinfo, 0, sizeof(*msft_typeinfo) ); @@ -2143,20 +2143,31 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration) static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *tdef) { - msft_typeinfo_t *msft_typeinfo; - int alignment; + msft_typeinfo_t *msft_typeinfo = NULL; + int alignment, datatype1, datatype2, size; + type_t *type; if (-1 < tdef->typelib_idx) return; - tdef->typelib_idx = typelib->typelib_header.nrtypeinfos; - msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->attrs); - encode_type(typelib, get_type_vt(type_alias_get_aliasee(tdef)), - type_alias_get_aliasee(tdef), - &msft_typeinfo->typeinfo->datatype1, - &msft_typeinfo->typeinfo->size, - &alignment, &msft_typeinfo->typeinfo->datatype2); - msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6); + type = type_alias_get_aliasee(tdef); + + if (!type->name || strcmp(tdef->name, type->name) != 0) + { + tdef->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->attrs); + } + + encode_type(typelib, get_type_vt(type), type, + &datatype1, &size, &alignment, &datatype2); + + if (msft_typeinfo) + { + msft_typeinfo->typeinfo->datatype1 = datatype1; + msft_typeinfo->typeinfo->size = size; + msft_typeinfo->typeinfo->datatype2 = datatype2; + msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6); + } } static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)