439
« on: January 13, 2020, 07:08:27 PM »
i use the mctoolgetdata from the lua
but when i try from api cant get any respone
i need the tool hight from the tool table
i use:
[DllImport(@"C:\Mach4Hobby\Mach4IPC.dll", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.I4)]
public static extern int mcToolGetData(
[param: MarshalAs(UnmanagedType.I4)] int mInst,
[param: MarshalAs(UnmanagedType.LPStr)] string path,
[param: MarshalAs(UnmanagedType.I4)] int tollNum,
[param: MarshalAs(UnmanagedType.R8), In(), Out()] ref double ret);
and the function:
double hreg = 0;
int debug = mcToolGetData(0, "mc.MTOOL_MILL_HEIGHT", toolNum , ref hreg);
i also try the type as int and i try all numbers from 0-20 same no any logical return
thanks