public void SetParamFloat(Out123.Params aParam, double value) { Out123.Errors error = Out123NativeMethods.Param(handle, aParam, IntPtr.Zero, value, IntPtr.Zero); if (error != Out123.Errors.OK) { throw new Out123.ErrorException(error); } }
public void SetParamInt(Out123.Params aParam, long value) { Out123.Errors error = Out123NativeMethods.Param(handle, aParam, new IntPtr(value), 0, IntPtr.Zero); if (error != Out123.Errors.OK) { throw new Out123.ErrorException(error); } }
public void SetParamString(Out123.Params aParam, string value) { IntPtr sValuePtr = IntPtr.Zero; if (sValuePtr != null) { sValuePtr = Marshal.StringToHGlobalAnsi(value); } Out123.Errors result = Out123NativeMethods.Param(handle, aParam, IntPtr.Zero, 0, sValuePtr); if (sValuePtr != IntPtr.Zero) { Marshal.FreeHGlobal(sValuePtr); } }