Return values

All event handlers should be declared as long. They must return a long status value to ReadSoft Invoices, reporting whether or not the event was handled properly. The following are the return values with their normal meaning. The exact meaning for each event is described in the individual help topics.

evtError

-1

Informs ReadSoft Invoices about an error in the event handling.

evtOK

0

The event is handled and normal processing is continued

evtOKAbort

1

The event is handled and the normal process can be aborted.

If a plug-in returns evtOKAbort on the InvoiceReject event, the dialog asking the user if he wants to reject the invoice is not shown, and Verify skips to the next invoice.

Use the CancelEventChain method to prevent an event from continuing to the next plug-in that subscribes to the event.

evtCancel

2

If a plug-in returns evtCancel on the InvoiceReject event, the rejection of the invoice is cancelled, and the Verify operator can continue verification of the invoice.

Use the CancelEventChain method to prevent an event from continuing to the next plug-in that subscribes to the event.

The following is an example of typical external event handler.

Public Function JobStopped()  As Long
	' Do your event handling here
	JobStopped = 0  ' evtOK return value to Kofax ReadSoft Invoices
End Function