Section 3 – API DLL
MTECSDK_SetAttribute
MTECSDK_SetAttribute
function sets the attribute of a key/value pair to the given settings specified in pcOptions buffer and
in a given section specified in pcSection buffer.
ULONG MTECSDK_SetAttribute (
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
EC_ST_OK
EC_ST_NOT_ENOUGH_MEMORY
EC_ST_BAD_DATA
EC_ST_BAD_SECTION_NAME
EC_ST_BAD_BUFFER_LENGTH
Remarks
The function returns EC_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 MTEC_OPTIONS_BUFFER_SIZE.
The
MTECSDK_SetAttribute
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
MTECSDK_ProcessDoc
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
EC_ST_NOT_ENOUGH_MEMORY is returned
Example
None
23
Summary of Contents for EXPRESSCARD 1000
Page 6: ......