ntwain/NTwain/Triplets/DGControl/DGControl.PassThru.cs

25 lines
858 B
C#
Raw Normal View History

2014-04-03 07:13:15 +08:00
using NTwain.Data;
2014-04-03 07:01:21 +08:00
using NTwain.Values;
using System;
namespace NTwain.Triplets
{
2014-04-05 10:19:16 +08:00
/// <summary>
/// Represents <see cref="DataArgumentType.PassThru"/>.
/// </summary>
2014-04-03 07:01:21 +08:00
public sealed class PassThru : OpBase
{
2014-04-06 04:48:28 +08:00
internal PassThru(ITwainStateInternal session) : base(session) { }
2014-04-03 07:01:21 +08:00
/// <summary>
/// PASSTHRU is intended for the use of Source writers writing diagnostic applications. It allows
/// raw communication with the currently selected device in the Source.
/// </summary>
/// <param name="sourcePassThru">The source pass thru.</param>
/// <returns></returns>
public ReturnCode PassThrough(TWPassThru sourcePassThru)
{
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PassThru, Message.PassThru);
2014-04-06 06:33:21 +08:00
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.PassThru, sourcePassThru);
2014-04-03 07:01:21 +08:00
}
}
}