www.pudn.com > IrMobile.zip > CSerial.h


//Mobile control class by SkyVense 
//If you modified this file, please send a copy to skyvense@online.sh.cn 
//Thank you! 
 
 
//Last modifed 2002-02-29 by SkyVense 
 
// Serial.h 
 
#define FC_DTRDSR       0x01 
#define FC_RTSCTS       0x02 
#define FC_XONXOFF      0x04 
#define ASCII_BEL       0x07 
#define ASCII_BS        0x08 
#define ASCII_LF        0x0A 
#define ASCII_CR        0x0D 
#define ASCII_XON       0x11 
#define ASCII_XOFF      0x13 
 
class CSerial   
{ 
public: 
	CSerial(); 
	virtual ~CSerial(); 
 
    BOOL Open( int nPort, int nBaud); 
    BOOL PortClose (void); 
	BOOL SendData( const char *buffer, int size ); 
	int ReadData(char *data); 
 
	BOOL m_bOpened; 
    HANDLE m_hIDComDev; 
    DWORD dwError; 
	DWORD dwThreadID; 
 
};