CommProcess.h 613 B

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