DTWAIN_IsSourceAcquiring
The DTWAIN_IsSourceAcquiring function determines whether a Source is opened for acquisitions.
DTWAIN_BOOL DTWAIN_IsSourceAcquiring ( DTWAIN_SOURCE Source );
Parameters Source Specifies a TWAIN Source.
Return Values If the function succeeds, TRUE is returned. If the function fails FALSE is returned.
Comments The DTWAIN_IsSourceAcquiring function returns TRUE if Source is still in the process of acquiring an image (In TWAIN State 7). If Source is not acquiring an image or if there is an error, FALSE is returned.
DTWAIN_IsSourceAcquiring can be used to check if it is safe to acquire an image (the Source is idle), or if the application should close. An application must not close down if a Source is acquiring an image.
DTWAIN_IsSourceAcquiring is not an expensive function in terms of execution time, therefore it is ideal if you need to enable or disable controls and/or menu items.
For example, if you have an 'Acquire Image' menu item or button control in your application, the function to check whether the menu item or control should be enabled or disabled must be as efficient as possible. If not, the application will appear sluggish whenever the user brings up the 'Acquire Image' option in a menu bar.
TWAIN State Transitions None.
Prerequisite Function Call(s)
See Also |