Remarks, Example, Mtmicrgetvalue – MagTek Excella STX99875340 User Manual

Page 32: Parameters

Advertising
background image

Excella Windows API Specifications

22

Remarks


The function returns MICR_ST_NOT_ENOUGH_MEMORY, if the memory allocated for pcOptions buffer is not big enough
to store the additional key/value pair. The required size for the buffer is returned in pdwLength;
The minimum size of the buffer should be equal to MTMICR_OPTIONS_BUFFER_SIZE.
The MTMICRSetIndexValue function saves the new key/value pair in the pcOptions buffer only. This function does not
send the new key/value pair to the device. Use function MTMICRProcessCheck to send this key/value pair to the device.
If parameter nIndex is less than zero or greater than 4 then MICR_ST_BAD_PARAMETER is returned.
If pdwLength is less than the length of the results pcOptions string after new key/value pair is added then

MICR_ST_NOT_ENOUGH_MEMORY is returned.

Example


char Settings [4096];
DWORD SettingsBufferSize;

// Initialize Settings

// Intialize the Settings variable first
SettingsBufferSize =4096;

// The following command will set ImageColor1 = BW under the ImageOptions section.
dwStatus=MTMICRSetIndexValue(Settings, "ImageOptions","ImageColor",1, "BW",
&SettingsBufferSize);

MTMICRGetValue

MTMICRGetValue

function retrieves a key/value pair that was previously stored in the pcDocInfo parameter using

MTMICRSetValue function .

ULONG MTMICRGetValue (
char

*pcDocInfo,

char

*pcSection,

char

*pcKey,

char

*pcValue,

DWORD

*pdwLength

);

Parameters


pcDocInfo

Buffer pointer containing all the key/value pairs.

pcSection

Pointer to null terminated string containing the section name.

pcKey

Pointer to null terminated string containing the key name.

pcValue

Pointer to the buffer that receives the retrieved string.

pdwLength

Specifies the size of the pcValue buffer.



Advertising