Why passing an array from C to System Verilog via DPI-C doesn't work?

In reply to mlsxdx:

Your DPI statements do not match the corresponding C prototypes.

 import "DPI-C" context function void slave_write(input int addr, input int data, output int buffer[2]);
void write(const int* buff);

Questa has option to generate a header file based on your DPI statements that you can include in your C code to make sure the prototypes match.