DTWAIN_GetDeviceEvent

Top  Previous  Next

The DTWAIN_GetDeviceEvent function gets the last device event that occurred.

 

DTWAIN_BOOL DTWAIN_GetDeviceEvent (

DTWAIN_SOURCE

Source,

LPLONG

lpDeviceValues );

 

Parameters

Source

An open TWAIN Source.

 

lpDeviceValues

Address of LONG to store the last device event that occurred.

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_GetDeviceEvent function gets the last device event that the Source Source has detected.  The lpDeviceValues address points to a LONG that will be filled in with the last device event that occurred.  The DTWAIN_GetDeviceEvent function is usually called when the DTWAIN_TN_DEVICEEVENT notification is sent to the application window.

 

The device event will be equal to one of the values defined below:

 

Value

Meaning

 

DTWAIN_DE_CHKAUTOCAPTURE

The automatic capture settings        on the device have been changed.

DTWAIN_DE_CHKBATTERY        

Status of the battery has changed.

DTWAIN_DE_CHKDEVICEONLINE

The device may have been powered off.

DTWAIN_DE_CHKFLASH                

The flash setting has changed.

DTWAIN_DE_CHKPOWERSUPPLY

The power supply has changed.

DTWAIN_DE_CHKRESOLUTION        

The resolution of the device has changed.

DTWAIN_DE_DEVICEADDED        

A device has been added to the Source.

DTWAIN_DE_DEVICEOFFLINE        

The device has become unavailable. The device is assumed to be connected.

DTWAIN_DE_DEVICEREADY

A device is ready to capture another image.

DTWAIN_DE_DEVICEREMOVED

A device has been removed from the Source.

DTWAIN_DE_DEVICEOFFLINE

The device is off-line.

DTWAIN_DE_PAPERDOUBLEFEED

Report a double feed to the application.

DTWAIN_DE_PAPERJAM                

Report a paper jam to the application.

 

Depending on the event that occurred, extra information can be retrieved concerning the event.  The DTWAIN_GetDeviceEventEx  function will return any extra device event information with respect to the last event that occurred.

 

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_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Special Source Device Events