by Roger Seiler » Fri Mar 07, 2008 9:59 pm
It seems someone else using xHarbour (but not FWH) also had the problem passing arrays to the RMchart.dll functions - the problem I'm wrestling with - and he found a solution. However, I can't seem to get his solution to work in FWH. Can someone show me how?
Here's an exerpt of the discussion from the Rmchart forum...
*------------
I have a problem with RM_ADDBARSERIES .... I can't get the data array in ??? - ChrisG
aData := { 10.0, 20.0, 30.0, 40.0, 50.0 } // define my array of data
nResult := DLLCall( ;
hDll, ; // DLL to call
DC_CALL_STD, ; // calling convention
"RMC_ADDBARSERIES", ; // the function to call
nCtrlId, ;
1, ; //region
aData, ;
5, ; // length of data
0,0,0,0,0,0,0,0,0 )
I have tried it with aData, aData[1]
*------------
(LATER, HIS SOLUTION...)
A clever person on the xHarbour NG has given me some code that allowed me to do this...
typedef struct { DOUBLE nDouble[5] } MyStructure
PROCEDURE MakeData
LOCAL o IS MyStructure
o:nDouble[1] := 1.0
o:nDouble[2] := 2.0
o:nDouble[3] := 3.0
o:nDouble[4] := 4.0
o:nDouble[5] := 5.0
RETURN( o )
#pragma ENDDUMP
I then pass o[1] into the Rmchart function .... and all works 100%.
*------------------------------------------
(Me again...)
I've tried, but haven't quite been able to implement this solution in FWH.
Any suggestions? (Come on Enrico - throw me a life preserver. You're so good at it!)
- Roger