DTWAIN_SelectSourceByName |
Top Previous Next |
The DTWAIN_SelectSourceByName function selects a TWAIN Source by specifying the Source's product name.
DTWAIN_SOURCE DTWAIN_SelectSourceByName ( LPCTSTR szName );
Parameters szName Points to a null-terminated string containing the name of the TWAIN Source.
Return Values If successful, the return value is a non-zero DTWAIN_SOURCE handle to the selected Source. Otherwise NULL is returned if a Source does not have the szName, or if there is an error selecting the Source.
Character specific version
Comments The DTWAIN_SelectSourceByName function selects the TWAIN source that has the same product name as szName. The product name is the same name that you will see in the TWAIN Select Source dialog's list box.
This function is useful if you know the name of the Source to open, and do not wish to display the TWAIN Select Source dialog. One way to initially get any Source's product name is to call DTWAIN_EnumSources. For each Source that is found with DTWAIN_EnumSources you can retrieve the product name by calling DTWAIN_GetSourceProductName.
TWAIN State Transitions Remains in State 3.
Prerequisite Calls
Optional Prerequisite Calls None.
See Also
|