public static J2534Err PassThruGetLastError(IntPtr errorDescription) { var result = Loader.Lib.PassThruGetLastError(errorDescription); Log.WriteLine(" error: " + errorDescription.AsString()); return result; }
public static J2534Err PassThruReadVersion( int deviceId, IntPtr firmwareVersion, IntPtr dllVersion, IntPtr apiVersion) { Log.WriteTimestamp("", "PTReadVersion({0}, 0x{1}, 0x{2}, 0x{3})", deviceId, firmwareVersion.ToString("X8"), dllVersion.ToString("X8"), apiVersion.ToString("X8")); var result = Loader.Lib.PassThruReadVersion(deviceId, firmwareVersion, dllVersion, apiVersion); Log.WriteLine(" Firmware: " + firmwareVersion.AsString()); Log.WriteLine(" DLL: " + dllVersion.AsString()); Log.WriteLine(" API: " + apiVersion.AsString()); Log.WriteTimestamp(" ", "{0}: {1}", (int)result, result); return result; }
public static J2534Err PassThruOpen(IntPtr name, ref int deviceId) { Log.WriteLine("------------------------------------------"); Log.WriteLine("start log on {0} at {1}", Loader.Device.Name, DateTime.Now); Log.WriteLine("------------------------------------------"); Log.WriteTimestamp("", "PTOpen({0}, {1})", name.ToString("X8"), deviceId); Log.WriteLine(" name: ", name.AsString()); var result = Loader.Lib.PassThruOpen(name, ref deviceId); Log.WriteTimestamp(" ", "{0}: {1}", (int)result, result); return result; }