What makes you say the code is "ignored". The Twain code is compiled in both 32 and 64bit modes.
More likely you are seeing an absence of Twain drivers. Many manufactures do not bother including 64bit Twain drivers (usually they only include WIA drivers).
If you need to test 64bit Twain support, you can use the FreeImage Software scanner driver:
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.