- This topic has 1 reply, 2 voices, and was last updated 12 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
The TWAIN Resource site is designed to help TWAIN users and prospective users find resources in the community for TWAIN-related products and services. Become a member.
Home › Forums › TWAIN Classic › World Teachers Federation?
if ((ret & TwainReturnCode.TWRC_FAILURE) == TwainReturnCode.TWRC_FAILURE)
return null;
😯 Why would somebody write that?
Since TWRC_FAILURE=1, this appears to be treating any odd-numbered return code as an error, and even-numbered code as success! Never seen anything like it, don’t see how it fits the spec.
But I’m looking at a big bunch of TWAIN code and this construction occurs literally 101 times.
I’m very confused…
The only reason I can see anyone writing that is if they thought that an error was defined as a bit, but that’s not the case so I agree with you that it looks pretty suspicious.