Home › Forums › TWAIN Classic › Set X / YResolution returned TWRC_CHECKSTATUS! Fujitsu C# › Reply To: Set X / YResolution returned TWRC_CHECKSTATUS! Fujitsu C#
openTwain its not complete in the sense that there are more to do – seems like there always is. Buffered memory transfers aren’t in there and I like to finish fleshing out the standard caps so that they take the appropriate params and types and expose the ops supported appropriately. In the current build you have to build up each of the caps the same way you do with netmaster code and I don’t think that is a particuarly useful design. The parts that are there work and are stable. the parts that don’t work should all be commented as ‘not live’ and you’ll find the classes there empty.
Do I suggest you look at it… it may help. it is based on netmasters code. I added the rest of the enumerations, cc checking, a custom message loop so that you don’t have to modify your message loop in you app – just handle the events from the library, added tracking for the twState and fixed a problem he had with his transitions. added ImageInfo and ExtImageInfo checking…
look at the constructors for twCapability it should look something more like opentwain in that the size of memory reserved should depend on the cap coming in , if I remember right he hard coded a number that should be looked up. [EDITED: the value he hardcoded was the size of memory to allocate for the container – the method I use to determine the size is named ‘m_itemSizeOf’ – you’ll find it in DataStructures.vb, in the twCapability classs, his method will fail for several of the standard caps] I’ll look back over my notes from when I did the first couple reviews to see is there was anything else in his code that I tripped up on.
and don’t get me wrong, his code is brilliant – especially in the sense that there really didn’t exist (m)any alternatives for people that wanted to talk directly to twain from .net without buying a library – but at the same time, as he says in the article it is mostly a demonstration of interop not twain.
if you have questions just ask, I’m fairly familliar with netMasters code.
.