CommRS232.h 817 B

1234567891011121314151617181920212223242526272829303132
  1. // CommRS232.h: interface for the CCommRS232 class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_COMMRS232_H__B7D595F0_425B_45C2_91E3_816604795E01__INCLUDED_)
  5. #define AFX_COMMRS232_H__B7D595F0_425B_45C2_91E3_816604795E01__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "CommAsyn.h"
  10. class CCommRS232 : public CCommAsyn
  11. {
  12. public:
  13. virtual int Write(BYTE * pBuf, int len);
  14. virtual int Read(BYTE * pBuf, int len);
  15. virtual BOOL InitParam(PPORTPARAM pPortParam);
  16. CCommRS232();
  17. virtual ~CCommRS232();
  18. private:
  19. BOOL m_bOpen;
  20. int m_nPort;
  21. HANDLE m_hCom;
  22. // DWORD inQue, outQue;
  23. BOOL CloseComm();
  24. BOOL InitComm(PPORTPARAM pPortParam);
  25. protected:
  26. };
  27. #endif // !defined(AFX_COMMRS232_H__B7D595F0_425B_45C2_91E3_816604795E01__INCLUDED_)