I have a My-CVI.DLL and My-Prog.exe files. The DLL exports a function that inputs a pointer to an array of UNSIGNED CHAR. The EXE passes an array of size [102400] and the program exits out with a "Stack Overflow" error.
- I increased the projects' (My-DLL.prj and My-EXE.prj) stack size in both EXE and DLL (def=250000, into=2500000), but it still had the same problem
- when I reduced the size to [10240], it worked, but this size is too small
What is causing that?
int foo( unsigned char *arr ); // exported in DLL
static unsigned char buf[102400];
main() {
static unsigned char buf2[102400];
foo(buf); // causes "Stack Overflow" error
foo(buf2); // this too
}