mirror of
https://github.com/soukoku/ntwain.git
synced 2025-11-09 02:58:00 +08:00
Fixed creating/opening/closing twainsession multiple times in an app not working.
This commit is contained in:
@@ -9,7 +9,7 @@ using System.Windows.Threading;
|
||||
|
||||
namespace NTwain.Internals
|
||||
{
|
||||
sealed class InternalMessageLoopHook : MessageLoopHook
|
||||
sealed class InternalMessageLoopHook : MessageLoopHook
|
||||
{
|
||||
Dispatcher _dispatcher;
|
||||
WindowsHook _hook;
|
||||
@@ -55,14 +55,14 @@ namespace NTwain.Internals
|
||||
}
|
||||
}
|
||||
|
||||
internal override void BeginInvoke(Action action)
|
||||
public override void BeginInvoke(Action action)
|
||||
{
|
||||
if (_dispatcher == null) { throw new InvalidOperationException(Resources.MsgLoopUnavailble); }
|
||||
|
||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
|
||||
}
|
||||
|
||||
internal override void Invoke(Action action)
|
||||
public override void Invoke(Action action)
|
||||
{
|
||||
if (_dispatcher == null) { throw new InvalidOperationException(Resources.MsgLoopUnavailble); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user