Description This command is used to read data from input fields on the specified form. If no media is present, the device waits for the period of time specified by the dwTimeOut parameter in the WFSExecute call for media to be inserted.
Input Param LPWFSPTRREADFORM lpReadForm;
typedef struct _wfs_ptr_read_form
{
LPSTR lpszFormName;
LPSTR lpszFieldNames;
LPSTR lpszMediaName;
DWORD dwMediaControl;
} WFSPTRREADFORM, * LPWFSPTRREADFORM;
lpszFormName
Pointer to the null-terminated name of the form.
lpszFieldNames
Pointer to a list of null-terminated field names from which to read input data, with the final name terminating with two null characters. If this value is NULL, then read data from all input fields on the form.
lpszMediaName
Pointer to the null-terminated media name.
dwMediaControl
Specifies the manner in which the media should be handled and can be a combination of the bit flags described under WFS_CMD_PTR_CONTROL_MEDIA.
Output Param LPSTR lpszFields;
lpszFields
Pointer to a series of "<FieldName>=<FieldValue>" strings, where each string is null-terminated with the final string terminating with two null characters. If the field is an index field, then the syntax of the string is instead "<FieldName>[<index>]=<FieldValue>", where <index> specifies the zero-based element of the index field.
Error Codes The following additional error codes can be generated by this command:
Value Meaning
WFS_ERR_PTR_READNOTSUPPORTED The device has no read capability.
WFS_ERR_PTR_FORMNOTFOUND The specified form cannot be found.
WFS_ERR_PTR_FORMINVALID The specified form definition is invalid.
WFS_ERR_PTR_MEDIANOTFOUND The specified media definition cannot be found.
WFS_ERR_PTR_MEDIAINVALID The specified media definition is invalid.
WFS_ERR_PTR_MEDIASKEWED The media skew exceeded the limit in the form definition.
WFS_ERR_PTR_FIELDSPECFAILURE The syntax of the lpszFieldNames member is invalid.
WFS_ERR_PTR_FIELDERROR An error occurred while processing a field, causing termination of the print request. An execute event WFS_EXEE_PTR_FIELDERROR is posted with the details.
Events The following additional events can be generated by this command:
Value Meaning
WFS_EXEE_PTR_NOMEDIA No media is present in the device.
WFS_EXEE_PTR_FIELDERROR A fatal error occured while processing a field.
WFS_EXEE_PTR_FIELDWARNING A non-fatal error occured while processing a field.
WFS_EXEE_PTR_MEDIAINSERTED Media has been inserted into the device.
Comments All error codes (except WFS_ERR_PTR_NOMEDIAPRESENT) and events listed under the WFS_CMD_PTR_CONTROL_MEDIA command description can also occur on this command.