[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another DLL question



PureBytes Links

Trading Reference Links


I am the guy that posted BASIC 16 bit DLL source code the other day.  Well, I 
have been trying to make the forward - backward zero lag MA that I described 
work.  The DLL runs two passes, once to construct the EMA arrays and to 
calculate the composite.  Then the 2nd or more passes to plot the MA.

Problem is that EL seems to reload (de-allocate) the DLL on each pass so DLL 
arrays and flags written to on the 1st pass are empty at start of the 2nd 
pass.  

1)  Is the DLL and its GLOBAL variables being de-allocated and then 
re-allocated again on each pass of the same EL program?

2)  When EL re-runs after changing an INPUT or turning STATUS OFF then ON, 
does EL re-initialize all VARS: (like set VAR1(5), to 5), and does EL re-run 
the DefineDLLFunc: and does that make a new DLL connection?

3)  Is there any EL variable that I can write to on one pass but will hold 
that value for additional passes of the same program?  What does EL do during 
an optimization?  It can't re-initialize everything between optimization 
passes, or can it?

If DefineDLLFunc: running more than once is re-allocating the DLL and its 
memory, than if there is a protected EL memory location, I could use it as a 
switch to conditionally run DefineDLLFunc: only on the first pass.  Any 
solution to this problem?

Thanks, Barry