1
0
mirror of https://github.com/soukoku/ntwain.git synced 2025-04-05 20:59:23 +08:00
ntwain/NTwain/Triplets/DGImage/DGImage.ImageNativeXfer.cs

26 lines
1.0 KiB
C#
Raw Normal View History

2014-04-21 04:57:38 +08:00
using NTwain.Data;
using NTwain.Internals;
2014-04-18 07:11:11 +08:00
using System;
2014-04-03 07:01:21 +08:00
namespace NTwain.Triplets
{
sealed class ImageNativeXfer : OpBase
{
2014-04-06 04:48:28 +08:00
internal ImageNativeXfer(ITwainStateInternal session) : base(session) { }
2014-04-03 07:01:21 +08:00
/// <summary>
/// Causes the transfer of an images data from the Source to the application, via the Native transfer
/// mechanism, to begin. The resulting data is stored in main memory in a single block. The data is
/// stored in Picture (PICT) format on the Macintosh and as a device-independent bitmap (DIB)
/// under Microsoft Windows. The size of the image that can be transferred is limited to the size of
/// the memory block that can be allocated by the Source.
/// </summary>
/// <param name="handle">The handle.</param>
/// <returns></returns>
public ReturnCode Get(ref IntPtr handle)
{
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get);
2014-04-16 18:53:05 +08:00
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get, ref handle);
2014-04-03 07:01:21 +08:00
}
}
}