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

Page 30: Remarks

Advertising
background image

Excella Windows API Specifications

20

MTMICRSetValue


MTMICRSetValue
function adds a key/value pair to the given device settings specified in pcOptions buffer and in a given
section specified in pcSection buffer.

ULONG MTMICRSetValue (

char

*pcOptions,

char

*pcSection,

char

*pcKey,

char

*pcValue,

DWORD

*pdwLength

);

Parameters


pcOptions

Pointer to null terminated string containing all 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 null terminated string containing the key value. If this is NULL, then the key pcKey is deleted from the section
pcSection.

pdwLength:

Pointer to a double word that contains the size of the pcOptions buffer.

Return Values


MICR_ST_OK
MICR_ST_NOT_ENOUGH_MEMORY
MICR_ST_BAD_DATA
MICR_ST_BAD_SECTION_NAME
MICR_ST_BAD_BUFFER_LENGTH

Remarks


The functions return MICR_ST_NOT_ENOUGH_MEMORY, if the pcOptions buffer is not enough to add the new key/value
pair. The required size of the buffer is returned in pdwLength.

The minimum size of the buffer should be equal to MTMICR_OPTIONS_BUFFER_SIZE.

The MTMICRSetValue function saves the new key/value pair in the pcOptions buffer only. This function does not send this
key/value pair to the device. Use function MTMICRProcessCheck to send this key/value pair to the device.

If pcKey is NULL, the whole section pcSection will be removed from pcOptions string.
If pcValue is NULL and a key is specified, the specified key will be removed from the specified section
If pdwLength is less than the size of the results pcOptions after new key/value pair is added then

MICR_ST_NOT_ENOUGH_MEMORY is returned

Advertising