Jon,
This is old, but I think this should be using mdlParams_setActive and mdlParams_getActive
Not mdlParams_setLock and mdlParams_getLock like it says in the link to your website
[DllImport("stdmdlbltin.dll", EntryPoint = "mdlParams_setActive", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] public static extern int mdlParams_setActive(ref int newValue, int paramname); [DllImport("stdmdlbltin.dll", EntryPoint = "mdlParams_getActive", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] public static extern int mdlParams_getActive(ref int activeValue, int paramname);