www.pudn.com > LoadMachineCode111.rar > ComOperate.h


// ComOperate.h: interface for the CComOperate class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_COMOPERATE_H__D74DFEDC_45A9_4FCF_A8D7_2317E69FE60B__INCLUDED_) 
#define AFX_COMOPERATE_H__D74DFEDC_45A9_4FCF_A8D7_2317E69FE60B__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "communication.h" 
 
#define SOH	            0x18	/*	֡ͷ			*/ 
#define ENQ	            0x05	/*	֡β			*/ 
#define ACK             0x06     
#define SEND            0x2A 
#define END             0x19 
#define RIGHT           0x07 
#define ERR             0x08 
 
#define QUITKEY		0xff 
#define ITEM_LEN	249 
 
#define WM_THREADFINISHED	 WM_USER + 5 
 
const int nLoadlength=1024; 
 
 
class CComOperate   
{ 
public: 
	CComOperate(); 
	virtual ~CComOperate(); 
public: 
 
	BOOL download_program(int com,	LPVOID pParam); 
	BOOL PORT_RW(int command_set,char *buffer); 
	BOOL Rece_codestrm(int Rece_len, int s_time, char *t); 
	BOOL Check_Recem(char *buffer, int *Mode); 
	BOOL Make_Itemm(int Mode,char *buffer); 
	BOOL Open_remoteportm(int com); 
	BOOL Make_Roadm(); 
	BOOL In_Port(char *temp); 
	BOOL Out_Port(char *H); 
	BOOL Port_Res(); 
	BOOL Port_Init(int com); 
	CComStatus m_comDev; 
 
private: 
	char *Sendbuff; 
	char *Recebuff; 
}; 
 
#endif // !defined(AFX_COMOPERATE_H__D74DFEDC_45A9_4FCF_A8D7_2317E69FE60B__INCLUDED_)