widl: Allow void pointers with iid_is attributes.

Dan Hipschman dsh at linux.ucla.edu
Wed Oct 24 20:05:48 CDT 2007


MIDL allows void pointers as function arguments if they have an iid_is
attribute, in which case it treats them as an interface pointer.  With
this patch, ocidl.idl compiles into a proxy.  This should be useful for
fixing http://bugs.winehq.org/show_bug.cgi?id=4875 .

---
 tools/widl/typegen.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index dd21fe4..9dcffa7 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -2110,7 +2110,9 @@ static size_t write_typeformatstring_var(FILE *file, int indent, const func_t *f
         int out_attr = is_attr(var->attrs, ATTR_OUT);
         const type_t *base = type->ref;
 
-        if (base->type == RPC_FC_IP)
+        if (base->type == RPC_FC_IP
+            || (base->type == 0
+                && is_attr(var->attrs, ATTR_IIDIS)))
         {
             return write_ip_tfs(file, var->attrs, type, typeformat_offset);
         }
@@ -2152,7 +2154,9 @@ static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *ty
     {
         type_t *ref = type->ref;
 
-        if (ref->type == RPC_FC_IP)
+        if (ref->type == RPC_FC_IP
+            || (ref->type == 0
+                && is_attr(attrs, ATTR_IIDIS)))
         {
             write_ip_tfs(file, attrs, type, tfsoff);
         }



More information about the wine-patches mailing list