Mtmicrqueryinfo, Parameters, Return values – MagTek Excella Windows API99875313 User Manual

Page 34: Remarks, Example

Advertising
background image

Excella Windows API Specifications


26

MTMICRQueryInfo

MTMICRQueryInfo function inquires data of a given section name from the given device name

.

ULONG MTMICRQueryInfo (

char

*pcDevName,

char

*pcSection,

char

*pcSectionData,

DWORD

*pdwLength

);

Parameters


pcDevName

Pointer to null terminated string containing device name

.

pcSection

Pointer to null terminated string containing the section name. e.g. DeviceCapabilities, DeviceUsage,
DeviceStatus, etc.

pcSectionData

Pointer to the buffer that is used to store the data of the inquiry section.

pdwLength

Specifies the size of the pcSectionData buffer.

Return Values


MICR_ST_OK
MICR_ST_DEVICE_NOT_OPEN
MICR_ST_DEVICE_NOT_RESPONDING
MICR_ST_SECTION_NOT_FOUND
MICR_ST_NOT_ENOUGH_MEMORY
MICR_ST_KEY_NOT_FOUND
MICR_ST_DEVICE_CONNECTION_ERROR
MICR_ST_REQUEST_TIMEDOUT

Remarks


If the function succeeds MICR_ST_OK is returned.
If the device fails to respond, MICR_ST_DEVICE_NOT_RESPONDING is returned.
If the memory allocated for pcSectionData buffer that is not big enough to store the data of the inquiry section, ,
MICR_ST_NOT_ENOUGH_MEMORY is returned.
If the pcSection is not a valid section name, MICR_ST_ SECTION_NOT_FOUND is returned.

Example


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

Advertising