ExpressCard 1000 Programming Reference
Remarks
MTECSDK_GetValue
finds the key in the pcDocInfo buffer then returns its value in the pcValue.
If
MTECSDK_GetValue
succeeds it returns EC_ST_OK.
If pdwLength is less than the size of the returned value then EC_ST_NOT_ENOUGH_MEMORY is returned
and the required size for the pcValue buffer is returned in the pdwLength.
If the key/value pair can not be found, then a NULL is returned for pcValue and error parameter
EC_ST_KEY_NOT_FOUND is returned.
Example
char Settings [4096];
char DocInfo [4096];
char device[4096] ="";
DWORD SettingsBufferSize;
DWORD DocInfoSize;
char cValue [1024];
DWORD valueSize;
DWORD dwStatus;
// Initialize Settings
DocInfoSize = 4096;
// Use function MTECSDK_GetDevice to get device name for variable “device”
// Call MTECSDK_ProcessDoc function to process a document.
dwStatus = MTECSDK_ProcessDoc (device, Settings, DocInfo, &DocInfoSize);
if (dwStatus == MTEC_ST_OK)
{
//Let us check the return status from the device
valueSize = 1024;
dwStatus=MTECSDK_GetValue(DocInfo, "CommandStatus", "ReturnCode", cValue, &valueSize);
if (dwStatus != EC_ST_OK)
// error retrieving key value
else
{
// do further process
}
}
22
Summary of Contents for EXPRESSCARD 1000
Page 6: ......