Mtmicrgetkeyname, Parameters, Return values – MagTek Excella Windows API99875313 User Manual
Page 46: Remarks, Example

Excella Windows API Specifications
38
MTMICRGetKeyName
MTMICRGetKeyName function returns the name of the key which has the key index number given in variable
dwKeyNumber and belongs to the section group with the section name specified in variable pcSection.
MTMICRGetKeyName parses through the buffer pcSettings containing a set of key/value pairs which was
previously stored in the buffer by using function MTMICRSetValue or function MTMICRSetIndexValue.
ULONG MTMICRGetKeyName (
char
*pcSettings,
char
*pcSection,
DWORD
dwKeyNumber,
char
*pcKey,
DWORD
*pdwKeySize
);
Parameters
pcSettings
Pointer to null terminated string containing a set of key/value pairs.
pcSection
Pointer to null terminated string containing the section name.
dwKeyNumber
Specifes the key index number of the requested key.
pcKey
When the function returns, this variable contains key name of the key at index dwKeyNumber.
pdwKeySize
Pointer to a variable that specifies the size, in bytes, of the buffer pcKey. If the size of the buffer uses to store
the name of the requested key, the required size is stored in this variable when the function completes
execution.
Return Values
MICR_ST_OK
MICR_ST_ERR_GET_DOM_POINTER
MICR_ST_ERR_LOAD_XML
MICR_ST_SECTION_NOT_FOUND
MICR_ST_KEY_NUMBER_NOT_FOUND
MICR_ST_NOT_ENOUGH_MEMORY
MICR_ST_BAD_PARAMETER
Remarks
If the function succeeds MICR_ST_OK is returned.
Example
char Settings [4096];
char DocInfo [4096];
char device[4096] ="";