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

DLL Kit Question



PureBytes Links

Trading Reference Links

Below are the relevant portions of a EL function code and the C code
 for a Dll I am writing.

The question have is whether you can set the values of an array in EL from the
DLL.  I prepared the code below on that assumption but am not sure.

Secondly, Do the declarations in the C code match those of in the
DefineDllFunc
statement in the EL code.

Please CC me as I am on digest.

Charles Kaucher

<<<<<<In  EL function>>>>>>>>>>>>
var: Astart(0), Asize(0), Freturn(0),  xd(0), np(0), Nerror(0), x(0);
xld = ld;


DefineDllFunc: "D:\omega\custom\tsx.dll", INT, "TsSAVGOL", 
        LPLONG, WORD ,WORD,  INT, INT, INT,  INT ;

array: cf[110] (0);

If barnumber = 1 then begin

        Astart  =  ArrayStartAddr(cf);
        Asize   =  ArraySize(cf);
        np = 100;
.
.
.
.
 
if Nerror = 0 then
        Freturn = tsx( &cf[0] , Astart , Asize , xl , xr , xd , x);
end;


<<<<<<<<<<in the DLL>>>>>>>>>>

int FAR PASCAL _export Tsx( float *TsArray, WORD ArrayStartAddr, WORD
ArraySize, const int xl, const int xr, int xd, const int m)
{

float *lpNewAddr;

..
.
.
.


for( i = 0; i < xr; ++i ){
        lpNewAddr = FindAddress_Array(TsArray , i , 0 ,  ArraySize ,
ArrayStartAddr);
        *lpNewAddr = c[ np - xr+1 + i ];
}


 Charles Kaucher

Don't sweat petty things. Don't pet sweatty things.
   - Anonymous