4.1 WFS_CMD_CHK_READ_FORM

Description

This function returns the data from the current check. The contents of all the fields within the form are returned to the application. For small hand-held check readers, this command might be the only one used.

Input Param
LPWFSCHKINREADFORM
typedef struct _wfs_chk_in_read_form
     {
     LPSTR     lpszFormName;
     LPSTR     lpszFieldNames;
     DWORD     dwOptions;
     LPSTR     lpszExtra;
     }  WFSCHKINREADFORM, * LPWFSCHKINREADFORM;

lpszFormName

Points to the null-terminated name of the form.

lpszFieldNames

Points to a list of NULL-terminated field names from which to read input data, with the final name terminating with two NULLs.

dwOptions

WFS_CHK_OPTAUTOFEED

lpszExtra

Points to a list of vendor-specific, or any other extended information. The information is returned as a series of “key=value” strings so that it is easily extensible by service providers. Each string is null-terminated, with the final string terminating with two null characters.

Output Param
LPWFSCHKOUTREADFORM
typedef struct _wfs_chk_out_read_form
     {
     WORD      hDoc;
     LPSTR     lpszFields;
     }  WFSCHKOUTREADFORM, * LPWFSCHKOUTREADFORM;

hDoc

Handle to this check.

lpszFields

Points to a list of field data returned. See Comments.

Error Code

The following additional error codes can be generated by this command:

Value Meaning
WFS_ERR_CHK_REQDFIELDMISSING The check was blank.
WFS_ERR_CHK_FORMNOTFOUND Invalid form name.
WFS_ERR_CHK_FIELDSPECFAILURE The syntax of the lpszFields member is invalid.
WFS_ERR_CHK_INCOMPLETEREAD Read errors occurred and an incomplete code line is available. Question marks are returned in place of any numbers which could not be read. A code line will always be returned when this error occurs, and the application may choose different behavior depending on the number of question marks returned, e.g., prompt the operator to enter missing numbers.

Execute Events

WFS_EXEE_CHK_NOMEDIA No check has been inserted in the (manual mode) check reader; to be used by the application to generate a message to the operator to insert a check.
WFS_EXEE_CHK_MEDIAINSERTED A check was inserted; this is only issued following the above event.

Comments.

At the end of a successful WFS_CMD_CHK_READ_FORM, the string pointed to by lpsFields will contain a sequence such as (given a U.S. personal check):
ROUTETRANS=021203501\0ACCOUNT=370361\0TRANCODE=2199\0AMOUNT=0000001000\0\0

Each fieldname=value pair is terminated by a NULL; the end of the buffer is marked with an additional NULL. Any embedded space characters (0x20) are significant; trailing spaces are not.

The timeout parameter (dwTimeOut) in the WFSExecute request that passes this command should always be large enough to accomodate prompting the operator to insert a check, having the operator do so, and processing the check. If the timeout expires before these operations are completed, the WFSExecute will be canceled, possibly leaving an application-generated prompt on the operator's screen.