
PT-90 Mobile Computer SDK Programming Manual
182
API_GetBarData
To Get Barcode into the buffer. When receiving the message SM_DATA_READY, call this function can get the barcode data.
UINT
API_GetBarData
{
LPBYTE
buffer
,
UINT *
uiLength
,
UINT *
uiBarType
}
Parameters
buffer
[out] buffer for scanned data string.
uiLength
[in/out] buffer size
uiBarType
[out] barcode type.
Returned Values
Returning 1 if the operation is successful, otherwise, return 0.
Remarks
If the buffer size is smaller than the scanned data, this function will return 0 and the parameter uiLength will return
the size of the buffer to adopt the scanned data.
Example
if(message == SM_DATA_READY){
CString strBarData,strBarType;
UINT uiSize, uiType, i;
char *pBuf;
uiSize = uiType = 0;
API_GetBarData(NULL, &uiSize, &uiType);
if(uiSize == 0)
strBarData = _T("No Data");
else{
pBuf = (char *)new char[1];
memset(pBuf, 0, 1);
API_GetBarData((LPBYTE)pBuf, &uiSize, &uiType);