Specifications

17.4.4. Error Codes
If an error occurs during access to properties or during calling to methods, the error code will be stored into
the errorStatus variable.
Error Code Table
Propertie or
Method
Name Content
ERROR_TOO_MANY_OPEN_FILES Barcode reading enabled (when flag is TRUE).
ERROR_INVALID_PARAMETER
readMode or readType out of the range (when
flag is TRUE)
portOpen
ERROR_INVALID_HANDLE
Barcode reading disabled (when flag is FALSE)
BufferData
ERROR_INVALID_HANDLE
Barcode reading disabled
GetChkDigit
ERROR_INVALID_PARAMETER
Check digit type out of the range or invalid
barcode data
17.4.5. Coding Sample
/* Initialize main dialog */
BOOL CBarOCXDlg::OnInitDialog()
{
CDialog::OnInitDialog();
…………………………...…
…………………………...…
/* Enable barcode reading */
m_ScanCtrl.SetPortOpen(TRUE);
return TRUE;
}
/* Initialize main dialog */
void CBarOCXDlg::OnDestroy()
{
/* Disable barcode reading */
m_ScanCtrl.SetPortOpen(FALSE);
CDialog::OnDestroy();
}
/* Callback for decoding completion */
void CBarOCXDlg::OnDecodeDoneScannerctrl()
{
CString BarData; /* Read data */
/* Read data from buffer */
BarData = m_ScanCtrl.GetBufferData();
/* Display */
…………………………...…
…………………………...…
}
149