public List <SConfig> GetConfig(List <SConfig> SConfig) { J2534ERR Status; HeapSConfigArray SConfigArray = new HeapSConfigArray(SConfig); lock (Device.Library.API_LOCK) { Status = (J2534ERR)Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.GET_CONFIG, SConfigArray, IntPtr.Zero); if (Status != J2534ERR.STATUS_NOERROR) { throw new J2534Exception(Status, Device.Library.GetLastError()); } return(SConfigArray.ToList()); //Implicit conversion to list ;) } }
public List <SConfig> GetConfig(List <SConfig> SConfig) { J2534Status Status = new J2534Status(); HeapSConfigArray SConfigArray = new HeapSConfigArray(SConfig); lock (Device.Library.API_LOCK) { Status.Code = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.GET_CONFIG, SConfigArray.Ptr, IntPtr.Zero); if (Status.IsNotOK) { Status.Description = Device.Library.GetLastError(); throw new J2534Exception(Status); } } return(SConfigArray.ToList()); }