MagTek Excella Windows API99875313 User Manual
Page 47
Section 3. Excella API
39
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;
DWORD sectionIndex;
// Get total number of sections
if (MTMICRGetSectionCount (DocInfo, §ionCount) ==MICR_ST_OK)
{
for (sectionIndex = 0; sectionIndex < sectionCount; sectionIndex)
{
char SectionName [128];
DWORD SectionNameSize = 128;
if (MTMICRGetSectionName(DocInfo, sectionIndex, SectionName, &SectionNameSize)
== MICR_ST_OK)
{
// Display the section Name
DWORD keyCount;
if (MTMICRGetKeyCount (DocInfo, SectionName, &keyCount) ==
MICR_ST_OK)
{
// Display the key count
for (int keyIndex = 0; keyIndex < keyCount; keyIndex++)
{
char KeyName [128];
DWORD KeyNameSize = 128;
if (MTMICRGetKeyName(DocInfo, SectionName, keyIndex,
KeyName, &KeyNameSize) == MICR_ST_OK)
{
// We now have the section and key, let us get the
value
char value [1024];
DWORD valueSize = 1024;
if (MTMICRGetValue(DocInfo, SectionName,
KeyName,value, &valueSize) == MICR_ST_OK)
{
}
}