In reply to RB87:
When you use more complex datatypes, such as an unbounded array, you need to use specific DPI datatypes. In this case, you will need to use svOpenArrayHandle.
As I mentioned, tools will typically generate the C function prototype required to handle these functions. In this case, to match your DPI import, you will get:
void my_function(const svOpenArrayHandle arr);