Moved triplet success logic back to twainsession to reduce dependencies and identity copying in windows.

This commit is contained in:
Eugene Wang
2023-04-02 13:41:16 -04:00
parent 9ddbe70ec7
commit 306a67f7a2
21 changed files with 278 additions and 353 deletions

View File

@@ -18,13 +18,13 @@ namespace SampleConsole
twain.StateChanged += Twain_StateChanged;
var hwnd = IntPtr.Zero; // required for windows
var rc = twain.DGControl.Parent.OpenDSM(ref hwnd);
var rc = twain.OpenDSM(hwnd);
Debug.WriteLine($"OpenDSM={rc}");
if (rc == STS.SUCCESS)
{
Debug.WriteLine($"CloseDSM={rc}");
rc = twain.DGControl.Parent.CloseDSM(ref hwnd);
rc = twain.CloseDSM();
}
}