using NTwain.Data; using NTwain.Internals; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NTwain.Triplets { /// /// Provides direct access to the triplet call. /// public class DGCustom { ITwainSessionInternal _session; internal DGCustom(ITwainSessionInternal session) { if (session == null) { throw new ArgumentNullException("session"); } _session = session; } /// /// Direct DSM_Entry call with full arguments for custom values. /// /// The group. /// The dat. /// The message. /// The data. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "3#"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "dat"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dsm")] public ReturnCode DsmEntry( DataGroups group, DataArgumentType dat, Message message, ref IntPtr data) { _session.VerifyState(3, 7, group, dat, message); return Dsm.DsmEntry(_session.AppId, _session.CurrentSource.Identity, group, dat, message, ref data); } // todo: add other data value types? } }