I chose the term "ignored" as in debug mode the above code is skipped/jumped/not processed while pressing F8. And, yes, as I wrote, probably it's due to some driver property. Did the TwainDemo worked well on your side in 64bit?
Meanwhile, I connected the same scanner using WIA which works perfect in 64bit.