From 77895b701b9b4f0f85c8effe3632a384114a7af4 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Sun, 2 Jul 2006 19:44:39 +0200 Subject: [PATCH] oleview: Added next field to TypeLib viewer treeview control. --- programs/oleview/typelib.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index 3eae6ea7437..18759925837 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -94,7 +94,8 @@ int PopulateTree(void) { TVINSERTSTRUCT tvis; ITypeLib *pTypeLib; - ITypeInfo *pTypeInfo; + ITypeInfo *pTypeInfo, *pRefTypeInfo; + HREFTYPE hRefType; TYPEATTR *pTypeAttr; INT count, i; BSTR bstrName; @@ -161,9 +162,24 @@ int PopulateTree(void) TKINDADDTOSTR(TKIND_RECORD); TKINDADDTOSTR(TKIND_MODULE); TKINDADDTOSTR(TKIND_INTERFACE); - TKINDADDTOSTR(TKIND_DISPATCH); TKINDADDTOSTR(TKIND_COCLASS); TKINDADDTOSTR(TKIND_UNION); + case TKIND_DISPATCH: + AddToStrW(wszText, wszTKIND_DISPATCH); + AddToStrW(wszText, bstrName); + if(SUCCEEDED(ITypeInfo_GetRefTypeOfImplType(pTypeInfo, -1, &hRefType))) + { + SendMessage(typelib.hTree, TVM_INSERTITEM, 0, (LPARAM)&tvis); + memset(wszText, 0, sizeof(wszText)); + + ITypeInfo_GetRefTypeInfo(pTypeInfo, hRefType, &pRefTypeInfo); + ITypeInfo_GetDocumentation(pRefTypeInfo, MEMBERID_NIL, &bstrName, + NULL, NULL, NULL); + AddToStrW(wszText, wszTKIND_INTERFACE); + AddToStrW(wszText, bstrName); + ITypeInfo_Release(pRefTypeInfo); + } + break; case TKIND_ALIAS: AddToStrW(wszText, wszTKIND_ALIAS); CreateTypeInfo(wszText, pTypeAttr->tdescAlias, pTypeInfo); -- 2.11.4.GIT