twain / twain-cs

A C# interface for TWAIN
165 stars 66 forks source link

TWAIN.cs Incorrectly Logs REGISTER_CALLBACK #33

Open mattzirkle opened 5 years ago

mattzirkle commented 5 years ago

If you look in the method TWAIN::DatIdentity, you will find that if you are using callbacks that the logging uses the same message passed in instead of using MSG.REGISTER_CALLBACK. Here is the offending line of code: Log.LogSendBefore(a_dg.ToString(), DAT.CALLBACK.ToString(), a_msg.ToString(), CallbackToCsv(twcallback));

Just need to replace a_msg.ToString() with MSG.REGISTER_CALLBACK.ToString(). Pretty trivial, but it makes me look twice when looking at the log file.

mattzirkle commented 5 years ago

Also just noticed that the logging of the response doesn't use AutoDatStatus, meaning in the case of a failure that you can't get to the TWCC value.