Cross-Platform Scanning Library
I know I'm late by 8 years, but at last, I can give you a library that seems to match your requirements: Libinsane :-). It supports Sane, WIA2 and TWAIN. You will need MSYS2 to build it on Windows.
I wrote it for a personal project of mine: Paperwork
Unfortunatly, TWAIN is a severely limited standard. Most manufacturers implement only enough TWAIN functionality to run their own GUI. Trying to use lower level TWAIN functionality and your own GUI is not a practical solution unless you are really targeting a particular scanner.