Update to TWAIN functions

This update fixes a bug where leaving a TWAIN capture dialog open for an
extended period of time would cause 4D client to drop the connection to
the server.