The TWAIN Working Group provide C source code for a utility to investigate any TWAIN data source (commonly referred to as a driver).

We've built this code and fixed a number of errors and omissions.
TWACKER enables you to select a data source and check what TWAIN capabilities are really available. Most importantly, you can turn off the data source User Interface (assuming this mode is supported), and acquire images directly.