Piotr Caban : oleview: Added returns as arguments in interfaces with oleautomation flag.

Alexandre Julliard julliard at winehq.org
Thu Apr 10 04:39:26 CDT 2008


Module: wine
Branch: master
Commit: 38994a42f4fc864f927346485eaa4df9d072385a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=38994a42f4fc864f927346485eaa4df9d072385a

Author: Piotr Caban <piotr.caban at gmail.com>
Date:   Wed Apr  9 23:38:13 2008 +0200

oleview: Added returns as arguments in interfaces with oleautomation flag.

---

 programs/oleview/typelib.c |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index 4c58c4e..217ce7d 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -522,16 +522,6 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen
         if(FAILED(ITypeInfo_GetDocumentation(pTypeInfo, pFuncDesc->memid, &bstrName,
                 &bstrHelpString, NULL, NULL))) continue;
 
-        bstrParamNames = HeapAlloc(GetProcessHeap(), 0,
-                sizeof(BSTR*)*(pFuncDesc->cParams+1));
-        if(FAILED(ITypeInfo_GetNames(pTypeInfo, pFuncDesc->memid, bstrParamNames,
-                pFuncDesc->cParams+1, &namesNo)))
-        {
-            HeapFree(GetProcessHeap(), 0, bstrParamNames);
-            continue;
-        }
-        SysFreeString(bstrParamNames[0]);
-
         memset(wszText, 0, sizeof(wszText));
         memset(wszAfter, 0, sizeof(wszAfter));
         tld = InitializeTLData();
@@ -605,12 +595,25 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen
             AddToTLDataStrW(tld, wszNewLine);
         }
 
-        if(pTypeAttr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)
+        if(pTypeAttr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION) {
             AddToTLDataStrW(tld, wszVT_HRESULT);
+            if(strcmpW(wszText, wszVT_VOID)) pFuncDesc->cParams++;
+        }
         else {
             AddToTLDataStrW(tld, wszText);
             AddToTLDataStrW(tld, wszAfter);
         }
+
+        bstrParamNames = HeapAlloc(GetProcessHeap(), 0,
+                sizeof(BSTR*)*(pFuncDesc->cParams+1));
+        if(FAILED(ITypeInfo_GetNames(pTypeInfo, pFuncDesc->memid, bstrParamNames,
+                pFuncDesc->cParams+1, &namesNo)))
+        {
+            HeapFree(GetProcessHeap(), 0, bstrParamNames);
+            continue;
+        }
+        SysFreeString(bstrParamNames[0]);
+
         AddToTLDataStrW(tld, wszSpace);
         if(pFuncDesc->memid >= MIN_FUNC_ID)
         {




More information about the wine-cvs mailing list