From 3ea2ec1555aa22cd42678b6a93acc40db661c674 Mon Sep 17 00:00:00 2001
From: Eugene Wang <8755753+soukoku@users.noreply.github.com>
Date: Tue, 27 Apr 2021 21:49:33 -0400
Subject: [PATCH] Add stop capture method.
---
src/NTwain/TwainSession.cs | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/NTwain/TwainSession.cs b/src/NTwain/TwainSession.cs
index 4df1818..c924ecb 100644
--- a/src/NTwain/TwainSession.cs
+++ b/src/NTwain/TwainSession.cs
@@ -367,6 +367,17 @@ namespace NTwain
return _twain.DatUserinterface(DG.CONTROL, MSG.ENABLEDS, ref ui);
}
+ ///
+ /// Stops the data source's automated feeder
+ /// if is set to true.
+ ///
+ ///
+ public STS StopCapture()
+ {
+ TW_PENDINGXFERS pending = default;
+ return _twain.DatPendingxfers(DG.CONTROL, MSG.STOPFEEDER, ref pending);
+ }
+
///
/// Reads information relating to the last capture run.
/// Only valid on state 4 after a capture.