The second argument isn't a string. It is an integer. Also, you will get a response from the API in the return code. Either that or it will crash from a bad API call. Here is the proper description of the API call:
[DllImport("Mach4Core.dll", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.I4)]
public static extern int mcToolGetData(
[param: MarshalAs(UnmanagedType.I4)] int mInst,
[param: MarshalAs(UnmanagedType.I4)] int Type,
[param: MarshalAs(UnmanagedType.I4)] int toolnum,
[param: MarshalAs(UnmanagedType.R8), In(), Out()] ref double value);
double height = 0.0;
int toolnum = 1;
int debug = mcToolGetData(0, MTOOL_MILL_HEIGHT, toolNum, height);
MTOOL_MILL_HEIGHT is a constant that resolves to 11000.
All of this is in our SDK and this is FAR beyond the scope of this forum. Unfortunately, you need to sign a nondisclosure agreement to gain access to the SDK. Contact Todd Monto at our office to get that started.
Steve