beautypg.com

Section 1. overview xe "overview, Scra methods, Scra events – MagTek Secure Card Reader User Manual

Page 5: Scra enums

background image

1

SECTION 1. OVERVIEW

SCRA METHODS

MTUSCRAOpenDevice

Opens a SCRA Swipe Reader

MTUSCRACloseDevice

Closes opened SCRA Swipe Reader

MTUSCRASendCommand

Allows sending command to the SCRA Swipe directly

MTUSCRAGetCardData

Allows retrieving card data through structures

MTUSCRAGetCardDataStr

Allows retrieving card data as a buffer with field delimiters

MTUSCRAClearBuffer(void);

Clears existing card buffer

MTUSCRACardDataStateChangedNotify

Sets a callback function to notify card data state change

MTUSCRADeviceStateChangedNotify

Sets a callback function to notify device state change

MTUSCRAGetDeviceState

Retrieves the current device state

MTUSCRAGetCardDataState

Retrieves the current card data state

MTUSCRAGetPID

Retrieves the Product ID of the SCRA swipe reader


SCRA EVENTS

typedef void (WINAPI *CallBackCardDataStateChanged)(DWORD lpdwCardDataState);
CallBackCardDataStateChanged

Receives information of Card Data States. Possible values are defined under
ECardDataStateValues enum


typedef void (WINAPI *CallBackDeviceStateChanged)(DWORD lpdwDeviceState);
CallBackDeviceStateChanged

Receives information on Device States. Possible values are defined under
EDeviceStateValues enum

SCRA ENUMS


EErrorValues

MTSCRA_ST_OK=0, MTSCRA_ST_FAILED=1,

MTSCRA_ST_OPEN=2, MTSCRA_ST_INVALID_PARAM=3

EDeviceStateValues

MTSCRA_STATE_DISCONNECTED=0,
MTSCRA_STATE_CONNECTED=1,
MTSCRA_STATE_ERROR=2

ECardReadValues

MTSCRA_CARDREAD_OK=0,
MTSCRA_CARDREAD_ERROR=1

ECardDataStateValues

MTSCRA_DATA_NOTREADY=0, MTSCRA_DATA_READY=1,
MTSCRA_DATA_ERROR=2