oleview: The PSDK's ELEMDESC cannot be used with compilers that don't support nameless unions. So define our own structure so the test compiles with both the Wine and the PSDK headers.

Francois Gouget fgouget at free.fr
Wed Oct 18 14:25:52 CDT 2006


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

diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index e91a613..0c33c19 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -424,6 +424,16 @@ int EnumVars(ITypeInfo *pTypeInfo, int c
     return 0;
 }
 
+typedef struct _myELEMDESC
+{
+    TYPEDESC tdesc;
+    union
+    {
+        IDLDESC idldesc;
+        PARAMDESC paramdesc;
+    } u;
+} myELEMDESC;
+
 int EnumFuncs(ITypeInfo *pTypeInfo, int cFuncs, HTREEITEM hParent)
 {
     int i, j, tabSize;
@@ -537,7 +547,7 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int 
             }
             bFirst = TRUE;
 #define ENUM_PARAM_FLAG(x)\
-            if(pFuncDesc->lprgelemdescParam[j].paramdesc.wParamFlags & x)\
+            if(((myELEMDESC*)&(pFuncDesc->lprgelemdescParam[j]))->u.paramdesc.wParamFlags & x) \
             {\
                 if(bFirst) AddToTLDataStrW((TYPELIB_DATA*)(U(tvis).item.lParam),\
                         wszOpenBrackets1);\
-- 
1.4.1.1




More information about the wine-patches mailing list