beautypg.com

Mcpreset, Parameters, Return value – MagTek MAGTEK User Manual

Page 66: Remarks

background image

MagTek Communications Protocol, Driver Reference Manual

60

McpReset

This function is used to reset the channel and reestablish communications with an MCP device.
The result of reset is the same as closing and reopening the channel except the device handle
remains the same.


DWORD McpReset( HANDLE hDevice );

Parameters

hDevice


Handle to the specified device (communications resource) that is to be reset. This handle was
returned from the McpOpen function.

Return Value


The returned value indicates the outcome of the reset function.

Value

Meaning

MCP_ST_OK

Success. The channel has been reset.

MCP_ST_INVALID

Invalid device handle hDevice

MCP_ST_FAILED Other

error

Remarks


After opening a device, the host application can re-establish, or reset the channel by calling
McpReset. This function cancels any outstanding commands and restores the communication
channel to its initial state. Using this function is more desirable than closing and reopening the
channel.