DTWAIN_SelectDefaultSourceWithOpen
The DTWAIN_SelectDefaultSourceWithOpen function selects the default TWAIN Source and optionally opens the Source when selected.
DTWAIN_SOURCE DTWAIN_SelectDefaultSourceWithOpen(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_SelectDefaultSourceWithOpen works the same way as DTWAIN_SelectDefaultSource, with the difference being that DTWAIN_SelectDefaultSourceWithOpen() 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_SelectDefaultSourceWithOpen() 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
|