11 mtecsdk_sendcommand, 12 mtecsdk_closedevice, Mtecsdk_sendcommand – MagTek EC2000 99875713 User Manual

Page 20: Mtecsdk_closedevice

Advertising
background image

2 - Functions

ExpressCard 2000| Instant Issuance Card Personalization System | Programmer’s Reference (Windows SDK)

Page 20 of 21

pdwLength - Specifies the size of the pcSectionData buffer.

Return Values:
EC_ST_OK
EC_ST_DEVICE_NOT_OPEN
EC_ST_DEVICE_NOT_RESPONDING
EC_ST_DEVICE_CONNECTION_ERROR
EC_ST_REQUEST_TIMEDOUT
EC_ST_CONNECT_REQUEST_TIMEDOUT
EC_ST_ERR_INTERNET_CONNECT
EC_ST_ERR_HTTP_OPEN_REQUEST
EC_ST_ERR_HTTP_SEND_REQUEST
EC_ST_NOT_ENOUGH_MEMORY
EC_ST_BAD_DEVICE_NAME
EC_ST_BAD_QUERY_PARM
EC_ST_BAD_BUFFER
EC_ST_BAD_BUFFER_LENGTH

Remarks:
If the function succeeds it returns EC_ST_OK.
If the device fails to respond, the function returns EC_ST_DEVICE_NOT_RESPONDING.
If the memory allocated for pcSectionData buffer is not large enough to store the data of the inquiry
section, the function returns EC_ST_NOT_ENOUGH_MEMORY.

If there is a bad connection with the device, the return value will be one of the following:
EC_ST_CONNECT_REQUEST_TIMEDOUT
EC_ST_REQUEST_TIMEDOUT
EC_ST_DEVICE_NOT_RESPONDING
EC_ST_ERR_INTERNET_CONNECT
EC_ST_ERR_HTTP_OPEN_REQUEST
EC_ST_ERR_HTTP_SEND_REQUEST

Example:
#define BUFFER_LEN 4096
char pResult [BUFFER_LEN];
DWORD resultLength;
resultLength = BUFFER_LEN;
MTECSDK_QueryInfo(pcDeviceName,
"DeviceCapabilities",pResult,&resultLength);

2.11 MTECSDK_SendCommand

This function sends a single command to the device with the specified device name. It is not supported.

2.12 MTECSDK_CloseDevice

This function closes device with the specified device name.

ULONG MTECSDK_CloseDevice (

char *pcDevName

);

Advertising