ntwain/NTwain/Triplets/DGControl/DGControl.StatusUtf8.cs
2014-04-20 16:57:38 -04:00

24 lines
732 B
C#

using NTwain.Data;
using NTwain.Internals;
namespace NTwain.Triplets
{
/// <summary>
/// Represents <see cref="DataArgumentType.StatusUtf8"/>.
/// </summary>
public sealed class StatusUtf8 : OpBase
{
internal StatusUtf8(ITwainStateInternal session) : base(session) { }
/// <summary>
/// Translate the contents of a TW_STATUS structure received from a Source into a localized UTF-8
/// encoded string.
/// </summary>
/// <param name="status">The status.</param>
/// <returns></returns>
public ReturnCode Get(TWStatusUtf8 status)
{
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
return Dsm.DsmEntry(Session.AppId, null, Message.Get, status);
}
}
}