mirror of
https://github.com/soukoku/ntwain.git
synced 2025-04-05 10:50:24 +08:00
Make scanjet special casing.
This commit is contained in:
parent
710770f4cb
commit
b432ff3126
@ -277,11 +277,21 @@ namespace NTwain
|
||||
// In any event the trick to get this thing working is to return from the callback first
|
||||
// before trying to process the msg or there will be unpredictable errors.
|
||||
|
||||
// changed to sync invoke instead of begininvoke for hp scanjet, not sure if will break other scanners :(
|
||||
_msgLoopHook?.Invoke(() =>
|
||||
// changed to sync invoke instead of begininvoke for hp scanjet.
|
||||
if (origin.ProductName.IndexOf("scanjet", StringComparison.OrdinalIgnoreCase) > -1)
|
||||
{
|
||||
HandleSourceMsg(msg);
|
||||
});
|
||||
_msgLoopHook?.Invoke(() =>
|
||||
{
|
||||
HandleSourceMsg(msg);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
_msgLoopHook?.BeginInvoke(() =>
|
||||
{
|
||||
HandleSourceMsg(msg);
|
||||
});
|
||||
}
|
||||
return ReturnCode.Success;
|
||||
}
|
||||
return ReturnCode.Failure;
|
||||
|
Loading…
Reference in New Issue
Block a user