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.
///
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?
}
}