diff --git a/reactos/tools/widl/proxy.c b/reactos/tools/widl/proxy.c index 217c64bf3cd..07384e536f2 100644 --- a/reactos/tools/widl/proxy.c +++ b/reactos/tools/widl/proxy.c @@ -461,41 +461,45 @@ static void gen_stub(type_t *iface, const func_t *cur, const char *cas, print_proxy("\n"); } -static int write_proxy_methods(type_t *iface) +static int write_proxy_methods(type_t *iface, int skip) { const func_t *cur; int i = 0; - if (iface->ref) i = write_proxy_methods(iface->ref); + if (iface->ref) i = write_proxy_methods(iface->ref, iface->ref->ref != NULL); if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) { var_t *def = cur->def; if (!is_callas(def->attrs)) { if (i) fprintf(proxy, ",\n"); - print_proxy( "%s_", iface->name); + print_proxy( "%s%s_", skip ? "0\t/* " : "", iface->name); write_name(proxy, def); - fprintf(proxy, "_Proxy"); + fprintf(proxy, "_Proxy%s", skip ? " */" : ""); i++; } } return i; } -static int write_stub_methods(type_t *iface) +static int write_stub_methods(type_t *iface, int skip) { const func_t *cur; int i = 0; - if (iface->ref) i = write_stub_methods(iface->ref); + if (iface->ref) i = write_stub_methods(iface->ref, TRUE); else return i; /* skip IUnknown */ if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) { var_t *def = cur->def; if (!is_local(def->attrs)) { - if (i) fprintf(proxy,",\n"); - print_proxy( "%s_", iface->name); - write_name(proxy, def); - fprintf(proxy, "_Stub"); - i++; + if (skip) + print_proxy("STUB_FORWARDING_FUNCTION,\n"); + else { + if (i) fprintf(proxy,",\n"); + print_proxy( "%s_", iface->name); + write_name(proxy, def); + fprintf(proxy, "_Stub"); + i++; + } } } return i; @@ -549,7 +553,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "},\n"); print_proxy( "{\n"); indent++; - write_proxy_methods(iface); + write_proxy_methods(iface, FALSE); fprintf(proxy, "\n"); indent--; print_proxy( "}\n"); @@ -561,7 +565,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); print_proxy( "{\n"); indent++; - stubs = write_stub_methods(iface); + stubs = write_stub_methods(iface, FALSE); fprintf(proxy, "\n"); indent--; fprintf(proxy, "};\n");