if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_BASIC) continue;
if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_ENUM) continue;
}
- print_proxy( "if (%s) MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name, arg->name );
+ print_proxy( "if (%s) MIDL_memset( %s, 0, ", arg->name, arg->name );
+ if (is_array(arg->type) && type_array_has_conformance(arg->type))
+ {
+ write_expr( proxy, type_array_get_conformance(arg->type), 1, 1, NULL, NULL, "" );
+ fprintf( proxy, " * " );
+ }
+ fprintf( proxy, "sizeof( *%s ));\n", arg->name );
}
}
break;
case TGT_STRUCT:
- if (get_struct_fc(type) != RPC_FC_STRUCT)
+ if (get_struct_fc(type) != FC_STRUCT)
print_proxy("/* FIXME: %s code for %s struct type 0x%x missing */\n", __FUNCTION__, arg->name, get_struct_fc(type) );
break;
/* proxy vtable */
print_proxy( "static %sCINTERFACE_PROXY_VTABLE(%d) _%sProxyVtbl =\n",
- need_delegation_indirect(iface) ? "" : "const ", count, iface->name);
+ (get_stub_mode() != MODE_Os || need_delegation_indirect(iface)) ? "" : "const ",
+ count, iface->name);
print_proxy( "{\n");
indent++;
print_proxy( "{\n");
print_proxy( "},\n");
print_proxy( "{\n");
indent++;
- print_proxy( "CStdStubBuffer_%s\n", need_delegation_indirect(iface) ? "DELEGATING_METHODS" : "METHODS");
+ print_proxy( "%s_%s\n",
+ iface->details.iface->async_iface == iface ? "CStdAsyncStubBuffer" : "CStdStubBuffer",
+ need_delegation_indirect(iface) ? "DELEGATING_METHODS" : "METHODS");
indent--;
print_proxy( "}\n");
indent--;
{
if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
{
- if (need_proxy(stmt->u.type))
- write_proxy(stmt->u.type, proc_offset);
+ type_t *iface = stmt->u.type;
+ if (need_proxy(iface))
+ {
+ write_proxy(iface, proc_offset);
+ if (iface->details.iface->async_iface)
+ write_proxy(iface->details.iface->async_iface, proc_offset);
+ }
}
}
}
{
*ifaces = xrealloc( *ifaces, (*count + 1) * sizeof(**ifaces) );
(*ifaces)[(*count)++] = iface;
+ if (iface->details.iface->async_iface)
+ {
+ iface = iface->details.iface->async_iface;
+ *ifaces = xrealloc( *ifaces, (*count + 1) * sizeof(**ifaces) );
+ (*ifaces)[(*count)++] = iface;
+ }
}
}
}
unsigned int proc_offset = 0;
char *file_id = proxy_token;
int i, count, have_baseiid = 0;
+ unsigned int table_version;
type_t **interfaces;
const type_t * delegate_to;
write_stubdesc(expr_eval_routines);
print_proxy( "#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32);
- print_proxy( "#error Currently only Wine and WIN32 are supported.\n");
+ print_proxy( "#error Invalid build platform for this proxy.\n");
print_proxy( "#endif\n");
print_proxy( "\n");
write_procformatstring(proxy, stmts, need_proxy);
fprintf(proxy, "}\n");
fprintf(proxy, "\n");
+ table_version = get_stub_mode() == MODE_Oif ? 2 : 1;
+ for (i = 0; i < count; i++)
+ {
+ if (interfaces[i]->details.iface->async_iface != interfaces[i]) continue;
+ if (table_version != 6)
+ {
+ fprintf(proxy, "static const IID *_AsyncInterfaceTable[] =\n");
+ fprintf(proxy, "{\n");
+ table_version = 6;
+ }
+ fprintf(proxy, " &IID_%s,\n", interfaces[i]->name);
+ fprintf(proxy, " (IID*)(LONG_PTR)-1,\n");
+ }
+ if (table_version == 6)
+ {
+ fprintf(proxy, " 0\n");
+ fprintf(proxy, "};\n");
+ fprintf(proxy, "\n");
+ }
+
fprintf(proxy, "const ExtendedProxyFileInfo %s_ProxyFileInfo DECLSPEC_HIDDEN =\n", file_id);
fprintf(proxy, "{\n");
fprintf(proxy, " (const PCInterfaceProxyVtblList*)_%s_ProxyVtblList,\n", file_id);
else fprintf(proxy, " 0,\n");
fprintf(proxy, " _%s_IID_Lookup,\n", file_id);
fprintf(proxy, " %d,\n", count);
- fprintf(proxy, " %d,\n", get_stub_mode() == MODE_Oif ? 2 : 1);
- fprintf(proxy, " 0,\n");
+ fprintf(proxy, " %u,\n", table_version);
+ fprintf(proxy, " %s,\n", table_version == 6 ? "_AsyncInterfaceTable" : "0");
fprintf(proxy, " 0,\n");
fprintf(proxy, " 0,\n");
fprintf(proxy, " 0\n");
init_proxy(stmts);
if(!proxy) return;
- if (do_win32 && do_win64)
- {
- fprintf(proxy, "\n#ifndef _WIN64\n\n");
- pointer_size = 4;
- write_proxy_routines( stmts );
- fprintf(proxy, "\n#else /* _WIN64 */\n\n");
- pointer_size = 8;
- write_proxy_routines( stmts );
- fprintf(proxy, "\n#endif /* _WIN64 */\n");
- }
- else if (do_win32)
- {
- pointer_size = 4;
- write_proxy_routines( stmts );
- }
- else if (do_win64)
- {
- pointer_size = 8;
- write_proxy_routines( stmts );
- }
-
+ write_proxy_routines( stmts );
fclose(proxy);
}