5 mtecsdk_setvalue, Mtecsdk_setvalue, 2 - functions – MagTek EC2000 99875713 User Manual
Page 13

2 - Functions
ExpressCard 2000| Instant Issuance Card Personalization System | Programmer’s Reference (Windows SDK)
Page 13 of 21
Parameters:
bEnable - Boolean value to enable or disable logging.
Return Values: None.
Remarks: None.
Example:
if (hLogFileHandle != NULL)
{
MTECSDK_LogEnable(TRUE);
MTECSDK_SetLogFileHandle (hLogFileHandle);
}
2.5 MTECSDK_SetValue
This function adds a specified key/value pair to the device settings specified in the pcOptions buffer, in
the section specified by pcSection. Each value can only be set once. After setting key/value pairs to fully
define the transaction to send to the device, call MTECSDK_ProcessDoc to send the whole buffer to the
device.
ULONG MTECSDK_SetValue (
char *pcOptions,
char *pcSection,
char *pcKey,
char *pcValue,
DWORD *pdwLength
);
Process options are stored as key/value pairs in a buffer. The structure of the options follows XML
format. Use function MTECSDK_SetValue to add an option to this structure. Options are string-based
key/value pairs. Each option is stored only once in the buffer.
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. To delete the entire pcSection from
the specified pcOptions buffer, set this value to NULL.
pcValue - Pointer to null-terminated string containing the key to set. To delete the specified pcKey from
the specified pcSection, set this value to NULL.
pdwLength - Pointer to a double word that contains the size of the pcOptions buffer. The minimum size
of the buffer should be equal to MTEC_OPTIONS_BUFFER_SIZE.
Return Values:
EC_ST_OK
EC_ST_NOT_ENOUGH_MEMORY
EC_ST_BAD_DATA
EC_ST_BAD_SECTION_NAME
EC_ST_BAD_BUFFER_LENGTH