widl: In 64-bit mode, pass all arguments to NdrClientCall instead of a pointer to the first one.
This commit is contained in:
parent
5bf7622fc3
commit
d9cd0d8cac
|
@ -107,15 +107,25 @@ static void write_function_stub( const type_t *iface, const var_t *func,
|
||||||
fprintf(client, "{\n");
|
fprintf(client, "{\n");
|
||||||
indent++;
|
indent++;
|
||||||
if (has_ret) print_client( "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" );
|
if (has_ret) print_client( "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" );
|
||||||
print_client( "%s%s( &%s_StubDesc, &__MIDL_ProcFormatString.Format[%u], ",
|
print_client( "%s%s( &%s_StubDesc, &__MIDL_ProcFormatString.Format[%u]",
|
||||||
has_ret ? "_RetVal = " : "",
|
has_ret ? "_RetVal = " : "",
|
||||||
stub_mode == MODE_Oif ? "NdrClientCall2" : "NdrClientCall",
|
stub_mode == MODE_Oif ? "NdrClientCall2" : "NdrClientCall",
|
||||||
iface->name, proc_offset );
|
iface->name, proc_offset );
|
||||||
if (args)
|
if (args)
|
||||||
fprintf( client, "(unsigned char *)&%s );\n",
|
{
|
||||||
LIST_ENTRY( list_head(args), const var_t, entry )->name );
|
const var_t *arg;
|
||||||
|
if (pointer_size == 8)
|
||||||
|
{
|
||||||
|
LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry )
|
||||||
|
fprintf( client, ",\n%*s%s", 4 * indent + 16, "", arg->name );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
fprintf( client, "(unsigned char *)0 );\n" );
|
{
|
||||||
|
arg = LIST_ENTRY( list_head(args), const var_t, entry );
|
||||||
|
fprintf( client, ", &%s", arg->name );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf( client, " );\n" );
|
||||||
if (has_ret)
|
if (has_ret)
|
||||||
{
|
{
|
||||||
print_client( "return (" );
|
print_client( "return (" );
|
||||||
|
|
|
@ -280,11 +280,20 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx,
|
||||||
print_proxy( "{\n");
|
print_proxy( "{\n");
|
||||||
indent++;
|
indent++;
|
||||||
if (has_ret) print_proxy( "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" );
|
if (has_ret) print_proxy( "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" );
|
||||||
print_proxy( "%s%s( &Object_StubDesc, &__MIDL_ProcFormatString.Format[%u], ",
|
print_proxy( "%s%s( &Object_StubDesc, &__MIDL_ProcFormatString.Format[%u],",
|
||||||
has_ret ? "_RetVal = " : "",
|
has_ret ? "_RetVal = " : "",
|
||||||
stub_mode == MODE_Oif ? "NdrClientCall2" : "NdrClientCall",
|
stub_mode == MODE_Oif ? "NdrClientCall2" : "NdrClientCall",
|
||||||
proc_offset );
|
proc_offset );
|
||||||
fprintf( proxy, "(unsigned char *)&This );\n" );
|
if (pointer_size == 8)
|
||||||
|
{
|
||||||
|
const var_t *arg;
|
||||||
|
fprintf( proxy, "\n%*sThis", 4 * indent + 16, "" );
|
||||||
|
if (args)
|
||||||
|
LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry )
|
||||||
|
fprintf( proxy, ",\n%*s%s", 4 * indent + 16, "", arg->name );
|
||||||
|
}
|
||||||
|
else fprintf( proxy, " &This" );
|
||||||
|
fprintf( proxy, " );\n" );
|
||||||
if (has_ret)
|
if (has_ret)
|
||||||
{
|
{
|
||||||
print_proxy( "return (" );
|
print_proxy( "return (" );
|
||||||
|
|
Loading…
Reference in New Issue