DTWAIN_SelectSourceWithOpen
The DTWAIN_SelectSourceWithOpen function allows the user to select the TWAIN Source and optionally open the Source when selected.
DTWAIN_SOURCE DTWAIN_SelectSourceWithOpen(DTWAIN_BOOL bOpen);
Parameters bOpen If TRUE, will open the selected source automatically. If FALSE, the Source will be selected, but not openend..
Return Values If successful, the return value is a non-zero DTWAIN_SOURCE handle to the selected Source. Otherwise NULL is returned.
Comments The DTWAIN_SelectSourceWithOpen() displays the TWAIN 'Select Source' dialog box and returns a handle to the Source that is selected by the user. If the user chooses 'Cancel' from the dialog, DTWAIN_SelectSourceWithOpen() returns NULL. The DTWAIN_SelectSourceWithOpen works the same way as DTWAIN_SelectSource, with the difference being that DTWAIN_SelectSourceWithOpen() allows the application to control whether the selected source should be opened. Opening a Source is a separate step from selecting the source, and opening a Source may take time with various TWAIN drivers. Thus an application can skip the step of opening a Source if this is not desired. If bOpen is FALSE, the application must explicitly call DTWAIN_OpenSource() to open the Source for capability negotiation and actual image acquisition. Note that DTWAIN_SelectSourceWithOpen() will override the settings that are made by DTWAIN_OpenSourcesOnSelect().
TWAIN State Transitions Remains in State 3.
Prerequisite Calls
Optional Prerequisite Calls None.
See Also
|