Hello Marek,
You didn't mention when you get this error. You could try to place breakpoints in your DLL and check if the error is occuring inside your code, or in the prototype.
Also, you need to make sure that in TestStand at the DLL call you correclty specified the prototype. Making sure that you matched the data type and number of arguments.
You may also take a look at the example found at \Examples\AccessingArrays\PassingArrayParametersToDLL
Maybe you can provide some more information about the actual variable you are using, ex.: Locals.MyArray[0]
Regards,
Roberto P.
Applications Engineer
National Instruments
www.ni.com.ask