A mechanism for remoting Twain function calls within a user session to a
client system is disclosed. By hooking Twain function calls made by a
Twain application on the server, the Twain function calls may be remoted
over a virtual connection to a client system. A proxy application
corresponding to the server-based Twain application is created on the
client system. The proxy application communicates with the server and
makes the appropriate function calls to the remainder of the Twain
framework. The use of the proxy application allows multiple applications
and devices to be supported simultaneously. Messages sent over the
virtual connection are filtered prior to transmission thereby limiting
the amount of required communication traffic. A multiplexor and
demultiplexor are utilized in order to efficiently use bandwidth on the
virtual channel. The present invention additionally compresses image data
prior to transmission over the virtual channel.