Parameters, Return values, Remarks – MagTek Excella STX99875340 User Manual

Page 45: Example

Advertising
background image

Section 3. Excella API

35

Parameters


pcData

Pointer to null terminated string containing a set of key/value pairs.

pdwSectionCount

When the function returns, this variable contains the number of sections present in the pcData.

Return Values


MICR_ST_OK
MICR_ST_BAD_PARAMETER
MICR_ST_ERR_GET_DOM_POINTER
MICR_ST_ERR_LOAD_XML
MICR_ST_SECTION_NOT_FOUND
MICR_ST_BAD_DATA
MICR_ST_BAD_BUFFER_LENGTH

Remarks


If the function succeeds MICR_ST_OK is returned.
If pcData is NULL, MICR_ST_BAD_DATA is returned.
If data in pcData string is not in XML format, MICR_ST_ERR_LOAD_XML is returned.
If there is problem using MSXML, MICR_ST_ERR_GET_DOM_POINTER is returned.

Example


char Settings [4096];
char DocInfo [4096];
char device[4096] ="";
DWORD SettingsBufferSize;
DWORD DocInfoSize;
char cValue [1024];
DWORD valueSize;
DWORD dwStatus;

// Intialize Settings

DocInfoSize = 4096;

// Use function MTMICRGetDevice to get device name for variable “device”
// Call MTMICRProcessCheck function to process a document.
dwStatus = MTMICRProcessCheck (device, Settings, DocInfo, &DocInfoSize);

if (dwStatus == MICR_ST_OK)
{

// Let us scan through all the key pair values returned in the DocInfo
DWORD sectionCount;

// Get total number of sections
if (MTMICRGetSectionCount (DocInfo, &sectionCount) ==MICR_ST_OK)
{
}

}

Advertising