Retrieving / Setting Custom Source Data

Top  Previous  Next

Some Sources allow you to display the UI without acquiring an image.  This allows the user to just make setting changes and then close the UI.  DTWAIN supports this using the call DTWAIN_ShowUIOnly.  To ensure that the Source allows this type of operation, your application should call DTWAIN_IsUIOnlySupported.  The "UI-Only" mode of operation is supported by a few Sources.

 

If the Source does support UI-only mode, it would be advantageous to see what settings were saved by the Source when the user closed the dialog in UI-only mode.  To retrieve the data, call DTWAIN_GetCustomDSData after the user-interface has been closed by the user.  To set the data, call DTWAIN_SetCustomDSData.  These functions allow your application to get and set data directly to the Source.  Note that the format of the data is dependent on the Source, so you must have an idea of the format and meaning of the data that you are setting or retrieving from the Source.  The manufacturer or creator of the Source should have specifications on the format of the Source's data that you retrieve or set when you call these functions.  DTWAIN cannot determine the format of the data for you -- the only thing that DTWAIN does is get / set the data.

 

Sources that are compliant to Twain 1.9 must all support this mode. Usually mid to high-volume scanners support this type of operation.