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

Page 44: Remarks, Example

Advertising
background image

Excella Windows API Specifications


36

MTMICRGetKeyCount

MTMICRGetKeyCount function returns the number of keys belong to a section with the name specified in
variable pcSection. The function MTMICRGetKeyCount parses through a null terminated string which contains a
set of key/value pairs. The key/value pairs get stored in the buffer using function MTMICRSetValue or
MTMICRSetIndexValue.

ULONG MTMICRGetKeyCount (

char

*pcData,

char

*pcSection,

DWORD

*pdwKeyCount

);

Parameters


pcData

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

pcSection

Pointer to null terminated string containing the section name.

pdwKeyCount

When the function returns, this variable contains the number of keys under the section name pcSection
present in the pcData.

Return Values


MICR_ST_OK
MICR_ST_ERR_GET_DOM_POINTER
MICR_ST_ERR_LOAD_XML
MICR_ST_SECTION_NOT_FOUND
MICR_ST_BAD_PARAMETER

Remarks


If the function succeeds MICR_ST_OK 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.

Advertising