Return value – MagTek MAGTEK User Manual
Page 72
MagTek Communications Protocol, Driver Reference Manual
66
Return Value
The returned value indicates the outcome of the call function.
Value
Meaning
MCP_ST_OK
Success. The command was sent and response received.
MCP_ST_OVERFLOW
The Output Buffer is not large enough to hold the response
MCP_ST_FAILED Other
error.
Note
The return value of this function does not necessarily indicate the outcome of the
command; it simply indicates whether the request was sent to the device and a
response received successfully. To determine the outcome of the specific
command sent to the application, the dwResultCode structure member needs to be
interrogated.
Remarks
Host applications access device functions by communicating with specific device applications
running on the device. Each device application is identified by a numeric application ID that is
unique for the device. Every device application defines the command set that it understands and
can process. Each command is identified by a numeric command ID and may contain additional
data needed to process the command. The command ID is unique for the given application.
The device responds to commands within short, finite amount of time. The response contains a
dwResultCode that indicates whether the command was completed successfully, and if not, what
was the reason for failure. The response may also contain additional data to be returned to the
host application.
Refer to MCP device's Command Reference Manual to determine the allowable Application IDs,
Command IDs, and possible Result Codes.