MultiCharts Version 9.0 Release (Build 11213)
I have following code which kept me busy the hole day while I was trying to get it working in Multicharts (32bit). It's not working in the 32bit version with output of the plots1 & 2 as -1. Here is the code :
Code: Select all
DefineDLLFunc: "GlobalVariable.dll", int, "GV_SetDouble", int, double ;
DefineDLLFunc: "GlobalVariable.dll", int, "GV_SetString", int, lpstr ;
inputs: SymNum(1000),
StrValue("Test @"),
Level( 9777.0 ) ;
variables:
SetRtnVal( -1 ),
SetStrVal( -1 ),
locElement1( "" ),
ID1(0),
locElement2( "" ),
ID2(0);
locElement1 = numtostr(symnum,0)+"1";
ID1 = strtonum(locElement1);
locElement2 = numtostr(symnum,0)+"2";
ID2 = strtonum(locElement2);
SetRtnVal = GV_SetDouble(ID1 , Level ) ;
SetStrVal = GV_SetString(ID2 , StrValue ) ;
Plot1( SetRtnVal, "Double" ) ;
Plot2( SetStrVal, "String" );
Print ( "Receiver : ", " Output >> elementlocation is : ", locElement1, " : " , "ID is : ", ID1, " PlotValue is : " , SetRtnVal);
Print ( "Receiver : ", " Output >> elementlocation is : ", locElement2, " : " , "ID is : ", ID2, " PlotValue is : " , SetStrVal)
Someone has an idea ? I just gave up right now as I do not have an explanation or any idea why the x32bit version of MC gives me a wrong output while the 64bit version just working fine.
Regards.
Ben