Hi, there,
The program I wrote calls a Sub in a DLL
that is compiled with PB/DLL v.5.
A user is required to fill in the sub with
all the code he wants, mainly lots of
math calculation. Since the users are not
programmer oriented, they ask to use Undeclared
variables in the sub, which means they are
default as Local-type
Now, for one user, the code in the sub has more
than 5000 lines, around 1000 local double-type
variables. It compiled OK with the "DLL does not
require stack allocation" shown on the compile
window.
However, a call to this sub from the VB5 program
causes "Error 28, stack overflow" every time.
So, what are the limits of:
1. number of local variables within a sub/function?
2. number of lines of code within a sub/function?
Any suggestion of working around the "stack overflow"?
Tianyi Zhai
------------------
The program I wrote calls a Sub in a DLL
that is compiled with PB/DLL v.5.
A user is required to fill in the sub with
all the code he wants, mainly lots of
math calculation. Since the users are not
programmer oriented, they ask to use Undeclared
variables in the sub, which means they are
default as Local-type
Now, for one user, the code in the sub has more
than 5000 lines, around 1000 local double-type
variables. It compiled OK with the "DLL does not
require stack allocation" shown on the compile
window.
However, a call to this sub from the VB5 program
causes "Error 28, stack overflow" every time.
So, what are the limits of:
1. number of local variables within a sub/function?
2. number of lines of code within a sub/function?
Any suggestion of working around the "stack overflow"?
Tianyi Zhai
------------------
Comment