widl [1/3]: Use the correct functions for interface pointers in stubs
Dan Hipschman
dsh at linux.ucla.edu
Wed Sep 12 18:08:04 CDT 2007
This patch fixes a problem with generating stubs when interface pointer
arguments are involved. The correct functions to call are
NdrInterfacePointerFoo, but widl will output NdrPointerFoo. I don't
have a "reasonable" test for this yet, but I've tested it with some
incredibly ugly code. Once I get widl to generate a working oaidl_p.c
(this patch is part of that work), I think there's a reasonable test in
oleaut32/tests/tmarshal.c.
For what it's worth, when I drop widl's oaidl_p.c (minus IPropertyBag,
which is unimplemented and has call_as attributes), all the tests
under oleaut32/tests pass except tmarshal.c, which crashes pretty close
to the beginning.
---
tools/widl/typegen.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 7d7c134..89d3d60 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -2610,7 +2610,10 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func,
const var_t *iid;
if ((iid = get_attrp( var->attrs, ATTR_IIDIS )))
print_file( file, indent, "_StubMsg.MaxCount = (unsigned long)%s;\n", iid->name );
- print_phase_function(file, indent, "Pointer", phase, var, start_offset);
+ if (var->type->ref->type == RPC_FC_IP)
+ print_phase_function(file, indent, "InterfacePointer", phase, var, start_offset);
+ else
+ print_phase_function(file, indent, "Pointer", phase, var, start_offset);
}
}
fprintf(file, "\n");
More information about the wine-patches
mailing list