// KeyenceBL600.h: interface for the CKeyenceBL600 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_KEYENCEBL600_H__F532F13C_66DC_4DBC_B10B_66B182F94AA3__INCLUDED_)
#define AFX_KEYENCEBL600_H__F532F13C_66DC_4DBC_B10B_66B182F94AA3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Scanner.h"
#include "Utility.h"

#ifdef  BUILD_COMMDLL
#define     COMMDLL_DLLCLASS    __declspec(dllexport)
#else
#define     COMMDLL_DLLCLASS    __declspec(dllimport)
#endif

class COMMDLL_DLLCLASS CKeyenceBL600 : public CScanner
{
public:
    bool    WaitForBarcode(DWORD dwTimeout, CString &csBarcode);
    void    ReceiveComm(const char *cpcBuffer, int nSize);
    bool    ReadBarCode(DWORD dwTimeout, CString &csBarcode, bool bWaitResult = TRUE);
    CString GetReceiveData();
    bool    Off();
    bool    On();
    CKeyenceBL600();
    virtual ~CKeyenceBL600();

private:
    CString m_csBarcode;
    HANDLE  m_hSuccess;
    HANDLE  m_hAck;
};

#endif // !defined(AFX_KEYENCEBL600_H__F532F13C_66DC_4DBC_B10B_66B182F94AA3__INCLUDED_)
