DTWAIN_SetDeviceNotifications
The DTWAIN_SetDeviceNotifications function sets the device events that the application is allowed to capture.
DTWAIN_BOOL DTWAIN_SetDeviceNotifications (
Parameters Source An open TWAIN Source.
DeviceValues A LONG value denoting the device events to capture.
Return Values The return value is TRUE if successful. Otherwise FALSE is returned.
Comments The DTWAIN_SetDeviceNotifications function sets up an application to capture device events sent by the Source. The Source Source must be selected using one of the Source Selection Functions.
The DeviceValues specifies which device events to capture. The values that DTWAIN uses are equivalent to the TWAIN 1.8 specification values for these events plus 1. The following values can be combined by using the bitwise OR operator or by adding the desired values (if your development language does not have a bitwise OR):
The DTWAIN_IsCapSupported function can be used to test if device events are supported by the Source. The capability, DTWAIN_CV_CAPDEVICEEVENT is used as the cap to test. Even though DTWAIN always checks if the capability is supported when DTWAIN_SetDeviceNotifications function is called, an application will be able to determine itself whether a Source can perform device events.
For more information on device events, see the topic Capturing Source Device Events.
TWAIN State Transitions The Source must be in State 4. or higher
Prerequisite Function Call(s)
DTWAIN Source Selection Function
See Also |